diff options
| author | Arnold Moyaux <arm@odoo.com> | 2019-07-31 12:32:38 +0000 |
|---|---|---|
| committer | Arnold Moyaux <arm@odoo.com> | 2019-08-19 15:03:59 +0000 |
| commit | 37200abfc5684935f932bf42923add145f5dfd1e (patch) | |
| tree | 812735514479f38ccf8c5428875cca911fa876fe /addons/mrp_subcontracting/views | |
| parent | 6c09ffb63409b0897aefe083f1b7f64a281063e1 (diff) | |
[REF] mrp_subcontracting: lot produced/consumed management
Currently, the subcontract picking present multiple difficulties:
- The user has to introduce multiple time the lot produced.
In register components button and then create a new move line with
the show details operation button.
- Same problem with the correction system. The user has to modify the
lot in details operation and then go on the subcontract production and
unlock and edit it.
In order to facilitate those behavior. A move line will be automaticaly
created during the register components process. Also the subcontract
moves for components will be available in the detail operations tab.
Diffstat (limited to 'addons/mrp_subcontracting/views')
| -rw-r--r-- | addons/mrp_subcontracting/views/stock_move_views.xml | 26 | ||||
| -rw-r--r-- | addons/mrp_subcontracting/views/stock_picking_views.xml | 8 |
2 files changed, 26 insertions, 8 deletions
diff --git a/addons/mrp_subcontracting/views/stock_move_views.xml b/addons/mrp_subcontracting/views/stock_move_views.xml new file mode 100644 index 00000000000..0f1f7a8801d --- /dev/null +++ b/addons/mrp_subcontracting/views/stock_move_views.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="view_stock_move_operations_inherit_mrp_subcontracting" model="ir.ui.view"> + <field name="name">stock.move.operations.form.inherit.mrp.subcontracting</field> + <field name="model">stock.move</field> + <field name="inherit_id" ref="stock.view_stock_move_operations"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='move_line_ids']" position="after"> + <field name="is_subcontract" invisible="1"/> + <h2 attrs="{'invisible': [('is_subcontract', '!=', True)]}">Components</h2> + <field name="subcontract_components_ids" attrs="{'invisible': [('is_subcontract', '!=', True)], 'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}"> + <tree editable="bottom"> + <field name="tracking" invisible="1"/> + <field name="product_id" readonly="1"/> + <field name="lot_produced_ids" widget="many2many_tags" context="{'default_product_id': parent.product_id}"/> + <field name="qty_done"/> + <field name="lot_id"/> + </tree> + </field> + </xpath> + <xpath expr="//field[@name='move_line_ids']" position="before"> + <h2 attrs="{'invisible': [('is_subcontract', '!=', True)]}">Subcontracted Product</h2> + </xpath> + </field> + </record> +</odoo>
\ No newline at end of file diff --git a/addons/mrp_subcontracting/views/stock_picking_views.xml b/addons/mrp_subcontracting/views/stock_picking_views.xml index 23145eeabbf..e5b87e618eb 100644 --- a/addons/mrp_subcontracting/views/stock_picking_views.xml +++ b/addons/mrp_subcontracting/views/stock_picking_views.xml @@ -5,14 +5,6 @@ <field name="model">stock.picking</field> <field name="inherit_id" ref="stock.view_picking_form" /> <field name="arch" type="xml"> - <xpath expr="//div[@name='button_box']" position="inside"> - <field name="display_view_subcontracted_move_lines" invisible="1" /> - <button string="Subcontracted Moves" type="object" - name="action_view_subcontracted_move_lines" - class="oe_stat_button" icon="fa-exchange" - attrs="{'invisible': [('display_view_subcontracted_move_lines', '=', False)]}" /> - </xpath> - <xpath expr="//button[@name='button_validate'][hasclass('o_btn_validate')]" position="before"> <field name="display_action_record_components" invisible="1" /> <button name="action_record_components" class="oe_highlight" attrs="{'invisible': [('display_action_record_components', '=', False)]}" string="Record components" type="object"/> |
