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',
|
||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'category': 'Manufacturing',
|
||||
'summary': 'Add Items to an existing Production',
|
||||
'description': """
|
||||
This module allows a production order to add additional items that are not on the product's BoM.
|
||||
""",
|
||||
'website': 'https://hibou.io/',
|
||||
'depends': ['mrp'],
|
||||
'depends': [
|
||||
'mrp',
|
||||
],
|
||||
'data': [
|
||||
'wizard/additem_wizard_view.xml',
|
||||
'views/mrp_production.xml',
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<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="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='move_raw_ids']" position="before">
|
||||
<group col="2" colspan="2">
|
||||
<button name="%(action_add_production_item)d"
|
||||
type="action"
|
||||
attrs="{'invisible': [('state', 'in', ('cancel', 'done'))]}"
|
||||
string="Add extra item"
|
||||
class="oe_highlight"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
<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="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='move_raw_ids']" position="before">
|
||||
<group col="2" colspan="2">
|
||||
<button name="%(action_add_production_item)d"
|
||||
type="action"
|
||||
attrs="{'invisible': [('state', 'in', ('cancel', 'done'))]}"
|
||||
string="Add extra item"
|
||||
class="oe_highlight"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -25,7 +25,7 @@ class AddProductionItem(models.TransientModel):
|
||||
def _onchange_product_id(self):
|
||||
for item in self:
|
||||
if item.product_id:
|
||||
item.product_uom_id = item.product_id.uom_id
|
||||
item.product_uom_id = item.product_id.uom_id.id
|
||||
else:
|
||||
item.product_uom_id = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user