From a118d64c71a536ef6577e026a8cc602f7f1cafc8 Mon Sep 17 00:00:00 2001 From: sinergia Date: Wed, 19 Jul 2023 02:04:57 +0000 Subject: [PATCH] Add field Tip --- locale/es.po | 6 +++++- product.py | 1 + sale.py | 2 +- view/product_form.xml | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/locale/es.po b/locale/es.po index 72b796d..abf3b26 100644 --- a/locale/es.po +++ b/locale/es.po @@ -12,4 +12,8 @@ msgstr "Adiciónes" msgctxt "field:product.template,boms:" msgid "Boms" -msgstr "Lista de Materiales" \ No newline at end of file +msgstr "Lista de Materiales" + +msgctxt "field:product.template,tip:" +msgid "Tip" +msgstr "Propina" diff --git a/product.py b/product.py index b89832e..e7670ca 100644 --- a/product.py +++ b/product.py @@ -9,5 +9,6 @@ class Product(metaclass=PoolMeta): pizza = fields.Boolean("Pizza") pizza_topping = fields.Boolean("Topping Pizza") + tip = fields.Boolean("Tip") boms = fields.Many2One('production.bom', "Boms", states={'required': Eval('producible', True)}) diff --git a/sale.py b/sale.py index 1fe4d69..fe5aa02 100644 --- a/sale.py +++ b/sale.py @@ -43,7 +43,7 @@ class Sale(metaclass=PoolMeta): Report = pool.get('sale.customer_order', type='report') context = Transaction().context customer_order = Report.execute(records, context) - + raise UserError(str(customer_order)) content = {'content': customer_order[1].decode('utf-8')} headers = {"accept": 'application/json', 'Content-Type': 'application/json'} url = "http://localhost:5000/order_kitchen" diff --git a/view/product_form.xml b/view/product_form.xml index fa7aede..b9698f1 100644 --- a/view/product_form.xml +++ b/view/product_form.xml @@ -7,6 +7,8 @@