Include the line in the warehouse required error message for sale and purchase
This commit is contained in:
@@ -10,7 +10,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="text">You cannot erase party "%(party)s" while they have pending purchases with company "%(company)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_warehouse_required_for_quotation">
|
||||
<field name="text">To get a quote for the purchase "%(purchase)s" you must enter a warehouse.</field>
|
||||
<field name="text">To get a quote for the purchase "%(purchase)s" you must enter a warehouse for the line "%(line)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_purchase_delete_cancel">
|
||||
<field name="text">To delete purchase "%(purchase)s" you must cancel it.</field>
|
||||
|
||||
@@ -766,7 +766,8 @@ class Purchase(
|
||||
if ((not location or not line.warehouse) and line.movable):
|
||||
raise PurchaseQuotationError(
|
||||
gettext('purchase.msg_warehouse_required_for_quotation',
|
||||
purchase=self.rec_name))
|
||||
purchase=self.rec_name,
|
||||
line=line.rec_name))
|
||||
|
||||
@classmethod
|
||||
def set_number(cls, purchases):
|
||||
|
||||
@@ -22,7 +22,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="text">To get a quote for sale "%(sale)s" you must enter a shipment address.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_sale_warehouse_required_for_quotation">
|
||||
<field name="text">To get a quote for sale "%(sale)s" you must enter a warehouse.</field>
|
||||
<field name="text">To get a quote for sale "%(sale)s" you must enter a warehouse for the line "%(line)s".</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_sale_delete_cancel">
|
||||
<field name="text">To delete sale "%(sale)s" you must cancel it.</field>
|
||||
|
||||
@@ -925,7 +925,8 @@ class Sale(
|
||||
if (not location or not line.warehouse) and line.movable:
|
||||
raise SaleQuotationError(
|
||||
gettext('sale.msg_sale_warehouse_required_for_quotation',
|
||||
sale=self.rec_name))
|
||||
sale=self.rec_name,
|
||||
line=line.rec_name))
|
||||
|
||||
@classmethod
|
||||
def set_number(cls, sales):
|
||||
|
||||
Reference in New Issue
Block a user