fix: Se corrigen errores en 6.8
This commit is contained in:
parent
741d8f4ad3
commit
eb934a3de9
@ -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):
|
||||||
|
4
sale.py
4
sale.py
@ -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 = {}
|
||||||
|
2
sale.xml
2
sale.xml
@ -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>
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user