diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-21 16:16:08 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-21 16:16:08 +0700 |
| commit | 314d2d071296ed7a0d3b5235ba7296d5864c2c1f (patch) | |
| tree | 4f52650332de42a576c85e59ac48307b5c812d60 | |
| parent | e57e34a96a46e18f43e25c0bcb441f8ab115b0ec (diff) | |
push
| -rwxr-xr-x | fixco_custom/models/stock_picking.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py index 45757f2..56bb913 100755 --- a/fixco_custom/models/stock_picking.py +++ b/fixco_custom/models/stock_picking.py @@ -164,7 +164,14 @@ class StockPicking(models.Model): res = super(StockPicking, self).button_validate() - if self.name.startswith('BU/IN') and self.origin.startswith('Return of BU/OUT') and self.state == 'done': + if ( + self.name + and self.origin + and self.name.startswith('BU/IN') + and self.origin.startswith('Return of BU/OUT') + and self.state == 'done' + ): + self.automatic_reversed_invoice() # if self.name.startswith('BU/OUT') and self.origin.startswith('SO/'): # self.create_invoices() |
