Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5116 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Autor

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

Autor

I started with this path

MRP/MRP_PRODUCTION.PY

SALE_MRP/SALE_MRP.PY

But can find it.

Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
2
lut 25
929
1
maj 25
1023
2
lis 24
2213
1
maj 24
1899
0
maj 24
1454