Skip to content
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

Merged
merged 2 commits into from Sep 10, 2018

Conversation

eLBati
Copy link
Member

@eLBati eLBati commented Aug 23, 2018

No description provided.

@eLBati eLBati added this to the 10.0 milestone Aug 23, 2018
@eLBati
Copy link
Member Author

eLBati commented Aug 23, 2018

@alessandrocamilli puoi dare un'occhiata?
Ho creato il modulo l10n_it_causali_pagamento perchè ho visto, nella documentazione della fattura elettronica, che per il campo CausalePagamento, sotto DatiRitenuta, si dice
valori ammessi: codifiche come da Mod. 770S

Dovrebbero essere questi
https://www.fatturapertutti.it/supporto/soggetti-a-ritenuta-causali-di-pagamento-come-da-istruzioni-modello-770s-874
ti risulta?

Copy link
Contributor

@sergiocorato sergiocorato left a 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',
Copy link
Contributor

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):
Copy link
Contributor

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'

Copy link
Contributor

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)
Copy link
Contributor

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')

@eLBati
Copy link
Member Author

eLBati commented Aug 24, 2018

@sergiocorato grazie, ho corretto i riferimenti a codici carica.

data la lunghezza del campo name, in alcuni casi l'interfaccia di Odoo va fuori fase spostandosi da un record all'altro

In quali casi?

@sergiocorato
Copy link
Contributor

@eLBati prego
quando la lunghezza del campo è la più lunga, non ho contato i caratteri

@eLBati
Copy link
Member Author

eLBati commented Aug 24, 2018

@sergiocorato sì ma in quale vista? Nella form delle ritenute?
Non ho riscontrato problemi

@sergiocorato
Copy link
Contributor

screenshot_2018-08-25 canoni corrisposti nel 2004 da societa o enti residenti ovvero da stabili organizzazioni di societa

@sergiocorato
Copy link
Contributor

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)

@eLBati
Copy link
Member Author

eLBati commented Aug 27, 2018

@sergiocorato grazie. Ho aggiunto l'override del name_get

@sergiocorato
Copy link
Contributor

👍

@sergiocorato
Copy link
Contributor

(ho guardato al volo i css ma non mi è chiaro quale/i siano da correggere per evitare la cosa)

Copy link
Member

@tafaRU tafaRU left a 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": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meglio eliminarla

@eLBati eLBati force-pushed the 10.0-causali_pagamento branch 2 times, most recently from 6cd546b to 90cdf5f Compare August 31, 2018 08:10
@eLBati
Copy link
Member Author

eLBati commented Aug 31, 2018

@tafaRU fatto

Copy link

@hurrinico hurrinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@SimoRubi SimoRubi left a 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 @@
========================================
Copy link
Member

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)]
Copy link
Member

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>
Copy link
Member

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

Copy link
Member

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

@eLBati
Copy link
Member Author

eLBati commented Aug 31, 2018

@SimoRubi
Copy link
Member

@eLBati, a parte la documentazione nel codice si vede che i constrain method sono chiamati su recordset

@eLBati
Copy link
Member Author

eLBati commented Aug 31, 2018

Per codici carica: #583

@eLBati
Copy link
Member Author

eLBati commented Sep 3, 2018

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
https://www.agenziaentrate.gov.it/wps/file/Nsilib/Nsi/Archivio/ArchivioSchedeAdempimento/Schede+adempimento+2015/Dichiarare+2015/770+2015+Semplificato/Modello+770+2015+semplificato/770+semplificato+2015+Istruzioni/770sempl_istr.pdf

@eLBati eLBati merged commit 3433800 into OCA:10.0 Sep 10, 2018
Borruso pushed a commit to Borruso/l10n-italy that referenced this pull request Nov 9, 2023
Signed-off-by AaronHForgeFlow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants