跳至内容
菜单
此问题已终结
1 回复
5104 查看

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

形象
丢弃
最佳答案

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.

形象
丢弃
编写者

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

编写者

I started with this path

MRP/MRP_PRODUCTION.PY

SALE_MRP/SALE_MRP.PY

But can find it.

编写者

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

相关帖文 回复 查看 活动
2
2月 25
924
1
5月 25
1019
2
11月 24
2213
1
5月 24
1894
0
5月 24
1454