fix: Se corrigen errores en 6.8

This commit is contained in:
sinergia 2023-12-11 20:41:19 -05:00
parent 741d8f4ad3
commit eb934a3de9
4 changed files with 68 additions and 68 deletions

View File

@ -43,10 +43,11 @@ class ReportCloseStatementStart(ModelView):
@classmethod @classmethod
def default_shop(cls): def default_shop(cls):
context = Transaction().context context = Transaction().context
if context:
shop = context['shop'] shop = context['shop']
if shop: if shop:
return shop return shop
return
class PrintReportCloseStatement(Wizard): class PrintReportCloseStatement(Wizard):
@ -173,7 +174,7 @@ class CashRegister(Report):
amount_tips.append(info_pizzas_sold['amount_tip']) amount_tips.append(info_pizzas_sold['amount_tip'])
total_amount += sale.total_amount 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']) statements = cls._get_statements_by_date(data['date'])
if statements: if statements:

View File

@ -126,10 +126,6 @@ class Sale(metaclass=PoolMeta):
@classmethod @classmethod
def get_invoice(cls, record): 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: if record.state != 'draft' and record.invoices:
invoice = record.invoices[0] invoice = record.invoices[0]
data = {} data = {}

View File

@ -2,6 +2,7 @@
<!--This file file is part of Tryton. The COPYRIGHT file at the top level <!--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. --> of this repository contains the full copyright notices and license terms. -->
<tryton> <tryton>
<data>
<record model="ir.ui.view" id="sale_view_tree"> <record model="ir.ui.view" id="sale_view_tree">
<field name="model">sale.sale</field> <field name="model">sale.sale</field>
<field name="inherit" ref="sale.sale_view_tree"/> <field name="inherit" ref="sale.sale_view_tree"/>
@ -53,4 +54,5 @@
<field name="model">sale.sale,-1</field> <field name="model">sale.sale,-1</field>
<field name="action" ref="report_customer_order"/> <field name="action" ref="report_customer_order"/>
</record> </record>
</data>
</tryton> </tryton>

View File

@ -12,7 +12,8 @@ this repository contains the full copyright notices and license terms. -->
</group> </group>
<newline/> <newline/>
</xpath> </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"/> <label name="total_discount"/>
<field name="total_discount"/> <field name="total_discount"/>
</xpath> </xpath>