Add app name

This commit is contained in:
oscar 2021-04-14 23:17:44 -05:00
parent bc99522048
commit e831f50010
4 changed files with 13 additions and 0 deletions

View File

@ -13,3 +13,12 @@ class DashApp(metaclass=PoolMeta):
origins = super(DashApp, cls)._get_origin()
origins.extend(['dash.app.delivery', 'dash.app.sale_order'])
return origins
@classmethod
def get_selection(cls):
options = super(DashApp, cls).get_selection()
options.extend([
('delivery', 'Delivery'),
('sale_order', 'Sale Order'),
])
return options

View File

@ -237,6 +237,7 @@ class AppDelivery(ModelSQL, ModelView):
'App Delivery'
__name__ = 'dash.app.delivery'
company = fields.Many2One('company.company', 'Company', required=True)
code = fields.Char('Code')
@classmethod
def __setup__(cls):

View File

@ -4,4 +4,6 @@ The COPYRIGHT file at the top level of this repository contains the full copyrig
<form>
<label name="company"/>
<field name="company" widget="selection"/>
<label name="code"/>
<field name="code"/>
</form>

View File

@ -2,5 +2,6 @@
<!-- 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="code"/>
<field name="company"/>
</tree>