Challenge and Requirements
by Mayur Patel
One of our clients, Q-Products, has a unique business process for managing EAN/Barcodes, which differs from Odoo's default functionality. Instead of assigning unique EANs to each product variant, as Odoo does, they use a single, unique EAN for each product template, with all variants under that template following the same EAN. This deviation from Odoo's standard system created a need for customisations to meet their specific barcode management requirements.
Their requirements were as follows:
- The EAN can be either 12 or 13 digits long.
- If the user scans or enters a 12-digit EAN, the system should automatically add a leading zero to convert it to 13 digits.
- If the input is less than 12 digits or more than 13 digits, the system should display a warning and restrict further action.
- Additionally, they wanted the EAN/Barcode field to be mandatory for each product.
Solution Proposal
We thoroughly analysed Q-Products' requirements and proposed the best solution to address their unique EAN/Barcode process. After reviewing the solution, Q-Products confirmed their satisfaction and are prepared to proceed with implementation.
Final Delivered Solution
We delivered the final solution for Q-Products with the following features:
- A new EAN/Barcode field has been added under the Product Template, and the default Odoo EAN/Barcode fields for both templates and variants have been hidden.
- The new EAN/Barcode field is now mandatory.
- A unique constraint has been applied, ensuring that the same EAN/Barcode cannot be used for multiple product templates.
- The EAN can be either 12 or 13 digits in length.
- If a user enters or scans a 12-digit EAN, the system automatically adds a leading zero to make it 13 digits.
- If the input is less than 12 digits or more than 13 digits, a warning is displayed, and the system restricts further action.
- When the new EAN/Barcode field is populated, it automatically updates Odoo's default EAN/Barcode field.
- Product variants now always follow the EAN/Barcode of their parent product template.
After reviewing the solution, Q-Products expressed their satisfaction with it, finding it much easier to manage their business process with these customisations in place.
Want to customise Odoo for your business?
We can tailor Odoo to meet your specific needs.