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.
When the user presses "confirm sale", stock pickings and moves are automatically created, I would like to change them according to some criteria I have.
Currently, I am overriding the action_button_confirm, calling the super method, and then I delete the auto-generated stock pickings and moves, and recreate my own according to some special rules. I believe there must be a better way to do it. Here is my code:
def action_button_confirm(self, cr, uid, ids, context=None):
result = super(jamalon_delivery_distribution, self).action_button_confirm(cr, uid, ids, context=context)
self._distribute(cr,uid,ids,context=context) # Here I delete the auto-generated moves and re-create them
How can I get my custom stock pickings and moves generated, without having to delete those automatically created?
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: 2/29/16, 3:18 AM|
|Seen: 369 times|
|Last updated: 2/29/16, 3:37 AM|