Compare commits
24 Commits
0e7694b347
...
7.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c403cf41da | ||
| 6c3052902d | |||
| e2400b75e3 | |||
| cbee1f4815 | |||
| 07390de74a | |||
| 808c94cf47 | |||
| 0382a15ab7 | |||
| 2d15aa389f | |||
| 39351c2640 | |||
| 4b837318e3 | |||
| 50c40c0a1c | |||
| f45043af7e | |||
| cb12fe5e0c | |||
| ee13006322 | |||
| c9e50bb844 | |||
|
|
de95b5c996 | ||
| 3b46ae9c78 | |||
| 2c9bcc82ce | |||
| b8c9db77f4 | |||
|
|
2bf689ef87 | ||
|
|
94279af9b8 | ||
|
|
f6a968535d | ||
| 03d8711ab3 | |||
| d60c932b45 |
@@ -1,5 +1,5 @@
|
||||
from trytond.pool import Pool
|
||||
from . import product, sale, production, invoice
|
||||
from . import product, sale, production, invoice, user, report_close_statement
|
||||
|
||||
__all__ = ['register']
|
||||
|
||||
@@ -10,9 +10,13 @@ def register():
|
||||
invoice.InvoiceLine,
|
||||
sale.Sale,
|
||||
sale.Line,
|
||||
user.User,
|
||||
production.Production,
|
||||
report_close_statement.ReportCloseStatementStart,
|
||||
module='sale_fast_food', type_='model')
|
||||
Pool.register(
|
||||
report_close_statement.PrintReportCloseStatement,
|
||||
module='sale_fast_food', type_='wizard')
|
||||
Pool.register(
|
||||
report_close_statement.CashRegister,
|
||||
module='sale_fast_food', type_='report')
|
||||
|
||||
32
locale/es.po
32
locale/es.po
@@ -37,3 +37,35 @@ msgstr "Bar"
|
||||
msgctxt "model:ir.model.button,string:sale_print_bill_button"
|
||||
msgid "Bill"
|
||||
msgstr "Subtotal"
|
||||
|
||||
msgctxt "field:sale.sale,total_discount:"
|
||||
msgid "Total Discount"
|
||||
msgstr "Total Descuento"
|
||||
|
||||
msgctxt "field:res.user,waiter:"
|
||||
msgid "Waiter"
|
||||
msgstr "Mesero"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_print_cash_register"
|
||||
msgid "Print cash register"
|
||||
msgstr "Imprimir arqueo de caja"
|
||||
|
||||
msgctxt "field:sale.print_cash_register.start,date:"
|
||||
msgid "Date"
|
||||
msgstr "Fecha"
|
||||
|
||||
msgctxt "field:sale.print_cash_register.start,shop:"
|
||||
msgid "Shop"
|
||||
msgstr "Tienda"
|
||||
|
||||
msgctxt "wizard_button:sale.print_cash_register,start,end:"
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
msgctxt "wizard_button:sale.print_cash_register,start,print_cash_register:"
|
||||
msgid "Print Cash Register"
|
||||
msgstr "Imprimir"
|
||||
|
||||
msgctxt "model:ir.action,name:wizard_print_cash_register"
|
||||
msgid "Print cash register"
|
||||
msgstr "Imprimir arqueo de caja"
|
||||
2061
report/close_statement.fodt
Normal file
2061
report/close_statement.fodt
Normal file
File diff suppressed because it is too large
Load Diff
212
report_close_statement.py
Normal file
212
report_close_statement.py
Normal file
@@ -0,0 +1,212 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import ModelView, fields
|
||||
from trytond.wizard import Wizard, StateView, Button, StateReport
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond.report import Report
|
||||
from trytond.exceptions import UserError
|
||||
from decimal import Decimal
|
||||
|
||||
from datetime import date
|
||||
|
||||
|
||||
__all__ = ['ReportCloseStatementStart', 'PrintReportCloseStatement',
|
||||
'CashRegister']
|
||||
|
||||
|
||||
class ReportCloseStatementStart(ModelView):
|
||||
"Vista inicial de reporte de extracto"
|
||||
__name__ = 'sale.print_cash_register.start'
|
||||
|
||||
company = fields.Many2One(
|
||||
'company.company', "Company", readonly=True, required=True)
|
||||
currency = fields.Many2One('currency.currency', 'Currency', required=True)
|
||||
date = fields.Date('Date', required=True)
|
||||
shop = fields.Many2One('sale.shop', 'Shop', required=True)
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company')
|
||||
|
||||
@staticmethod
|
||||
def default_currency():
|
||||
Company = Pool().get('company.company')
|
||||
if Transaction().context.get('company'):
|
||||
company = Company(Transaction().context['company'])
|
||||
return company.currency.id
|
||||
|
||||
@classmethod
|
||||
def default_date(cls):
|
||||
return date.today()
|
||||
|
||||
@classmethod
|
||||
def default_shop(cls):
|
||||
context = Transaction().context
|
||||
shop = context['shop']
|
||||
|
||||
if shop:
|
||||
return shop
|
||||
|
||||
|
||||
class PrintReportCloseStatement(Wizard):
|
||||
"Asistente para imprimir extracto"
|
||||
__name__ = 'sale.print_cash_register'
|
||||
|
||||
start = StateView(
|
||||
'sale.print_cash_register.start',
|
||||
'sale_fast_food.print_cash_register_start_view_form', [
|
||||
Button("Cancel", 'end', 'tryton-cancel'),
|
||||
Button("Print Cash Register",
|
||||
'print_cash_register', 'tryton-ok', default=True)])
|
||||
|
||||
print_cash_register = StateReport('sale.cash_register')
|
||||
|
||||
def do_print_cash_register(self, action):
|
||||
data = {
|
||||
'lang': self.start.company.party.lang,
|
||||
'date': self.start.date,
|
||||
'shop': self.start.shop.id,
|
||||
'currency': self.start.currency.id,
|
||||
}
|
||||
|
||||
return action, data
|
||||
|
||||
def transition_print_cash_register(self):
|
||||
return 'end'
|
||||
|
||||
|
||||
class CashRegister(Report):
|
||||
"Extracto"
|
||||
__name__ = 'sale.cash_register'
|
||||
|
||||
def _get_info_pizzas_sold(lines):
|
||||
pizzas = 0
|
||||
amount_w_tax = 0
|
||||
amount_tip = 0
|
||||
for line in lines:
|
||||
if line.bought_pizza:
|
||||
pizzas += line.quantity
|
||||
amount_w_tax += line.amount_w_tax
|
||||
if line.product and line.product.template.tip:
|
||||
amount_tip += line.amount
|
||||
return {
|
||||
'amount_tip': amount_tip,
|
||||
'amount_w_tax': amount_w_tax,
|
||||
'pizzas': pizzas,
|
||||
}
|
||||
|
||||
def _get_statements_by_date(date):
|
||||
pool = Pool()
|
||||
User = pool.get('res.user')
|
||||
Statement = pool.get('account.statement')
|
||||
user = Transaction().user
|
||||
user = User(user)
|
||||
device = user.sale_device
|
||||
|
||||
if not device:
|
||||
return
|
||||
journals = [j.id for j in device.journals]
|
||||
statements = Statement.search([
|
||||
('journal', 'in', journals),
|
||||
('state', 'in', ['validated', 'posted']),
|
||||
('date', '=', date)
|
||||
])
|
||||
return statements
|
||||
|
||||
def _get_invoices_by_subtype(date, shop):
|
||||
pool = Pool()
|
||||
Invoice = pool.get('account.invoice')
|
||||
Shop = pool.get('sale.shop')
|
||||
fe_pos_subtype = Shop(shop).fe_pos_subtype.id
|
||||
pos_subtype = Shop(shop).pos_subtype.id
|
||||
ranges = {}
|
||||
invoices_fe = Invoice.search([('invoice_date', '=', date),
|
||||
('subtype', '=', fe_pos_subtype)])
|
||||
|
||||
if invoices_fe:
|
||||
ranges['range_fe'] = \
|
||||
[invoices_fe[0].number, invoices_fe[-1].number]
|
||||
|
||||
invoices_pos = Invoice.search([('invoice_date', '=', date),
|
||||
('subtype', '=', pos_subtype)])
|
||||
|
||||
if invoices_pos:
|
||||
ranges['range_pos'] = \
|
||||
[invoices_pos[0].number, invoices_pos[-1].number]
|
||||
|
||||
return ranges
|
||||
|
||||
@classmethod
|
||||
def get_context(cls, records, header, data):
|
||||
report_context = super(
|
||||
CashRegister, cls).get_context(records, header, data)
|
||||
|
||||
pool = Pool()
|
||||
Shop = pool.get('sale.shop')
|
||||
Sale = pool.get('sale.sale')
|
||||
Currency = pool.get('currency.currency')
|
||||
currency = Currency(data['currency'])
|
||||
date = data['date']
|
||||
shop = data['shop']
|
||||
today_sales_domain = [('state', 'in', ['processing', 'done']),
|
||||
('sale_date', '=', date),
|
||||
('shop', '=', shop)]
|
||||
today_sales = Sale.search(today_sales_domain,
|
||||
order=[('id', 'ASC')])
|
||||
|
||||
if not today_sales:
|
||||
raise UserError(str("No se han encontrado ventas para este día."))
|
||||
return
|
||||
untaxed_amount = 0
|
||||
tax_amount = 0
|
||||
total_amount = 0
|
||||
total_pizzas = 0
|
||||
amount_w_tax_pizzas = []
|
||||
amount_tips = []
|
||||
for sale in today_sales:
|
||||
untaxed_amount += sale.untaxed_amount
|
||||
tax_amount += sale.tax_amount
|
||||
info_pizzas_sold = cls._get_info_pizzas_sold(sale.lines)
|
||||
total_pizzas += info_pizzas_sold['pizzas']
|
||||
amount_w_tax_pizzas.append(info_pizzas_sold['amount_w_tax'])
|
||||
amount_tips.append(info_pizzas_sold['amount_tip'])
|
||||
total_amount += sale.total_amount
|
||||
|
||||
untaxed_amount_for_tax = round((tax_amount * 100)/Decimal('8.0'), 2)
|
||||
statements = cls._get_statements_by_date(data['date'])
|
||||
|
||||
if statements:
|
||||
report_context['statements'] = [{
|
||||
'name': statement.journal.name,
|
||||
'start_balance': statement.start_balance,
|
||||
'end_balance': statement.end_balance,
|
||||
'total_amount': sum(
|
||||
(line.amount for line in statement.lines
|
||||
if line.description), Decimal(0))
|
||||
} for statement in statements]
|
||||
report_context['total_statements'] = sum(
|
||||
[s['total_amount'] for s in report_context['statements']])
|
||||
|
||||
ranges = cls._get_invoices_by_subtype(date, shop)
|
||||
ranges_keys = ranges.keys()
|
||||
if 'range_fe' in ranges_keys:
|
||||
report_context['range_fe'] = ranges['range_fe']
|
||||
else:
|
||||
report_context['range_fe'] = []
|
||||
if 'range_pos' in ranges:
|
||||
report_context['range_pos'] = ranges['range_pos']
|
||||
else:
|
||||
report_context['range_pos'] = []
|
||||
|
||||
report_context['shop'] = Shop(shop).name
|
||||
report_context['date'] = date
|
||||
report_context['currency'] = currency
|
||||
report_context['amount_w_tax_pizzas'] = sum(amount_w_tax_pizzas)
|
||||
report_context['tips'] = sum(amount_tips)
|
||||
report_context['untaxed_amount'] = untaxed_amount
|
||||
report_context['untaxed_amount_for_tax'] = untaxed_amount_for_tax
|
||||
report_context['tax_amount'] = tax_amount
|
||||
report_context['total_amount'] = total_amount
|
||||
report_context['number_pizzas_sold'] = total_pizzas
|
||||
return report_context
|
||||
28
report_close_statement.xml
Normal file
28
report_close_statement.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.action.report" id="report_close_statement">
|
||||
<field name="name">Close statement</field>
|
||||
<field name="model"></field>
|
||||
<field name="report_name">sale.cash_register</field>
|
||||
<field name="report">sale_fast_food/report/close_statement.fodt</field>
|
||||
<field name="template_extension">odt</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="print_cash_register_start_view_form">
|
||||
<field name="model">sale.print_cash_register.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">print_cash_register_start_form</field>
|
||||
</record>
|
||||
<record model="ir.action.wizard" id="wizard_print_cash_register">
|
||||
<field name="name">Print cash register</field>
|
||||
<field name="wiz_name">sale.print_cash_register</field>
|
||||
</record>
|
||||
<menuitem
|
||||
parent="sale.menu_sale"
|
||||
action="wizard_print_cash_register"
|
||||
id="menu_print_cash_register"
|
||||
icon="tryton-print"/>
|
||||
</data>
|
||||
</tryton>
|
||||
125
sale.py
125
sale.py
@@ -1,6 +1,8 @@
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.model import ModelView, fields
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from decimal import Decimal
|
||||
|
||||
import requests
|
||||
import json
|
||||
@@ -11,6 +13,11 @@ class Sale(metaclass=PoolMeta):
|
||||
__name__ = 'sale.sale'
|
||||
|
||||
pizza_number = fields.Integer("Number pizza")
|
||||
total_discount = fields.Function(
|
||||
Monetary(
|
||||
"Total Discount", digits='currency', currency='currency'),
|
||||
'get_amount')
|
||||
total_discount_cache = fields.Numeric("Total Discount cache", digits='currency')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
@@ -27,6 +34,83 @@ class Sale(metaclass=PoolMeta):
|
||||
def default_pizza_number(cls):
|
||||
return 0
|
||||
|
||||
@fields.depends('lines', 'currency', methods=['get_tax_amount'])
|
||||
def on_change_lines(self):
|
||||
self.untaxed_amount = Decimal('0.0')
|
||||
self.tax_amount = Decimal('0.0')
|
||||
self.total_amount = Decimal('0.0')
|
||||
self.total_discount = Decimal('0.0')
|
||||
|
||||
if self.lines:
|
||||
for line in self.lines:
|
||||
self.untaxed_amount += getattr(line, 'amount', None) or 0
|
||||
self.tax_amount = self.get_tax_amount()
|
||||
if self.currency:
|
||||
self.untaxed_amount = self.currency.round(self.untaxed_amount)
|
||||
self.tax_amount = self.currency.round(self.tax_amount)
|
||||
self.total_amount = self.untaxed_amount + self.tax_amount
|
||||
if self.currency:
|
||||
self.total_discount = self.currency.round(self.total_discount)
|
||||
self.total_amount = self.currency.round(self.total_amount)
|
||||
|
||||
@classmethod
|
||||
def store_cache(cls, sales):
|
||||
for sale in sales:
|
||||
sale.untaxed_amount_cache = sale.untaxed_amount
|
||||
sale.tax_amount_cache = sale.tax_amount
|
||||
sale.total_amount_cache = sale.total_amount
|
||||
sale.total_discount_cache = sale.total_discount
|
||||
cls.save(sales)
|
||||
|
||||
@classmethod
|
||||
def get_amount(cls, sales, names):
|
||||
untaxed_amount = {}
|
||||
tax_amount = {}
|
||||
total_amount = {}
|
||||
total_discount = {}
|
||||
if {'tax_amount', 'total_amount'} & set(names):
|
||||
compute_taxes = True
|
||||
else:
|
||||
compute_taxes = False
|
||||
# Sort cached first and re-instanciate to optimize cache management
|
||||
sales = sorted(sales, key=lambda s: s.state in cls._states_cached,
|
||||
reverse=True)
|
||||
sales = cls.browse(sales)
|
||||
for sale in sales:
|
||||
if (sale.state in cls._states_cached
|
||||
and sale.untaxed_amount_cache is not None
|
||||
and sale.tax_amount_cache is not None
|
||||
and sale.total_amount_cache is not None
|
||||
and sale.total_discount_cache is not None):
|
||||
untaxed_amount[sale.id] = sale.untaxed_amount_cache
|
||||
total_discount[sale.id] = sale.total_discount_cache
|
||||
if compute_taxes:
|
||||
tax_amount[sale.id] = sale.tax_amount_cache
|
||||
total_amount[sale.id] = sale.total_amount_cache
|
||||
else:
|
||||
untaxed_amount[sale.id] = round(sum(
|
||||
(line.amount for line in sale.lines
|
||||
if line.type == 'line'), Decimal(0)),2)
|
||||
total_discount[sale.id] = round(sum(
|
||||
(line.discount_amount for line in sale.lines
|
||||
if line.type == 'line'), Decimal(0)), 2)
|
||||
if compute_taxes:
|
||||
tax_amount[sale.id] = sale.get_tax_amount()
|
||||
total_amount[sale.id] = (
|
||||
untaxed_amount[sale.id] + tax_amount[sale.id])
|
||||
|
||||
result = {
|
||||
'untaxed_amount': untaxed_amount,
|
||||
'tax_amount': tax_amount,
|
||||
'total_amount': total_amount,
|
||||
'total_discount': total_discount,
|
||||
}
|
||||
for key in list(result.keys()):
|
||||
if key not in names:
|
||||
del result[key]
|
||||
|
||||
return result
|
||||
|
||||
def get_invoice_resolution(subtype):
|
||||
if subtype:
|
||||
resolution = subtype.sequence.invoice_resolution
|
||||
@@ -34,7 +118,8 @@ class Sale(metaclass=PoolMeta):
|
||||
return dict([
|
||||
('resolution_number', resolution.resolution_number),
|
||||
('resolution_prefix', resolution.prefix),
|
||||
('valid_date_time_from', str(resolution.valid_date_time_from)),
|
||||
('valid_date_time_from', str(
|
||||
resolution.valid_date_time_from)),
|
||||
('valid_date_time_to', str(resolution.valid_date_time_to)),
|
||||
('from_number', resolution.from_number),
|
||||
('to_number', resolution.to_number)])
|
||||
@@ -85,9 +170,11 @@ class Sale(metaclass=PoolMeta):
|
||||
if line.type != 'title' and line.taxes else None
|
||||
} for line in record.lines]
|
||||
|
||||
data["total_discount"] = str(round(record.total_discount,2))
|
||||
data["untaxed_amount"] = str(record.untaxed_amount)
|
||||
data["tax_amount"] = str(record.tax_amount)
|
||||
data["total"] = str(record.total_amount)
|
||||
data["state"] = "SUBTOTAL" if record.state == "draft" else "CUENTA FINAL"
|
||||
|
||||
if record.payments:
|
||||
data['payments'] = [{
|
||||
@@ -109,16 +196,17 @@ class Sale(metaclass=PoolMeta):
|
||||
data["city"] = report.invoice_address.subdivision_municipality.name
|
||||
data["zone"] = report.zone.name if report.zone else ""
|
||||
data["table"] = report.table.name if report.table else ""
|
||||
data["lines"] = [{
|
||||
'type': line.type,
|
||||
"product": line.product.name if line.type != 'title' else None,
|
||||
"quantity": line.quantity if line.type != 'title' else None,
|
||||
"uom": line.unit.name if line.type != 'title' else None}
|
||||
for line in report.lines]
|
||||
# data["lines"] = [{
|
||||
# 'type': line.type,
|
||||
# "product": line.product.name if line.type != 'title' else None,
|
||||
# "quantity": line.quantity if line.type != 'title' else None,
|
||||
# "uom": line.unit.name if line.type != 'title' else None}
|
||||
# for line in report.lines]
|
||||
|
||||
data["lines"] = [{
|
||||
'type': line.type,
|
||||
"product": line.product.name if line.type != 'title' else None,
|
||||
"description": line.description if line.type != 'title' else None,
|
||||
"quantity": line.quantity if line.type != 'title' else None,
|
||||
"uom": line.unit.name if line.type != 'title' else None}
|
||||
for line in report.lines if not line.impreso]
|
||||
@@ -163,7 +251,10 @@ class Sale(metaclass=PoolMeta):
|
||||
|
||||
url = f"http://{printer.api.ip_address}/print_bill"
|
||||
bill = cls.report_bill(records)
|
||||
user_name = context['employee.rec_name']
|
||||
if 'employee.rec_name' in context.keys():
|
||||
user_name = context['employee.rec_name']
|
||||
else:
|
||||
user_name = ""
|
||||
content = {"content": str(json.dumps(bill)),
|
||||
"ip_printer": str(printer.ip_address),
|
||||
"user_name": user_name}
|
||||
@@ -189,7 +280,10 @@ class Sale(metaclass=PoolMeta):
|
||||
|
||||
url = f"http://{printer.api.ip_address}/order_kitchen"
|
||||
customer_order = cls.report_customer_order(records)
|
||||
user_name = context['employee.rec_name']
|
||||
if 'employee.rec_name' in context.keys():
|
||||
user_name = context['employee.rec_name']
|
||||
else:
|
||||
user_name = ""
|
||||
content = {"content": str(json.dumps(customer_order)),
|
||||
"ip_printer": str(printer.ip_address),
|
||||
"user_name": user_name}
|
||||
@@ -217,7 +311,10 @@ class Sale(metaclass=PoolMeta):
|
||||
url = f"http://{printer.api.ip_address}/order_bar"
|
||||
customer_order = cls.report_customer_order(records)
|
||||
cls.impreso([record])
|
||||
user_name = context['employee.rec_name']
|
||||
if 'employee.rec_name' in context.keys():
|
||||
user_name = context['employee.rec_name']
|
||||
else:
|
||||
user_name = ""
|
||||
content = {"content": str(json.dumps(customer_order)),
|
||||
"ip_printer": str(printer.ip_address),
|
||||
"user_name": user_name}
|
||||
@@ -233,6 +330,7 @@ class Line(metaclass=PoolMeta):
|
||||
|
||||
pizza = fields.Integer("Pizza")
|
||||
impreso = fields.Boolean("Impreso")
|
||||
bought_pizza = fields.Boolean("Sold pizza")
|
||||
|
||||
@fields.depends('product', 'unit', 'sale',
|
||||
'_parent_sale.party', '_parent_sale.invoice_party',
|
||||
@@ -243,9 +341,12 @@ class Line(metaclass=PoolMeta):
|
||||
super(Line, self).on_change_product()
|
||||
if self.product and self.product.pizza:
|
||||
self.pizza = self.sale.pizza_number
|
||||
self.bought_pizza = True
|
||||
else:
|
||||
self.bought_pizza = False
|
||||
|
||||
def get_production(self):
|
||||
def get_production(self, product_quantities ):
|
||||
"Return production for the sale line"
|
||||
Production = super(Line, self).get_production()
|
||||
Production = super(Line, self).get_production(product_quantities)
|
||||
|
||||
return Production
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
[tryton]
|
||||
version=6.4
|
||||
version=7.0.0
|
||||
depends:
|
||||
ir
|
||||
res
|
||||
product
|
||||
sale
|
||||
sale_supply_production
|
||||
#sale_printer
|
||||
production
|
||||
account_invoice
|
||||
sale_shop
|
||||
xml:
|
||||
product.xml
|
||||
sale.xml
|
||||
user.xml
|
||||
report_close_statement.xml
|
||||
8
user.py
Normal file
8
user.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from trytond.model import fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
|
||||
class User(metaclass=PoolMeta):
|
||||
"User"
|
||||
__name__ = 'res.user'
|
||||
|
||||
waiter = fields.Boolean('Waiter')
|
||||
13
user.xml
Normal file
13
user.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="user_view_form" >
|
||||
<field name="name">user_form</field>
|
||||
<field name="inherit" ref="res.user_view_form"/>
|
||||
<field name="model">res.user</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
15
view/print_cash_register_start_form.xml
Normal file
15
view/print_cash_register_start_form.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form col="6">
|
||||
<label name="company"/>
|
||||
<field name="company"/>
|
||||
<label name="currency"/>
|
||||
<field name="currency"/>
|
||||
<newline/>
|
||||
<label name="date"/>
|
||||
<field name="date"/>
|
||||
|
||||
<label name="shop"/>
|
||||
<field name="shop"/>
|
||||
</form>
|
||||
@@ -12,4 +12,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
</group>
|
||||
<newline/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@id='sale']/group[@id='amount']/field[@name='tax_amount']" position="after">
|
||||
<label name="total_discount"/>
|
||||
<field name="total_discount"/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
||||
@@ -7,5 +7,7 @@
|
||||
<field name="pizza"/>
|
||||
<label name="impreso"/>
|
||||
<field name="impreso"/>
|
||||
<label name="bought_pizza"/>
|
||||
<field name="bought_pizza"/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
||||
9
view/user_form.xml
Normal file
9
view/user_form.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<label name="waiter"/>
|
||||
<field name="waiter"/>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in New Issue
Block a user