Skip to Content
Menu
This question has been flagged
1 Reply
4155 Views

Hi  Odoo Partner.

Senario: 

Am using Odoo 11

I have a product tag as Made to Order.

I have created a Quotation with that product and confirm to Sale Order.

Since it's a Made to Order product is also has created a MO automatically.

I want to addition a note  on MO item line during creation from a confirmed Sale Order.

What is the module/function for me to inherit it.​

Hope for your kindness on this matter.

Your response to this will be greatly appreciated.

regards,

Gain Charlie

Odoo Partner

Avatar
Discard
Best Answer

You will need to do the following if the "Note" field you need does not exist on the Sales Order:

  1. Add a new custom field on the Sales Order depending on where you want it.

  2. Extend the Manufacturing Order base class to add the new field and define it's default value as the value of the field in the Sales Order.

Hope that helps.

Avatar
Discard
Author

What are those specific functions that auto create the Manufacturing Order when sales Order is confirm?

Author

I started with this path

MRP/MRP_PRODUCTION.PY

SALE_MRP/SALE_MRP.PY

But can find it.

Author

sorry typo error. i .e But cant find it.

You seem to be on the right path if you mean "mrp/model/mrp_production.py". You will need to extend the MrpProduction class to add the new field and set the default value to the value of your custom note field in the Sales Order. This will copy the value of the note field to the Production Order when it is created. In your case, i.e. if all you want is the note to be copied over, you probably don't need to change any methods.

This link to a section in the Odoo documentation may help:

https://www.odoo.com/documentation/12.0/reference/orm.html#inheritance-and-extension

Related Posts Replies Views Activity
2
Nov 24
475
1
May 24
361
0
May 24
248
4
Feb 24
10159
1
Jan 24
369