Add agent to booking

This commit is contained in:
oscar alvarez 2023-09-30 02:45:57 -05:00
parent 7e94d085f3
commit bca31999ae
3 changed files with 5 additions and 2 deletions

View File

@ -144,6 +144,7 @@ class Booking(Workflow, ModelSQL, ModelView):
channel_commission = fields.Function(fields.Numeric('Channel Commission',
digits=(16, 2), depends=['lines']), 'get_channel_commission')
commission = fields.Many2One('commission', 'Commission')
agent = fields.Many2One('commission.agent', 'Agent')
channel_invoice = fields.Many2One('account.invoice', 'Channel Invoice',
states={
'invisible': ~Eval('channel'),
@ -750,7 +751,7 @@ class Booking(Workflow, ModelSQL, ModelView):
for folio in folios:
bk = folio.booking
price_list = bk.price_list
agent_id = bk.channel.agent.id if bk.channel else None
agent_id = bk.channel.agent.id if bk.channel else bk.agent
for ch in folio.charges:
if ch.invoice_line:
continue

View File

@ -1,5 +1,5 @@
[tryton]
version=6.0.102
version=6.0.103
depends:
party
company

View File

@ -65,6 +65,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="currency"/>
<label name="price_list"/>
<field name="price_list" widget="selection"/>
<label name="agent"/>
<field name="agent"/>
<label name="credit_card"/>
<field name="credit_card"/>
<label name="guarantee"/>