MIG mrp_production_add For Odoo 13.0

This commit is contained in:
Bhoomi
2019-09-04 16:22:57 -04:00
parent 92def473de
commit fa32833133
3 changed files with 3 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
{
'name': 'MRP Production Add Item',
'author': 'Hibou Corp. <hello@hibou.io>',
'version': '12.0.1.0.0',
'version': '13.0.1.0.0',
'category': 'Manufacturing',
'summary': 'Add Items to an existing Production',
'description': """

View File

@@ -29,7 +29,6 @@ class AddProductionItem(models.TransientModel):
else:
item.product_uom_id = False
@api.multi
def add_item(self):
for item in self:
if item.product_qty <= 0:
@@ -42,8 +41,8 @@ class AddProductionItem(models.TransientModel):
'product_uom_id': item.product_uom_id.id,
})
move = item.production_id._generate_raw_move(bom_line, {'qty': item.product_qty, 'parent_line': None})
item.production_id._adjust_procure_method()
move = item.production_id._get_move_raw_values(bom_line, {'qty': item.product_qty, 'parent_line': None})
move = self.env['stock.move'].create(move)
move.write({'unit_factor': 0.0})
move._action_confirm()

View File

@@ -30,7 +30,6 @@
<record id="action_add_production_item" model="ir.actions.act_window">
<field name="name">Add Item View</field>
<field name="res_model">wiz.add.production.item</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_create_add_production_item" />
<field name="target">new</field>