Error Bug

This commit is contained in:
sinergia 2023-07-27 07:33:36 -05:00
parent 2ab5993a90
commit 693f2d2e04

View File

@ -69,7 +69,7 @@ class Sale(metaclass=PoolMeta):
shop = Shop.search([('id', '=', ctx["shop"])])[0] shop = Shop.search([('id', '=', ctx["shop"])])[0]
data["shop_name"] = shop.name data["shop_name"] = shop.name
data["shop_address"] = shop.address.street data["shop_address"] = shop.address.street
data["user"] = user.name #data["user"] = user.name
data['invoice'] = cls.get_invoice(record) data['invoice'] = cls.get_invoice(record)
data["party"] = record.party.name data["party"] = record.party.name
data["tax_identifier_type"] = record.party.tax_identifier.type_string data["tax_identifier_type"] = record.party.tax_identifier.type_string
@ -106,7 +106,8 @@ class Sale(metaclass=PoolMeta):
User = pool.get('res.user') User = pool.get('res.user')
data = {} data = {}
user = User(Transaction().user) user = User(Transaction().user)
data["user"] = user.name #raise UserError(str(Transaction().user))
#data["user"] = user.name
data["party"] = report.party.name data["party"] = report.party.name
data["tax_identifier_type"] = report.party.tax_identifier.type_string data["tax_identifier_type"] = report.party.tax_identifier.type_string
data["tax_identifier_code"] = report.party.tax_identifier.code data["tax_identifier_code"] = report.party.tax_identifier.code
@ -159,7 +160,8 @@ class Sale(metaclass=PoolMeta):
def kitchen(cls, records): def kitchen(cls, records):
pool = Pool() pool = Pool()
context = Transaction().context context = Transaction().context
shop = context['shop'] #shop = context['shop']
shop = 1
Printer = pool.get('sale.printer') Printer = pool.get('sale.printer')
printers = Printer.search([('zone', '=', 'kitchen'), ('shop', '=', shop)]) printers = Printer.search([('zone', '=', 'kitchen'), ('shop', '=', shop)])
if not printers: if not printers: