mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
MIG mrp_production_add For Odoo 12.0
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
'name': 'MRP Production Add Item',
|
'name': 'MRP Production Add Item',
|
||||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
'version': '11.0.1.0.0',
|
'version': '12.0.1.0.0',
|
||||||
'category': 'Manufacturing',
|
'category': 'Manufacturing',
|
||||||
'summary': 'Add Items to an existing Production',
|
'summary': 'Add Items to an existing Production',
|
||||||
'description': """
|
'description': """
|
||||||
This module allows a production order to add additional items that are not on the product's BoM.
|
This module allows a production order to add additional items that are not on the product's BoM.
|
||||||
""",
|
""",
|
||||||
'website': 'https://hibou.io/',
|
'website': 'https://hibou.io/',
|
||||||
'depends': ['mrp'],
|
'depends': [
|
||||||
|
'mrp',
|
||||||
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'wizard/additem_wizard_view.xml',
|
'wizard/additem_wizard_view.xml',
|
||||||
'views/mrp_production.xml',
|
'views/mrp_production.xml',
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<record id="mrp_production_add_production_item_form_view" model="ir.ui.view">
|
||||||
<record id="mrp_production_add_production_item_form_view" model="ir.ui.view">
|
<field name="name">mrp.production.add_production_item.form.view</field>
|
||||||
<field name="name">mrp.production.add_production_item.form.view</field>
|
<field name="model">mrp.production</field>
|
||||||
<field name="model">mrp.production</field>
|
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
||||||
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
<field name="arch" type="xml">
|
||||||
<field name="arch" type="xml">
|
<xpath expr="//field[@name='move_raw_ids']" position="before">
|
||||||
<xpath expr="//field[@name='move_raw_ids']" position="before">
|
<group col="2" colspan="2">
|
||||||
<group col="2" colspan="2">
|
<button name="%(action_add_production_item)d"
|
||||||
<button name="%(action_add_production_item)d"
|
type="action"
|
||||||
type="action"
|
attrs="{'invisible': [('state', 'in', ('cancel', 'done'))]}"
|
||||||
attrs="{'invisible': [('state', 'in', ('cancel', 'done'))]}"
|
string="Add extra item"
|
||||||
string="Add extra item"
|
class="oe_highlight"/>
|
||||||
class="oe_highlight"/>
|
</group>
|
||||||
</group>
|
</xpath>
|
||||||
</xpath>
|
</field>
|
||||||
</field>
|
</record>
|
||||||
</record>
|
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -25,7 +25,7 @@ class AddProductionItem(models.TransientModel):
|
|||||||
def _onchange_product_id(self):
|
def _onchange_product_id(self):
|
||||||
for item in self:
|
for item in self:
|
||||||
if item.product_id:
|
if item.product_id:
|
||||||
item.product_uom_id = item.product_id.uom_id
|
item.product_uom_id = item.product_id.uom_id.id
|
||||||
else:
|
else:
|
||||||
item.product_uom_id = False
|
item.product_uom_id = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user