Odoo Help

Welcome!

This community 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.

0

Record rules in Odoo, parametrization and programmatic updation of rule parameters

By
Jaikish Thamarasseril
on 11/20/16, 10:17 PM 66 views

Hi,

      I would like to create rules in Odoo to control things like max single order value, max cummulative order value across a time period for a user, max number of orders that can be place in a period for a user through rules. Can I use record rules for this purpose? Can you please point me to the relevant documentation. Also, is it possible to parameterize these rules and update the rules programmatically? The intent is to apply the rule with different parameters for different groups of users.


Thanks in advance,

    Best regards,

          Jaikish

0

Axel Mendoza

--Axel Mendoza--
10205
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 11/21/16, 3:06 AM

Hi Jaikish

I think that you don't need to create nothing new here, the Odoo record rules are model domains that could use the current user data to validate stuffs, so if you add the necessary fields on the user to compare the order value with the current user field value you will be ok. You could have calculated fields in the order model so it could calculate the sum of order values across a time period for the user and the number of orders in a period for the user to compare with the user specific field value in the record rule and that will lead you to a dynamic rule based in every user fields values without the need to alter the rule, just the user fields values

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/20/16, 10:17 PM
Seen: 66 times
Last updated: 11/21/16, 3:06 AM