Add agent to booking
This commit is contained in:
parent
7e94d085f3
commit
bca31999ae
|
@ -144,6 +144,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
channel_commission = fields.Function(fields.Numeric('Channel Commission',
|
channel_commission = fields.Function(fields.Numeric('Channel Commission',
|
||||||
digits=(16, 2), depends=['lines']), 'get_channel_commission')
|
digits=(16, 2), depends=['lines']), 'get_channel_commission')
|
||||||
commission = fields.Many2One('commission', 'Commission')
|
commission = fields.Many2One('commission', 'Commission')
|
||||||
|
agent = fields.Many2One('commission.agent', 'Agent')
|
||||||
channel_invoice = fields.Many2One('account.invoice', 'Channel Invoice',
|
channel_invoice = fields.Many2One('account.invoice', 'Channel Invoice',
|
||||||
states={
|
states={
|
||||||
'invisible': ~Eval('channel'),
|
'invisible': ~Eval('channel'),
|
||||||
|
@ -750,7 +751,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
for folio in folios:
|
for folio in folios:
|
||||||
bk = folio.booking
|
bk = folio.booking
|
||||||
price_list = bk.price_list
|
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:
|
for ch in folio.charges:
|
||||||
if ch.invoice_line:
|
if ch.invoice_line:
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=6.0.102
|
version=6.0.103
|
||||||
depends:
|
depends:
|
||||||
party
|
party
|
||||||
company
|
company
|
||||||
|
|
|
@ -65,6 +65,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="currency"/>
|
<field name="currency"/>
|
||||||
<label name="price_list"/>
|
<label name="price_list"/>
|
||||||
<field name="price_list" widget="selection"/>
|
<field name="price_list" widget="selection"/>
|
||||||
|
<label name="agent"/>
|
||||||
|
<field name="agent"/>
|
||||||
<label name="credit_card"/>
|
<label name="credit_card"/>
|
||||||
<field name="credit_card"/>
|
<field name="credit_card"/>
|
||||||
<label name="guarantee"/>
|
<label name="guarantee"/>
|
||||||
|
|
Loading…
Reference in New Issue