mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms: unlink records folio sale lines
This commit is contained in:
@@ -1089,13 +1089,14 @@ class FolioSaleLine(models.Model):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
def unlink(self):
|
def unlink(self):
|
||||||
if self.qty_invoiced > 0:
|
for record in self:
|
||||||
raise UserError(
|
if record.qty_invoiced > 0:
|
||||||
_(
|
raise UserError(
|
||||||
"You cannot delete a sale order line once a "
|
_(
|
||||||
"invoice has been created from it."
|
"You cannot delete a sale order line once a "
|
||||||
|
"invoice has been created from it."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
return super(FolioSaleLine, self).unlink()
|
return super(FolioSaleLine, self).unlink()
|
||||||
|
|
||||||
def _get_real_price_currency(self, product, rule_id, qty, uom, pricelist_id):
|
def _get_real_price_currency(self, product, rule_id, qty, uom, pricelist_id):
|
||||||
|
|||||||
Reference in New Issue
Block a user