Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
4 Replies
9171 Tampilan

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
Buang
Penulis

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

Penulis Jawaban Terbai

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
Buang

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.

Jawaban Terbai

I do not understand. Can you give an example?

Avatar
Buang
Jawaban Terbai

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
Buang
Penulis

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!

Post Terkait Replies Tampilan Aktivitas
1
Des 24
2600
1
Apr 25
2707
3
Jan 25
19801
1
Mar 15
13215
3
Mar 15
3667