Add field Tip

This commit is contained in:
sinergia 2023-07-19 02:04:57 +00:00
parent d0bde61593
commit a118d64c71
4 changed files with 9 additions and 2 deletions

View File

@ -12,4 +12,8 @@ msgstr "Adiciónes"
msgctxt "field:product.template,boms:" msgctxt "field:product.template,boms:"
msgid "Boms" msgid "Boms"
msgstr "Lista de Materiales" msgstr "Lista de Materiales"
msgctxt "field:product.template,tip:"
msgid "Tip"
msgstr "Propina"

View File

@ -9,5 +9,6 @@ class Product(metaclass=PoolMeta):
pizza = fields.Boolean("Pizza") pizza = fields.Boolean("Pizza")
pizza_topping = fields.Boolean("Topping Pizza") pizza_topping = fields.Boolean("Topping Pizza")
tip = fields.Boolean("Tip")
boms = fields.Many2One('production.bom', "Boms", boms = fields.Many2One('production.bom', "Boms",
states={'required': Eval('producible', True)}) states={'required': Eval('producible', True)})

View File

@ -43,7 +43,7 @@ class Sale(metaclass=PoolMeta):
Report = pool.get('sale.customer_order', type='report') Report = pool.get('sale.customer_order', type='report')
context = Transaction().context context = Transaction().context
customer_order = Report.execute(records, context) customer_order = Report.execute(records, context)
raise UserError(str(customer_order))
content = {'content': customer_order[1].decode('utf-8')} content = {'content': customer_order[1].decode('utf-8')}
headers = {"accept": 'application/json', 'Content-Type': 'application/json'} headers = {"accept": 'application/json', 'Content-Type': 'application/json'}
url = "http://localhost:5000/order_kitchen" url = "http://localhost:5000/order_kitchen"

View File

@ -7,6 +7,8 @@
<field name="pizza"/> <field name="pizza"/>
<label name="pizza_topping"/> <label name="pizza_topping"/>
<field name="pizza_topping"/> <field name="pizza_topping"/>
<label name="tip"/>
<field name="tip"/>
<newline/> <newline/>
<label name="boms"/> <label name="boms"/>
<field name="boms" xexpand="1"/> <field name="boms" xexpand="1"/>