fix: Se corrigen errores en 6.8
This commit is contained in:
parent
741d8f4ad3
commit
eb934a3de9
@ -43,10 +43,11 @@ class ReportCloseStatementStart(ModelView):
|
||||
@classmethod
|
||||
def default_shop(cls):
|
||||
context = Transaction().context
|
||||
if context:
|
||||
shop = context['shop']
|
||||
|
||||
if shop:
|
||||
return shop
|
||||
return
|
||||
|
||||
|
||||
class PrintReportCloseStatement(Wizard):
|
||||
@ -173,7 +174,7 @@ class CashRegister(Report):
|
||||
amount_tips.append(info_pizzas_sold['amount_tip'])
|
||||
total_amount += sale.total_amount
|
||||
|
||||
untaxed_amount_for_tax = round((tax_amount * 100)/Decimal('8.0'), 2)
|
||||
untaxed_amount_for_tax = round((tax_amount * 100) / Decimal('8.0'), 2)
|
||||
statements = cls._get_statements_by_date(data['date'])
|
||||
|
||||
if statements:
|
||||
|
4
sale.py
4
sale.py
@ -126,10 +126,6 @@ class Sale(metaclass=PoolMeta):
|
||||
|
||||
@classmethod
|
||||
def get_invoice(cls, record):
|
||||
pool = Pool()
|
||||
ctx = Transaction().context
|
||||
Shop = pool.get('sale.shop')
|
||||
shop = Shop.search([('id', '=', ctx["shop"])])[0]
|
||||
if record.state != 'draft' and record.invoices:
|
||||
invoice = record.invoices[0]
|
||||
data = {}
|
||||
|
2
sale.xml
2
sale.xml
@ -2,6 +2,7 @@
|
||||
<!--This file file is part of Tryton. The COPYRIGHT file at the top level
|
||||
of this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="sale_view_tree">
|
||||
<field name="model">sale.sale</field>
|
||||
<field name="inherit" ref="sale.sale_view_tree"/>
|
||||
@ -53,4 +54,5 @@
|
||||
<field name="model">sale.sale,-1</field>
|
||||
<field name="action" ref="report_customer_order"/>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
|
@ -12,7 +12,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
</group>
|
||||
<newline/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@id='sale']/group[@id='amount']/field[@name='tax_amount']" position="after">
|
||||
<xpath expr="/form/notebook/page[@id='sale']/group[@id='amount']/field[@name='tax_amount']"
|
||||
position="after">
|
||||
<label name="total_discount"/>
|
||||
<field name="total_discount"/>
|
||||
</xpath>
|
||||
|
Loading…
Reference in New Issue
Block a user