Browse Source

[IMP] Add fied in bank to identify bank company and format footer

pull/1/head
Ny Zo 2 months ago
parent
commit
6587101181
  1. 3
      __manifest__.py
  2. 1
      models/__init__.py
  3. 9
      models/res_bank.py
  4. 12
      views/report_invoice_template.xml
  5. 15
      views/res_partner.xml

3
__manifest__.py

@ -5,10 +5,11 @@
'summary': 'Invoices & Payments Facile Data',
'sequence': 10,
'category': 'Accounting/Accounting',
'depends': ['account', 'sale'],
'depends': ['account', 'sale', 'l10n_fr'],
'data': [
'data/paperformat_custom.xml',
'views/res_company_views.xml',
'views/res_partner.xml',
'views/report_invoice_template.xml',
'views/report_sale_template.xml',
],

1
models/__init__.py

@ -1,3 +1,4 @@
from . import account_move
from . import res_company
from . import sale_order
from . import res_bank

9
models/res_bank.py

@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from odoo import fields, models
class ResPartnerBank(models.Model):
_inherit = 'res.partner.bank'
display_report_ok = fields.Boolean('Afficher PDF')

12
views/report_invoice_template.xml

@ -210,19 +210,19 @@
Site Web :
<span t-field="o.company_id.website"/>
-
IBAN FR76 1090 7002 1246 2212 3778 953
<t t-set="bank_ids" t-value="o.company_id.bank_ids.filtered(lambda b: b.display_report_ok)"/>
IBAN <span t-if="bank_ids" t-esc="bank_ids[0].acc_number"/>
-
Code NAF (APE) :
<span t-field="o.company_id.ape"/>
-
N° RCS
<span t-field="o.company_id.company_registry"/>
-
SAINTES - SARL au capital social de
SARL au capital social de
<span t-field="o.company_id.capital"/>
-
Siret
<span t-feld="o.company_id.siret"/>
<span t-field="o.company_id.siret"/>
-
N ° TVA
<span t-field="o.company_id.vat"/>
@ -274,6 +274,10 @@
<div class="row mt64">
<div class="col-6">
<h1 style="color: black;">
<span t-if="o.move_type == 'out_invoice'">FACTURE</span>
<span t-if="o.move_type == 'out_refund'">AVOIR</span>
<span t-if="o.move_type == 'in_refund'">AVOIR FOURNISSEUR</span>
<span t-if="o.move_type == 'in_invoice'">FACTURE FOURNISSEUR</span>
FACTURE
</h1>
N° :

15
views/res_partner.xml

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="isr_partner_property_bank_tree" model="ir.ui.view">
<field name="name">res.partner.property.form.facil</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='bank_id']" position="after">
<field name="display_report_ok" />
</xpath>
</field>
</record>
</data>
</odoo>
Loading…
Cancel
Save