Update version
This commit is contained in:
parent
d4a31a422b
commit
03422a24b5
|
@ -2,9 +2,13 @@
|
||||||
# copyright notices and license terms.
|
# copyright notices and license terms.
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
import sale
|
import sale
|
||||||
|
import configuration
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
Pool.register(
|
Pool.register(
|
||||||
sale.Sale,
|
sale.Sale,
|
||||||
module='dash_sale', type_='model')
|
module='dash_sale', type_='model')
|
||||||
|
# Pool.register(
|
||||||
|
# configuration.ConfigurationDashSale,
|
||||||
|
# module='dash_sale', type_='model')
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
# 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, ModelSQL, fields
|
||||||
|
from trytond.pyson import Eval, If, In, Get
|
||||||
|
from trytond.transaction import Transaction
|
||||||
|
|
||||||
|
__all__ = ['ConfigurationDashSale']
|
||||||
|
|
||||||
|
|
||||||
|
class ConfigurationDashSale(ModelSQL, ModelView):
|
||||||
|
'Configuration Dash Sale'
|
||||||
|
__name__ = 'dash.configuration.sale'
|
||||||
|
company = fields.Many2One('company.company', 'Company', required=True,
|
||||||
|
domain=[
|
||||||
|
('id', If(In('company',
|
||||||
|
Eval('context', {})), '=', '!='), Get(Eval('context', {}),
|
||||||
|
'company', 0))
|
||||||
|
])
|
||||||
|
app = fields.Selection([
|
||||||
|
('order', 'On Order Processed'),
|
||||||
|
('delivery', 'On Shipment Sent')
|
||||||
|
], 'Sale Invoice Method', states={
|
||||||
|
'required': Bool(Eval('context', {}).get('company', 0)),
|
||||||
|
})
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __setup__(cls):
|
||||||
|
super(ConfigurationDashSale, cls).__setup__()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_company():
|
||||||
|
return Transaction().context.get('company') or None
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?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="dash_configuration_view_form">
|
||||||
|
<field name="model">dash.configuration</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="name">configuration_form</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window" id="act_dash_configuration_form">
|
||||||
|
<field name="name">Dash Configuration</field>
|
||||||
|
<field name="res_model">dash.configuration</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.view"
|
||||||
|
id="act_dash_configuration_view1">
|
||||||
|
<field name="sequence" eval="1"/>
|
||||||
|
<field name="view" ref="dash_configuration_view_form"/>
|
||||||
|
<field name="act_window" ref="act_dash_configuration_form"/>
|
||||||
|
</record>
|
||||||
|
<menuitem name="General Configuration" parent="menu_configuration"
|
||||||
|
action="act_dash_configuration_form" sequence="20"
|
||||||
|
id="menu_dash_configuration" icon="tryton-list"/>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=5.0.1
|
version=5.0.2
|
||||||
depends:
|
depends:
|
||||||
party
|
party
|
||||||
product
|
product
|
||||||
|
|
Loading…
Reference in New Issue