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
|
||||
|
||||
def unlink(self):
|
||||
if self.qty_invoiced > 0:
|
||||
raise UserError(
|
||||
_(
|
||||
"You cannot delete a sale order line once a "
|
||||
"invoice has been created from it."
|
||||
for record in self:
|
||||
if record.qty_invoiced > 0:
|
||||
raise UserError(
|
||||
_(
|
||||
"You cannot delete a sale order line once a "
|
||||
"invoice has been created from it."
|
||||
)
|
||||
)
|
||||
)
|
||||
return super(FolioSaleLine, self).unlink()
|
||||
|
||||
def _get_real_price_currency(self, product, rule_id, qty, uom, pricelist_id):
|
||||
|
||||
Reference in New Issue
Block a user