Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have created a new text field on the sales order line which will hold free form information required during the manufacturing process.
I now want to pass that field to the Manufacturing Order form. I have found that sale_mrp passes the Sales Order number and Customer Reference number through. How do I write a new module to extend sale_mrp to include my new field?
I am using Odoo v8.
I've made some progress...
I can't make it work when the notes field is on sale.order.line, However I have succeeded in adding a notes field on the sale.order and have got it to appear on the Manufacturing Order form mrp.production. However I don't know how safe what I have done is?
I should clarify that I am using a product which has Manufacture and Make to Order checked in the supply chain Routes.
My code works when I first install my module. I can write a note in my new field on the Sale order. Confirm the sale -> in Warehouse- Run Schedulers which creates the Manufacturing Order. My notes are visible on the Manufacturing Order under the Extra Information Tab under Priority as I expected.
BUT - After the server was powered down and restarted my note was still on the Sale Order form but had been removed from the Manufacturing form (the field label remained but the content had gone). I think it is because in the official sale_mrp.py _inherit=‘mrp.production’ takes precedence and it doesn't use my sale_lab.py _inherit=‘mrp.production’. Is there any way to overcome this?
UPDATE - To make sure my module is loaded last I added sale_mrp to the dependancies in __openerp.py it works a treat now!
On another issue – when adding examples of code to questions – how do I get them in a neat box as I've seen on other questions? (I'm new and have very low karma)
Can you share your solution? As I'm also able to customize the sale_mrp module but cannot get the information from the sale.order.line. The sale.order.line has a description that I want to show in the Manufacturing order. The product and quantity of the sale.order.line are forwarded to the Manufacturing Order but I can't find this in the code. Many thanks!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/26/15, 5:17 AM|
|Seen: 1829 times|
|Last updated: 8/10/16, 11:52 PM|