diff --git a/__init__.py b/__init__.py index 6ad149f..03e6b65 100644 --- a/__init__.py +++ b/__init__.py @@ -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, diff --git a/agent.py b/agent.py new file mode 100644 index 0000000..2bbb037 --- /dev/null +++ b/agent.py @@ -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') diff --git a/agent.xml b/agent.xml new file mode 100644 index 0000000..f3469ba --- /dev/null +++ b/agent.xml @@ -0,0 +1,13 @@ + + + + + + commission.agent + + agent_form + + + + diff --git a/tryton.cfg b/tryton.cfg index fa6b022..59d4ad0 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -11,3 +11,4 @@ xml: restaurant.xml sale.xml product.xml + agent.xml diff --git a/view/agent_form.xml b/view/agent_form.xml new file mode 100644 index 0000000..455a862 --- /dev/null +++ b/view/agent_form.xml @@ -0,0 +1,9 @@ + + + + + +