minor fix add field user agent

This commit is contained in:
wilson gomez 2021-08-20 14:59:59 -05:00
parent 6efeccec58
commit 914d6ca126
5 changed files with 36 additions and 0 deletions

View File

@ -8,6 +8,7 @@ from . import production
from . import product
from . import invoice
from . import party
from . import agent
def register():
@ -25,6 +26,7 @@ def register():
product.Product,
invoice.InvoiceLine,
party.Party,
agent.Agent,
module='sale_pos_frontend_rest', type_='model')
Pool.register(
sale.SaleForceDraft,

11
agent.py Normal file
View File

@ -0,0 +1,11 @@
# 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 __future__ import unicode_literals
from decimal import Decimal
from trytond.pool import PoolMeta
from trytond.model import fields, ModelSQL
class Agent(metaclass=PoolMeta):
__name__ = 'commission.agent'
user = fields.Many2One('res.user', 'user')

13
agent.xml Normal file
View File

@ -0,0 +1,13 @@
<?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="agent_view_form">
<field name="model">commission.agent</field>
<field name="inherit" ref="commission.agent_view_form"/>
<field name="name">agent_form</field>
</record>
</data>
</tryton>

View File

@ -11,3 +11,4 @@ xml:
restaurant.xml
sale.xml
product.xml
agent.xml

9
view/agent_form.xml Normal file
View File

@ -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='plan']" position="after">
<label name="user"/>
<field name="user"/>
</xpath>
</data>