diff --git a/models/account_move.py b/models/account_move.py index 1b93bc995e0761906e41159b094d43ea498d34e2..cd7cda48148d8ebf345efd07abecd04a9d074efb 100644 --- a/models/account_move.py +++ b/models/account_move.py @@ -12,6 +12,10 @@ class AccountMove(models.Model): comodel_name='account.account', string='Compte de tiers', ) + display_siret = fields.Boolean( + string="Afficher le SIRET", default=False, + help="Affiche le n° SIRET sur la facture client" + ) # ------------------------------------------------------ # Override Parent diff --git a/templates/report_invoice_document.xml b/templates/report_invoice_document.xml index e5258e787f0c3b99a62e4c2792d9616576bffb02..31b040efcbb74a166e91e80b2b2ab8944f849d7a 100644 --- a/templates/report_invoice_document.xml +++ b/templates/report_invoice_document.xml @@ -6,6 +6,13 @@ <data> <template id="afac_report_invoice_document" inherit_id="account.report_invoice_document"> + <!-- Affichage du SIRET --> + <xpath expr="//div[@name='reference']" position="after"> + <div class="col-auto col-3 mw-100 mb-2" t-if="o.display_siret" name="reference"> + <strong>SIRET :</strong> + <p class="m-0" t-field="o.partner_id.siret"/> + </div> + </xpath> <!-- Gestion de l'affichage de la TVA : tableau & total --> <xpath expr="//th[@name='th_taxes']" position="attributes"> <attribute name="t-if">o.company_id.is_tax</attribute> diff --git a/views/account_move.xml b/views/account_move.xml index b4699f8474b78f22a33019f38e750bb9c02a8b5a..6ef69157a6fe0ad682eb51cec0743d035cc9cd8a 100644 --- a/views/account_move.xml +++ b/views/account_move.xml @@ -16,6 +16,9 @@ <attribute name="domain">[('is_company', '=', True)]</attribute> <attribute name="options">{'no_create': True}</attribute> </xpath> + <xpath expr="//field[@name='payment_reference']" position="after"> + <field name="display_siret" widget="boolean_toggle"/> + </xpath> <xpath expr="//div[@name='journal_div']" position="after"> <field name="third_account_journal_ids" invisible="1"/> <field