ODOO 18 enterprise.
When ODOO issues a document from the pos or an invoice, it automatically generates a loyalty card, giving the client the points expected according to the reward program set by the ODOO administrator.
I want to give these points to some customers only.
For this purpose, I added a checkbox in the res.partner model. If checked, give the points; otherwise, don't do it.
I created an automated action that, through the domain, selects the clients with the box unchecked and deletes the corresponding records in the loyalty cards table through the execution of a fragment of python code.
I tried several different codes without success.
Can anybody help me out?
"Loyalty Cards" is not a question. A question is a substantial phrase that ends with "?"
We get close to 1,000 posts a month and not everyone will open a post to find out what your question is.
I have edited your post to make the title a question.
In the future, please consider (1) using a Question that makes it clear what you ask without requiring people to open your post and (2) adding Tags. This will often increase the chances people will respond and also make everything clearer for others who may come along later searching for the same thing.
Failing that, you can paste your future posts into an AI Chatbot and ask it to "please generate a question of no more than 16 words that summarizes what I am asking" and use that as your question.
See also https://www.odoo.com/forum/help-1/meta-why-do-some-questions-get-answers-and-others-do-not-25620
Thank you very much for your help.