-
-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADD l10n_it_causali_pagamento and l10n_it_withholding_tax_causali #576
Conversation
@alessandrocamilli puoi dare un'occhiata? Dovrebbero essere questi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alcune correzioni e miglioramenti
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'data/codici_carica_data.xml', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i nomi dei file li avevi lasciati codici_carica* per qualche motivo?
from odoo.exceptions import ValidationError | ||
|
||
|
||
class CodiceCarica(models.Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il nome della classe è diversa dall'oggetto
class CodiceCarica(models.Model): | ||
_name = 'causale.pagamento' | ||
_description = 'Causale Pagamento' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data la lunghezza del campo name, in alcuni casi l'interfaccia di Odoo va fuori fase spostandosi da un record all'altro, per cui aggiungerei un display_name
_rec_name = 'display_name'
raise ValidationError( | ||
_("The element with code %s already exists") % self.code) | ||
|
||
code = fields.Char(string='Code', size=2, required=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@api.multi
@api.depends('name')
def _compute_display_name(self):
for cau in self:
cau.display_name = ' '.join([cau.code, cau.name[:100]])
if len(cau.name) > 50:
cau.display_name += '...'
display_name = fields.Char(
string='Name', compute='_compute_display_name')
@sergiocorato grazie, ho corretto i riferimenti a codici carica.
In quali casi? |
@eLBati prego |
@sergiocorato sì ma in quale vista? Nella form delle ritenute? |
6aa7021
to
79038ba
Compare
a dx non si vedono i bottoni per la navigazione, per farli riapparire bisogna usare lo zoom, è una cosa che succede in maniera generica comunque (su Firefox o Chromium) |
79038ba
to
6477bdd
Compare
@sergiocorato grazie. Ho aggiunto l'override del name_get |
👍 |
(ho guardato al volo i css ma non mi è chiaro quale/i siano da correggere per evitare la cosa) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potresti aggiungere anche i test?
"category": "Hidden", | ||
"website": "https://github.com/OCA/l10n-italy", | ||
"author": "Agile Business Group, Odoo Community Association (OCA)", | ||
"maintainers": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meglio eliminarla
6cd546b
to
90cdf5f
Compare
@tafaRU fatto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bisogna sicuramente cambiare il metodo decorato con api.constrains
, per il resto ok
@@ -0,0 +1,82 @@ | |||
======================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potresti mettere anche la spiegazione inglese come in https://github.com/OCA/l10n-italy/tree/10.0/l10n_it_vat_registries ?
|
||
@api.constrains('code') | ||
def _check_code(self): | ||
domain = [('code', '=', self.code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beware! api.constrains
viene chiamato sui recordset (https://www.odoo.com/documentation/10.0/howtos/backend.html#model-constraints)
<field name="model">causale.pagamento</field> | ||
<field name="arch" type="xml"> | ||
<form string="Causale pagamento"> | ||
<group> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forse aggiungere il nodo sheet
risolverebbe il problema di visualizzazione
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eLBati potresti provare se questo risolve rimuovendo l'override del name_get
, inolte se il campo name
è così lungo, valuterei di utilizzare un campo Text
@SimoRubi allora bisogna modificare anche qua https://github.com/OCA/l10n-italy/blob/10.0/l10n_it_codici_carica/models/codice_carica.py#L13 ? |
Sì @eLBati, a parte la documentazione nel codice si vede che i constrain method sono chiamati su recordset |
90cdf5f
to
d55623a
Compare
d55623a
to
d9e4bac
Compare
Per codici carica: #583 |
In riferimento alla mia domanda iniziale, le causali dovrebbero essere corrette in quanto, sebbene il 770 semplificato non esista più, quando hanno fatto le specifiche della fatturapa esisteva, quindi l'elenco dovrebbe essere quello che si trova alla pagina 50 di |
No description provided.