The developer tool to score data completeness of any Odoo document
- At the moment we accept only PayPal payments from individuals
- The price includes all required Odoo dependencies to start
- You receive source code as a link to download zip archives
Assess data completeness and motivate users to enter required details
This is a technical app, which provides tools to score data completeness of Odoo records. The idea is to calculate, whether important fields are filled up and show the score in an indicative way.
The tool let you configure any Odoo model to be assessed. You need to enter a few details and a list of fields with weight factors. Observe the configuration tips below. For customers scoring use this app.
The module introduces the special decorator, which is easily used for create and write methods in your own tools.
The app works in real-time, calculating the score when a record is saved. However, initially an administrator should press the button.
It is possible to change the scoring rules at any moment.
Installation and configuration
The tool is ready to be installed in any Community or Enterprise Odoo database.
To use the module for your needs, you should programmatically do the following:
- Introduce a float field or select existing one for a desired model, where score would be saved. For example, score = fields.Float(string="Score")
- Inherit write and create methods to use the special decorator @update_completeness. This decorator provides real-time character of calculations.
@api.multi @update_completeness def write(self, values): return super(your_model, self).write(values) @api.model @update_completeness def create(self, values): return super(your_model, self).create(values)
To prepare a scoring rule go to the Odoo technical settings and find the menu unit 'Completeness'. Create a new record:
- As a 'Model name' enter any clear reference
- As a 'Model' select an Odoo object to be assessed. For example, crm case (crm.lead) or product (product.product)
- In the domain field introduce any Odoo-like domain, e.g. [('customer', '=', True)]. It is not a required field, but such restrictions will speed up calculations
- As a 'Score' chose any float field, which will be used to keep the result
- In the table of Field Scores select columns, which you consider as important to be filled up
- Press the button 'Recalculate score for all matches'. It might take quite long to proceed the operation, if your Odoo has a lot of records related to this model. Increase configured time-out period for a while in that case.
The final score will be calculated as [Record Score 1 + Record score 2 + ...] / [Score 1 + Score 2 + ...], where Record Score 1 is either 0 (field is not entered) or Score 1 (field is filled up). For an example, have a look at the screenshots above.
To show score on kanban and form views, you might use indicative progress bars (instead of 'score' everywhere put your results field).
<!-- Kanban view --> <div class="progress" style='padding:0;margin:2px;height:17px'> <div class="progress-bar" role="progressbar" t-att-aria-valuenow="record.score.raw_value" aria-valuemin="0" aria-valuemax="100" t-att-style="'width:'+record.score.raw_value+'%; color:black;'"> <field name="score"/> </div> </div> <!-- Form view --> <field name="score" widget="progressbar" class="oe_read_only"/>