add field code
This commit is contained in:
parent
b5fd1cbb56
commit
7235c150c4
|
@ -13,6 +13,7 @@ from . import product
|
|||
from . import sale
|
||||
from . import invoice_authorization
|
||||
from . import asset
|
||||
from . import payment_term
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -70,6 +71,7 @@ def register():
|
|||
invoice.InvoiceUpdateStart,
|
||||
sale.SaleUpdateStart,
|
||||
purchase.PurchaseUpdateStart,
|
||||
payment_term.PaymentTerm,
|
||||
module='account_col', type_='model')
|
||||
Pool.register(
|
||||
move.AccountMoveSheet,
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.model import fields
|
||||
|
||||
|
||||
class PaymentTerm(metaclass=PoolMeta):
|
||||
'Payment Term'
|
||||
__name__ = 'account.invoice.payment_term'
|
||||
code = fields.Char('Code')
|
|
@ -0,0 +1,17 @@
|
|||
<?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. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="payment_term_view_form">
|
||||
<field name="model">account.invoice.payment_term</field>
|
||||
<field name="inherit" ref='account_invoice.payment_term_view_form'/>
|
||||
<field name="name">payment_term_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="payment_term_view_tree">
|
||||
<field name="model">account.invoice.payment_term</field>
|
||||
<field name="inherit" ref='account_invoice.payment_term_view_tree'/>
|
||||
<field name="name">payment_term_tree</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
|
@ -26,3 +26,4 @@ xml:
|
|||
product.xml
|
||||
invoice_authorization.xml
|
||||
sale.xml
|
||||
payment_term.xml
|
||||
|
|
|
@ -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/field[@name='name']" position="after">
|
||||
<label name="code"/>
|
||||
<field name="code"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -0,0 +1,10 @@
|
|||
<?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='name']"
|
||||
position="after">
|
||||
<field name="code"/>
|
||||
</xpath>
|
||||
</data>
|
Loading…
Reference in New Issue