Add agent
This commit is contained in:
parent
77e8ce7f3a
commit
294afae0e0
|
@ -3,6 +3,7 @@
|
|||
from trytond.pool import Pool
|
||||
from . import sale
|
||||
from . import dash
|
||||
from . import party
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -11,4 +12,5 @@ def register():
|
|||
sale.AppDelivery,
|
||||
sale.AppSaleOrder,
|
||||
dash.DashApp,
|
||||
party.Party,
|
||||
module='dash_sale', type_='model')
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# 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.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
|
||||
class Party(metaclass=PoolMeta):
|
||||
__name__ = 'party.party'
|
||||
agent = fields.Many2One('commission.agent', 'Agent')
|
|
@ -0,0 +1,12 @@
|
|||
<?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="party_view_form">
|
||||
<field name="model">party.party</field>
|
||||
<field name="inherit" ref="party.party_view_form"/>
|
||||
<field name="name">party_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
|
@ -11,3 +11,4 @@ depends:
|
|||
dash
|
||||
xml:
|
||||
sale.xml
|
||||
party.xml
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?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/notebook/page[@id='sale']/field[@name='sale_price_list']"
|
||||
position="after">
|
||||
<label name="zone"/>
|
||||
<field name="zone"/>
|
||||
</xpath>
|
||||
|
||||
<xpath
|
||||
expr="/form/notebook/page[@id='sale']/field[@name='sale_price_list']"
|
||||
position="after">
|
||||
<label name="agent"/>
|
||||
<field name="agent"/>
|
||||
</xpath>
|
||||
</data>
|
Loading…
Reference in New Issue