Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am importing one sales order at a time into Odoo using a CSV file. The CSV files contains one order with two order lines. The issue I have is the sequence for sales order number increments by three. Is there a way to fix this?
My CSV structure for the import of a single sales order of multiple order lines looks like this: -
project_id/id | partner_id/id | client_order_ref | date_order | order_line/product_id/id | order_line/product_uom_qty | order_line/price_unit | order_line/tax_id/id | pricelist_id/id
With the exception of non-sequential numbering, it works.
With your revised Question, and CSV format you shared,
I consider that, client_order_ref column in csv is unique, per Sales Order.
If my consideration is correct,
Then, whenever you are importing this CSV file, create method gets called ; And you must be mapping client_order_ref column with one of the field of sale.order model, So in create method you can handle this duplication of Sales Order Record.
You can write the condition in create method, which will check if any Sales Order with mentioned client_order_ref exists or not, and if exists do not create another Sales Order, just link existing Sales Order to that Sale Order line.
Hope, this works!
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
|Asked: 8/11/16, 5:03 AM|
|Seen: 312 times|
|Last updated: 8/17/16, 10:34 PM|