Fix
This commit is contained in:
parent
e79b0c6851
commit
dadc4ff011
|
@ -13,6 +13,7 @@ def register():
|
|||
sale.AppSaleOrder,
|
||||
sale.AppTakeOrder,
|
||||
sale.AppOrderViewer,
|
||||
sale.AppSelfServiceSale,
|
||||
dash.DashApp,
|
||||
product.Product,
|
||||
module='dash_sale', type_='model')
|
||||
|
|
5
dash.py
5
dash.py
|
@ -13,7 +13,9 @@ class DashApp(metaclass=PoolMeta):
|
|||
'dash.app.delivery',
|
||||
'dash.app.sale_order',
|
||||
'dash.app.take_order',
|
||||
'dash.app.order_viewer'])
|
||||
'dash.app.order_viewer',
|
||||
'dash.app.self_service_sale',
|
||||
])
|
||||
return origins
|
||||
|
||||
@classmethod
|
||||
|
@ -24,5 +26,6 @@ class DashApp(metaclass=PoolMeta):
|
|||
('sale_order', 'Sale Order'),
|
||||
('take_order', 'Take Order'),
|
||||
('order_viewer', 'Order Viewer'),
|
||||
('self_service_sale', 'Self-Service Sale'),
|
||||
])
|
||||
return options
|
||||
|
|
9
party.py
9
party.py
|
@ -1,9 +0,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.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
|
||||
class Party(metaclass=PoolMeta):
|
||||
__name__ = 'party.party'
|
||||
agent = fields.Many2One('commission.agent', 'Agent')
|
12
party.xml
12
party.xml
|
@ -1,12 +0,0 @@
|
|||
<?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="party_view_form">
|
||||
<field name="model">party.party</field>
|
||||
<field name="inherit" ref="party.party_view_form"/>
|
||||
<field name="name">party_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
14
sale.py
14
sale.py
|
@ -466,3 +466,17 @@ class AppSaleOrder(ModelSQL, ModelView):
|
|||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company') or None
|
||||
|
||||
|
||||
class AppSelfServiceSale(ModelSQL, ModelView):
|
||||
'App Self Service Sale'
|
||||
__name__ = 'dash.app.self_service_sale'
|
||||
company = fields.Many2One('company.company', 'Company', required=True)
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(AppSelfServiceSale, cls).__setup__()
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company') or None
|
||||
|
|
30
sale.xml
30
sale.xml
|
@ -55,7 +55,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="view" ref="dash_app_sale_order_view_form"/>
|
||||
<field name="act_window" ref="act_dash_app_sale_order_form"/>
|
||||
</record>
|
||||
<menuitem parent="dash.menu_configuration" sequence="30"
|
||||
<menuitem parent="dash.menu_configuration" sequence="40"
|
||||
action="act_dash_app_sale_order_form" id="menu_dash_app_sale_order_form"/>
|
||||
|
||||
<record model="ir.ui.view" id="dash_app_take_order_view_form">
|
||||
|
@ -82,8 +82,34 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="view" ref="dash_app_take_order_view_form"/>
|
||||
<field name="act_window" ref="act_dash_app_take_order_form"/>
|
||||
</record>
|
||||
<menuitem parent="dash.menu_configuration" sequence="30"
|
||||
<menuitem parent="dash.menu_configuration" sequence="50"
|
||||
action="act_dash_app_take_order_form" id="menu_dash_app_take_order_form"/>
|
||||
|
||||
<record model="ir.ui.view" id="dash_app_self_service_view_form">
|
||||
<field name="model">dash.app.self_service_sale</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">app_self_service_sale_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="dash_app_self_service_view_tree">
|
||||
<field name="model">dash.app.self_service_sale</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">app_self_service_sale_tree</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window" id="act_dash_app_self_service_form">
|
||||
<field name="name">App Self-Service Sale</field>
|
||||
<field name="res_model">dash.app.self_service_sale</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_dash_app_self_service_form_view1">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view" ref="dash_app_self_service_view_tree"/>
|
||||
<field name="act_window" ref="act_dash_app_self_service_form"/>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_dash_app_self_service_form_view2">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view" ref="dash_app_self_service_view_form"/>
|
||||
<field name="act_window" ref="act_dash_app_self_service_form"/>
|
||||
</record>
|
||||
<menuitem parent="dash.menu_configuration" sequence="60"
|
||||
action="act_dash_app_self_service_form" id="menu_dash_app_self_service_form"/>
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=6.0.5
|
||||
version=6.0.6
|
||||
depends:
|
||||
party
|
||||
product
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?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. -->
|
||||
<form>
|
||||
<label name="company"/>
|
||||
<field name="company" widget="selection"/>
|
||||
</form>
|
|
@ -0,0 +1,6 @@
|
|||
<?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. -->
|
||||
<tree >
|
||||
<field name="company"/>
|
||||
</tree>
|
|
@ -4,5 +4,4 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
|
|||
<form>
|
||||
<label name="company"/>
|
||||
<field name="company" widget="selection"/>
|
||||
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue