Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3480 Ansichten

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?


 

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Feb. 16
5516
1
März 17
6340
4
Sept. 16
4226
2
Aug. 22
3829
1
Sept. 16
6819