Odoo Help

2

0
4 Answers
0
Panda Medya Turkey
3/19/19, 1:58 PM

i have same problem guys

0
La Jayuhni Yarsyah Indonesia
1/29/19, 7:23 AM

You should check all many2one fields related to loyalty.program, and find wich fields are restricted (ondelete="restrict") to relation model

For simple way to fix it, you can set ondelete parameter to "set null" or "cascade"  on Many2one fields wich related to loyalty.program.
Ex:
some_field_id = fields.Many2one('loyalty.program', ondelete="set null", onupdate="set null")

some_field_id = fields.Many2one('loyalty.program', ondelete="cascade", onupdate="cascade")

But you must carefully,,
If you use "cascade", it will delete related data to its model/table, on database when relation data deleted.

If you use "set null", it will give null value on database column when related data deleted,  only unlinked from relation table..

Regards,

0

Same problem here.

@Avinash Nk how can we do the solution you are saying? 

Thank YOU

0
Avatar

Avinash Nk India

--Avinash Nk--

11690
| 5 5 9
Calicut, India
--Avinash Nk--

Avinash N K

Odoo Developer

More than 3 years of experience in Odoo Technical

and Functional areas.

LinkedIn : https://in.linkedin.com/in/avinash-nk

Avinash Nk India
3/6/17, 1:00 AM

The module may creates records at the time of installation.if the record is used after installation.and if the record is referencing to other models then you cant uninstall that module.because at the time of un installation the module try to delete the records created by the module.in that try odoo understands that the records are still referencing to other models.and un installation of the module will effect the working of the module.so it prevents the un installation of the module.

solution :

hide the record creating codes from the module.then install it.

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now