Fix
This commit is contained in:
parent
42850d3cd6
commit
3a3cb446ac
|
@ -174,6 +174,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
|||
('cancelled', 'offer'),
|
||||
('confirmed', 'cancelled'),
|
||||
('confirmed', 'not_show'),
|
||||
('confirmed', 'finished'),
|
||||
('not_show', 'confirmed'),
|
||||
))
|
||||
cls._buttons.update({
|
||||
|
@ -188,7 +189,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
|||
['cancelled', 'not_show', 'finished'])
|
||||
},
|
||||
'offer': {
|
||||
'invisible': Eval('state').in_(['offer', 'confirmed'])
|
||||
'invisible': Eval('state').in_(['offer', 'finished'])
|
||||
},
|
||||
'confirm': {
|
||||
'invisible': ~Eval('state').in_(['offer', 'not_show'])
|
||||
|
@ -234,9 +235,8 @@ class Booking(Workflow, ModelSQL, ModelView):
|
|||
default = {}
|
||||
default = default.copy()
|
||||
default['number'] = None
|
||||
default['state'] = 'offer'
|
||||
default['booking_date'] = datetime.now()
|
||||
default['moves'] = None
|
||||
default['payments'] = None
|
||||
return super(Booking, cls).copy(bookings, default=default)
|
||||
|
||||
def get_stock_moves(self, name=None):
|
||||
|
@ -661,6 +661,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
|||
@classmethod
|
||||
def _get_invoice_line(cls, invoice, line, record=None):
|
||||
product = line['product']
|
||||
print(' line taxes....', line['taxes'])
|
||||
new_line = {
|
||||
'type': 'line',
|
||||
'invoice': invoice.id,
|
||||
|
@ -672,7 +673,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
|||
'product': product.id,
|
||||
'party': invoice.party.id,
|
||||
'description': line['description'],
|
||||
'taxes': line['taxes'],
|
||||
'taxes': [('add', line['taxes'])],
|
||||
'origin': line['origin'],
|
||||
}
|
||||
# if not line['taxes_exception']:
|
||||
|
|
|
@ -30,11 +30,10 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="price_list" widget="selection"/>
|
||||
<label name="payment_term"/>
|
||||
<field name="payment_term" widget="selection"/>
|
||||
<newline />
|
||||
<button name="do_payment" colspan="2" string="Pay / Advance" icon="tryton-currency"/>
|
||||
<button name="select_rooms" colspan="2" string="Rooms" icon="tryton-board"/>
|
||||
<button name="send_email" string="Send Email" icon="tryton-email"/>
|
||||
<group col="2" id="taxes_exception">
|
||||
<group col="5" id="actions_taxes" colspan="6">
|
||||
<button name="do_payment" string="Pay / Advance" icon="tryton-currency"/>
|
||||
<button name="select_rooms" string="Rooms" icon="tryton-board"/>
|
||||
<button name="send_email" string="Send Email" icon="tryton-email"/>
|
||||
<label name="taxes_exception"/>
|
||||
<field name="taxes_exception"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue