Update to 4.8 [CI SKIP]
This commit is contained in:
parent
053f8e3036
commit
8eb5516a9f
3
load.py
3
load.py
|
@ -72,7 +72,8 @@ class LoadOrder:
|
|||
cls._buttons.update({
|
||||
'run_try': {
|
||||
'icon': 'tryton-go-next',
|
||||
'invisible': ~Eval('state').in_(['waiting', 'running'])},
|
||||
'invisible': ~Eval('state').in_(['waiting', 'running']),
|
||||
'depends': ['state']},
|
||||
})
|
||||
cls._error_messages.update({
|
||||
'cancel_ul': 'Cannot cancel load orders with loaded ULs',
|
||||
|
|
10
load.xml
10
load.xml
|
@ -32,6 +32,16 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.model.button" id="unit_load_run_try_button">
|
||||
<field name="name">run_try</field>
|
||||
<field name="string">Start loading</field>
|
||||
<field name="model"
|
||||
search="[('model', '=', 'carrier.load.order')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="carrier_load_ul_run_try_button_group_carrier_load">
|
||||
<field name="button" ref="unit_load_run_try_button"/>
|
||||
<field name="group" ref="carrier_configuration.group_carrier"/>
|
||||
</record>
|
||||
<!-- Order line -->
|
||||
<record model="ir.ui.view" id="load_order_line_view_form">
|
||||
<field name="model">carrier.load.order.line</field>
|
||||
|
|
|
@ -413,3 +413,12 @@ msgstr "Aceptar"
|
|||
msgctxt "wizard_button:carrier.load_uls,order,end:"
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
msgctxt "model:ir.model.button,string:unit_load_run_try_button"
|
||||
msgid "Start loading"
|
||||
msgstr "Iniciar carga"
|
||||
|
||||
msgctxt "model:ir.model.button,string:unit_load_unload_button"
|
||||
msgid "Unload"
|
||||
msgstr "Descargar"
|
||||
|
||||
|
|
|
@ -264,6 +264,8 @@ Unload UL::
|
|||
>>> start_load.execute('load_')
|
||||
>>> start_load.form.loaded_uls
|
||||
2
|
||||
>>> with config.set_context(ul_loading=True):
|
||||
... ul2 = Unitload(ul2.id)
|
||||
>>> start_load.form.uls_loaded.append(ul2)
|
||||
>>> start_load.execute('unload_')
|
||||
>>> start_load.form.loaded_uls
|
||||
|
@ -404,6 +406,8 @@ Force load another UL::
|
|||
Force unload UL::
|
||||
|
||||
>>> start_load = Wizard('carrier.load_uls', [order])
|
||||
>>> with config.set_context(ul_loading=True):
|
||||
... ul = Unitload(ul.id)
|
||||
>>> start_load.form.uls_loaded.append(ul)
|
||||
>>> start_load.execute('unload_')
|
||||
>>> start_load.execute('end')
|
||||
|
|
|
@ -208,7 +208,7 @@ Add other products to unit load::
|
|||
>>> ul.save()
|
||||
|
||||
Starting load wizard::
|
||||
|
||||
|
||||
>>> start_load = Wizard('carrier.load_uls', [])
|
||||
>>> start_load.form.load_order = order
|
||||
>>> start_load.execute('data')
|
||||
|
@ -296,6 +296,8 @@ Unload UL::
|
|||
>>> start_load.execute('load_')
|
||||
>>> start_load.form.loaded_uls
|
||||
2
|
||||
>>> with config.set_context(ul_loading=True):
|
||||
... ul2 = Unitload(ul2.id)
|
||||
>>> start_load.form.uls_loaded.append(ul2)
|
||||
>>> start_load.execute('unload_')
|
||||
>>> start_load.form.loaded_uls
|
||||
|
|
|
@ -297,12 +297,15 @@ Add an invalid UL::
|
|||
UserError: ('UserError', (u'All valid lines of load order "1" are complete. Cannot load more ULs.', ''))
|
||||
|
||||
Unload UL::
|
||||
|
||||
|
||||
>>> UnitLoad = Model.get('stock.unit_load')
|
||||
>>> order.lines[0].ul_quantity += 1
|
||||
>>> order.save()
|
||||
>>> start_load.execute('load_')
|
||||
>>> start_load.form.loaded_uls
|
||||
2
|
||||
>>> with config.set_context(ul_loading=True):
|
||||
... ul2 = UnitLoad(ul2.id)
|
||||
>>> start_load.form.uls_loaded.append(ul2)
|
||||
>>> start_load.execute('unload_')
|
||||
>>> start_load.form.loaded_uls
|
||||
|
@ -365,7 +368,6 @@ Check internal shipment::
|
|||
|
||||
Force load another UL::
|
||||
|
||||
>>> Unitload = Model.get('stock.unit_load')
|
||||
>>> ul = create_unit_load(config=config, do_state=False,
|
||||
... default_values={'start_date': datetime.datetime.now() + relativedelta(days=-1)})
|
||||
>>> ul.product = main_product
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=4.2.0
|
||||
version=4.8.0
|
||||
depends:
|
||||
carrier_load
|
||||
ir
|
||||
|
|
|
@ -27,7 +27,8 @@ class UnitLoad:
|
|||
cls._buttons.update({
|
||||
'unload': {
|
||||
'invisible': (Eval('load_order_state') == 'done'),
|
||||
'readonly': (Eval('load_order_state') == 'done')
|
||||
'readonly': (Eval('load_order_state') == 'done'),
|
||||
'depends': ['load_order_state']
|
||||
}
|
||||
})
|
||||
cls._buttons['move_try']['invisible'] |= Bool(Eval('load_order'))
|
||||
|
|
|
@ -15,6 +15,17 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="name">unit_load_form</field>
|
||||
<field name="inherit" ref="stock_unit_load.unit_load_view_form"/>
|
||||
</record>
|
||||
<!-- Unit load buttons -->
|
||||
<record model="ir.model.button" id="unit_load_unload_button">
|
||||
<field name="name">unload</field>
|
||||
<field name="string">Unload</field>
|
||||
<field name="model"
|
||||
search="[('model', '=', 'stock.unit_load')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="carrier_load_ul_unload_button_group_stock">
|
||||
<field name="button" ref="unit_load_unload_button"/>
|
||||
<field name="group" ref="stock.group_stock"/>
|
||||
</record>
|
||||
<!-- UL tabs -->
|
||||
<record model="ir.action.act_window.domain" id="act_unit_load_domain_loaded">
|
||||
<field name="name">Loaded</field>
|
||||
|
|
|
@ -18,6 +18,6 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</xpath>
|
||||
<xpath expr="/form/group[@id='state_buttons']/group[@id='buttons']/button[@name='do']"
|
||||
position="before">
|
||||
<button name="run_try" string="Start loading"/>
|
||||
<button name="run_try"/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<tree>
|
||||
<field name="code"/>
|
||||
<field name="product"/>
|
||||
<button name="unload" string="Unload"/>
|
||||
<button name="unload"/>
|
||||
<field name="load_order" tree_invisible="1" />
|
||||
<field name="load_order_state" tree_invisible="1"/>
|
||||
</tree>
|
||||
|
|
Loading…
Reference in New Issue