Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
9183 Zobrazení

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?

 

Avatar
Zrušit
Autor

Hi Mehmet, I can't reply to your answer I haven't enough answer. I edited my original post to give more information.

Autor Nejlepší odpověď

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)

Avatar
Zrušit

Hi @Gill Potter I've been struggling with this for a while. Please Please Please share code or email me @ herman.wolkie@gmail.com It would really be appreciated.

Nejlepší odpověď

I do not understand. Can you give an example?

Avatar
Zrušit
Nejlepší odpověď

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!

Avatar
Zrušit
Autor

I found a module for v8 which gave me the framework of how to pass fields from sale.order and sale.order.line through to manufacturing. I was always worried about changing the core code ,so I scrapped my changes to sale_mrp. The module is found at https://apps.openerp.com/apps/modules/8.0/mrp_production_sale_info/ Good luck!

Related Posts Odpovědi Zobrazení Aktivita
1
pro 24
2630
1
dub 25
2708
3
led 25
19832
1
bře 15
13236
3
bře 15
3669