Add printer server to shop
This commit is contained in:
parent
7239ebb8c1
commit
57a48e2e37
|
@ -8,6 +8,7 @@ from . import production
|
||||||
from . import product
|
from . import product
|
||||||
from . import invoice
|
from . import invoice
|
||||||
from . import agent
|
from . import agent
|
||||||
|
from . import shop
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
@ -15,11 +16,11 @@ def register():
|
||||||
restaurant.SaleShopTable,
|
restaurant.SaleShopTable,
|
||||||
restaurant.Reservation,
|
restaurant.Reservation,
|
||||||
restaurant.PartyConsumer,
|
restaurant.PartyConsumer,
|
||||||
sale.Shop,
|
|
||||||
sale.Sale,
|
sale.Sale,
|
||||||
sale.SaleForceDraft,
|
sale.SaleForceDraft,
|
||||||
sale.SaleLine,
|
sale.SaleLine,
|
||||||
sale.SaleMove,
|
sale.SaleMove,
|
||||||
|
shop.Shop,
|
||||||
production.Production,
|
production.Production,
|
||||||
product.ProductMixOption,
|
product.ProductMixOption,
|
||||||
product.Product,
|
product.Product,
|
||||||
|
|
7
sale.py
7
sale.py
|
@ -80,7 +80,7 @@ class Sale(metaclass=PoolMeta):
|
||||||
tables = ShopTable.search([('sale', 'in', [s.id for s in sales])])
|
tables = ShopTable.search([('sale', 'in', [s.id for s in sales])])
|
||||||
if tables:
|
if tables:
|
||||||
ShopTable.write(tables, {'sale': None, 'state':'available'})
|
ShopTable.write(tables, {'sale': None, 'state':'available'})
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def transition_pay_(cls, sales_to_pay):
|
def transition_pay_(cls, sales_to_pay):
|
||||||
|
@ -315,11 +315,6 @@ class SaleLine(metaclass=PoolMeta):
|
||||||
production = fields.Many2One('production', 'Production')
|
production = fields.Many2One('production', 'Production')
|
||||||
|
|
||||||
|
|
||||||
class Shop(metaclass=PoolMeta):
|
|
||||||
__name__ = 'sale.shop'
|
|
||||||
tables = fields.One2Many('sale.shop.table', 'shop', 'Tables')
|
|
||||||
|
|
||||||
|
|
||||||
class SaleSquareBoxGlobal(SaleSquareBox):
|
class SaleSquareBoxGlobal(SaleSquareBox):
|
||||||
'Sale Square Box Global'
|
'Sale Square Box Global'
|
||||||
__name__ = 'sale_pos_frontend_rest.sale_square_box_global'
|
__name__ = 'sale_pos_frontend_rest.sale_square_box_global'
|
||||||
|
|
5
sale.xml
5
sale.xml
|
@ -14,11 +14,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
||||||
<field name="inherit" ref="sale.sale_view_form"/>
|
<field name="inherit" ref="sale.sale_view_form"/>
|
||||||
<field name="name">sale_form</field>
|
<field name="name">sale_form</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.ui.view" id="sale_shop_view_form">
|
|
||||||
<field name="model">sale.shop</field>
|
|
||||||
<field name="inherit" ref="sale_shop.sale_shop_view_form"/>
|
|
||||||
<field name="name">sale_shop_form</field>
|
|
||||||
</record>
|
|
||||||
<record model="ir.ui.view" id="sale_line_view_form">
|
<record model="ir.ui.view" id="sale_line_view_form">
|
||||||
<field name="model">sale.line</field>
|
<field name="model">sale.line</field>
|
||||||
<field name="inherit" ref="sale.sale_line_view_form"/>
|
<field name="inherit" ref="sale.sale_line_view_form"/>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
# 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 fields
|
||||||
|
from trytond.pool import PoolMeta
|
||||||
|
|
||||||
|
|
||||||
|
class SaleShop(metaclass=PoolMeta):
|
||||||
|
__name__ = 'sale.shop'
|
||||||
|
tables = fields.One2Many('sale.shop.table', 'shop', 'Tables')
|
||||||
|
local_printer = fields.Char('Local Printer Server',
|
||||||
|
help="Example: http://192.168.0.122:7001")
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part sale_shop module for 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="sale_shop_view_form">
|
||||||
|
<field name="model">sale.shop</field>
|
||||||
|
<field name="inherit" ref="sale_shop.sale_shop_view_form"/>
|
||||||
|
<field name="name">sale_shop_form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
|
@ -2,8 +2,13 @@
|
||||||
<!-- This file is part sale_shop module for Tryton.
|
<!-- This file is part sale_shop module for Tryton.
|
||||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="/form/notebook/page[@id='users']"
|
<xpath expr="/form/notebook/page[@id='general']/field[@name='warehouse']"
|
||||||
position="after">
|
position="after">
|
||||||
|
<label name="local_printer"/>
|
||||||
|
<field name="local_printer"/>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
<xpath expr="/form/notebook/page[@id='users']" position="after">
|
||||||
<page string="Tables" col="4" id="tables">
|
<page string="Tables" col="4" id="tables">
|
||||||
<field name="tables" colspan="4"/>
|
<field name="tables" colspan="4"/>
|
||||||
</page>
|
</page>
|
||||||
|
|
Loading…
Reference in New Issue