Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2010 Переглядів

Hello,

Hopefully someone can point me in the right direction.

In Odoo 14 I have the following automated action and it is working: (To copy a custom field when a second WO is automatically generated because the product has a multi-level BOM)

Model: Production Order

Trigger On Creation & Update

Action To Do Update the Record

Data to Write:

Field

Evaluation Type

Value

Client (Production Order) *This is a custom field

Python expression

record.env['mrp.production'].search([('name', '=', record.origin)]).x_studio_client

The problem is in Odoo 16. It just doesn't do anything I don't receive an error. Obviously the syntax in the python code has changed  but I can't figure it out what is the correct way.

Much appreciated if someone can help!

Аватар
Відмінити
Найкраща відповідь

You need to migrate your module as well. Check the info on migration from 14 to 15 and 15 to 16 to see what is going wrong.

Here are some links to help (from 14 to 15, then you can easily find the 15 to 16 version):

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0

https://oca.github.io/OpenUpgrade/coverage_analysis/modules140-150.html

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
груд. 23
5554
1
лист. 22
2473
1
серп. 22
2556
2
січ. 22
5646
1
лип. 20
3442