im trying to add a product in purchase order receipt based on a selection field in the purchase order using an automated action but keep getting this error:Traceback (most recent call last): File "/home/odoo/src/odoo/odoo/http.py", line 641, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/odoo/src/odoo/odoo/http.py", line 317, in _handle_exception raise exception.with_traceback(None) from new_cause
Here is my code from the automated action for reference :
transfer = env['stock.picking'].search([( 'origin' , '=' , str(record.name) )])
stock_move = env['stock.move'].search([( 'picking_id' , '=' , int(transfer.id) )])
if(record.x_studio_purchase_type == "Raw"):
waste_product = env['product.product'].search([( 'name' , '=' , str("Waste") )])
stock_move.move_line_ids.create({'product_id': waste_product.id, 'product_uom_qty': 0 , 'product_uom_id': 3})
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1589
أدوات العرض
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
1
أغسطس 24
|
2810 | ||
|
1
مارس 23
|
9161 | ||
|
0
مارس 22
|
2569 | ||
|
3
يوليو 24
|
8040 | ||
|
2
مايو 24
|
2177 |