I created a function that computes the internal reference I need so I need directions on how to add it to the internal reference field. Thanks in advance :)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
Hi,
Inherit the corresponding model and add the compute to corresponding field.
class ModelName(models.Model):
_inherit = "model.name"
so_line = fields.Char(compute='_compute_function_name')
To do it from user interface, use automated actions in odoo. See a use case here: https://www.youtube.com/watch?v=Cz5eM5FDmTE&list=PLqRRLx0cl0hq6DeOzGlfHyjgBxjN5jW90&index=1
Thanks
So if the id of the internal reference is "default_code" do I write it instead of "so_line"? Will that override it?
For an option that does not require you to build a module, and leverages the SEQUENCE model, see https://www.odoo.com/forum/help-1/question/can-i-assign-a-custom-field-the-value-of-a-sequence-without-a-module-143107
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
1
oct. 24
|
1590 | ||
|
2
mars 24
|
1924 | ||
|
0
déc. 22
|
1554 | ||
|
2
nov. 19
|
6786 | ||
|
1
mai 17
|
3256 |