Add invoice usage to party's contact mechanisms
issue7093 review36971002
This commit is contained in:
1 parent
88322f767a
commit
8a1bc6d656
7 files changed
+60
-5
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Add invoice usage to party's contact mechanisms
|
||||
* Show reconciled date on invoice
|
||||
* Make description on invoice line optional
|
||||
|
||||
|
||||
+6
-5
@@ -4,7 +4,7 @@
|
||||
from trytond.pool import Pool
|
||||
from .payment_term import *
|
||||
from .invoice import *
|
||||
from .party import *
|
||||
from . import party
|
||||
from .account import *
|
||||
|
||||
|
||||
@@ -23,9 +23,10 @@ def register():
|
||||
PayInvoiceStart,
|
||||
PayInvoiceAsk,
|
||||
CreditInvoiceStart,
|
||||
Address,
|
||||
Party,
|
||||
PartyPaymentTerm,
|
||||
party.Address,
|
||||
party.ContactMechanism,
|
||||
party.Party,
|
||||
party.PartyPaymentTerm,
|
||||
InvoiceSequence,
|
||||
# Match pattern migration fallbacks to Fiscalyear values so Period
|
||||
# must be registered before Fiscalyear
|
||||
@@ -38,7 +39,7 @@ def register():
|
||||
TestPaymentTerm,
|
||||
PayInvoice,
|
||||
CreditInvoice,
|
||||
PartyReplace,
|
||||
party.PartyReplace,
|
||||
RenewFiscalYear,
|
||||
module='account_invoice', type_='wizard')
|
||||
Pool.register(
|
||||
|
||||
@@ -18,6 +18,19 @@ class Address:
|
||||
invoice = fields.Boolean('Invoice')
|
||||
|
||||
|
||||
class ContactMechanism:
|
||||
__metaclass__ = PoolMeta
|
||||
__name__ = 'party.contact_mechanism'
|
||||
invoice = fields.Boolean('Invoice')
|
||||
|
||||
@classmethod
|
||||
def usages(cls, _fields=None):
|
||||
if _fields is None:
|
||||
_fields = []
|
||||
_fields.append('invoice')
|
||||
return super(ContactMechanism, cls).usages(_fields=_fields)
|
||||
|
||||
|
||||
class Party(ModelSQL, ModelView):
|
||||
__name__ = 'party.party'
|
||||
customer_payment_term = fields.MultiValue(customer_payment_term)
|
||||
|
||||
@@ -20,6 +20,21 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="name">address_tree_sequence</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="contact_mechanism_view_tree">
|
||||
<field name="model">party.contact_mechanism</field>
|
||||
<field name="inherit" ref="party.contact_mechanism_view_tree"/>
|
||||
<field name="name">contact_mechanism_tree</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="contact_mechanism_view_form">
|
||||
<field name="model">party.contact_mechanism</field>
|
||||
<field name="inherit" ref="party.contact_mechanism_view_form"/>
|
||||
<field name="name">contact_mechanism_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="contact_mechanism_view_tree_sequence">
|
||||
<field name="model">party.contact_mechanism</field>
|
||||
<field name="inherit" ref="party.contact_mechanism_view_tree_sequence"/>
|
||||
<field name="name">contact_mechanism_tree_sequence</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="party_view_form">
|
||||
<field name="model">party.party</field>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/group[@id='checkboxes']" position="inside">
|
||||
<label name="invoice"/>
|
||||
<field name="invoice" xexpand="0" width="25"/>
|
||||
</xpath>
|
||||
</data>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/tree/field[@name='active']" position="after">
|
||||
<field name="invoice"/>
|
||||
</xpath>
|
||||
</data>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/tree/field[@name='party']" position="after">
|
||||
<field name="invoice"/>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in new issue
Block a user