mirror of
https://bitbucket.org/presik/trytonpsk-hotel.git
synced 2023-12-14 07:52:52 +01:00
Fix
This commit is contained in:
parent
7ec8d6fc62
commit
a681d1c188
1 changed files with 16 additions and 5 deletions
21
folio.py
21
folio.py
|
@ -1600,7 +1600,18 @@ class FolioCharge(Workflow, ModelSQL, ModelView):
|
|||
def default_kind():
|
||||
return 'product'
|
||||
|
||||
@staticmethod
|
||||
@staticmethod self.description = self.product.template.name
|
||||
# FIXME
|
||||
# if not self.folio.taxes_exception:
|
||||
# self.taxes = [
|
||||
# tax.id for tax in self.product.customer_taxes_used
|
||||
# ]
|
||||
self.taxes = [
|
||||
tax.id for tax in self.product.customer_taxes_used
|
||||
]
|
||||
|
||||
def get_move_line(self, account, party, amount):
|
||||
debit = credit = _ZERO
|
||||
def default_status():
|
||||
return 'pending'
|
||||
|
||||
|
@ -1672,16 +1683,16 @@ class FolioCharge(Workflow, ModelSQL, ModelView):
|
|||
cls.create_sales(records)
|
||||
|
||||
@fields.depends('unit_price', 'folio', 'product', 'description', 'taxes',
|
||||
'_parent_folio.main_guest', 'folio.taxes_exception')
|
||||
'_parent_folio.main_guest')
|
||||
def on_change_product(self):
|
||||
if self.product:
|
||||
self.unit_price = round(self.product.template.list_price, 2)
|
||||
self.description = self.product.template.name
|
||||
# FIXME
|
||||
# if not self.folio.taxes_exception:
|
||||
# self.taxes = [
|
||||
# tax.id for tax in self.product.customer_taxes_used
|
||||
# ]
|
||||
self.taxes = [
|
||||
tax.id for tax in self.product.customer_taxes_used
|
||||
]
|
||||
|
||||
def get_move_line(self, account, party, amount):
|
||||
debit = credit = _ZERO
|
||||
|
|
Loading…
Reference in a new issue