summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/commision.py3
-rw-r--r--indoteknik_custom/models/stock_picking.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py
index bd4c06a4..788fc0f9 100644
--- a/indoteknik_custom/models/commision.py
+++ b/indoteknik_custom/models/commision.py
@@ -278,6 +278,9 @@ class CustomerCommision(models.Model):
@api.constrains('commision_amt')
def _onchange_commision_amt(self):
+ """
+ Constrain to update commision percent from commision amount
+ """
if not self.env.context.get('_onchange_commision_amt', True):
return
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index d032f99f..ccccbcdc 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -1248,7 +1248,7 @@ class StockPicking(models.Model):
continue
invoice = self.env['account.move'].search(
- [('sale_id', '=', picking.sale_id.id), ('state', 'not in', ['draft', 'cancel'])], limit=1)
+ [('sale_id', '=', picking.sale_id.id), ('state', 'not in', ['draft', 'cancel']), ('move_type', '=', 'out_invoice')], limit=1)
if not invoice:
continue