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'm migrating data from openerp 6 to openerp 7, I've chosen to do it directly into database because it's very fast. But I'm having a problem with invoices, they are all imported with the correct data, but I can't cancel them or pay them (actually I can pay them but the state doesn't change).
I found this link http://forum.openerp.com/forum/topic20397.html, the author of the topic had the same a problem as me, but I don't quite understand the answer. And why the problem doesn't occure with sales orders, delivery orders...?
I've tried using xml-rpc, but the sate is not imported, all my invoices are in draft state.
Any help is welcomed.
We have faced the same thing. Basically if you just import data into the database the ORM will not have attached any workflow to it. In other words, it will be a "dead" object.
The workflow is attached by the ORM when you create an object through the regular OpenERP way. The create does much more, but the most important thing is the workflow.
If you use the XML-RPC connection to create new invoices, they will be just that; new invoices (so in draft state). A possibility would be to create all the invoices with XML-RPC and then using the newly created ids trigger the workflow. So basically you will be using the XML-RPC onnection to invoke the create method and then afterwards the method for the button to confirm the invoices.
The biggest downside to this import is the fact that some business logic might alter your invoices when buttons are pressed. You must always fill in the correct data (like in the case of the invoice; the invoice date) otherwise OpenERP uses the defaults for that, which is almost always incorrect in the case of historical import.
- Use XML-RPC to create invoices
- Use XML-RPC in a for loop over all the newly create invoices to trigger the method that confirms said invoices, just like you pressed the buttons by hand.
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: 6/20/14, 3:57 AM|
|Seen: 2056 times|
|Last updated: 3/16/15, 8:10 AM|