[IMP] website_quote: use template's Terms & Conditions
by default, if not the company's configured terms & Conditions will be applied. Also change the placeholder of Terms & Conditions in the quotation template.
This commit is contained in:
committed by
Denis Vermylen
parent
623f3cda93
commit
8aa66e36a3
@@ -77,6 +77,11 @@ class SaleOrder(models.Model):
|
||||
total += line.price_subtotal + line.price_unit * ((line.discount or 0.0) / 100.0) * line.product_uom_qty # why is there a discount in a field named amount_undiscounted ??
|
||||
self.amount_undiscounted = total
|
||||
|
||||
@api.onchange('partner_id')
|
||||
def onchange_partner_id(self):
|
||||
super(SaleOrder, self).onchange_partner_id()
|
||||
self.note = self.template_id.note or self.note
|
||||
|
||||
@api.onchange('template_id')
|
||||
def onchange_template_id(self):
|
||||
if not self.template_id:
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</page>
|
||||
</notebook>
|
||||
<field name="website_description" invisible="1"/>
|
||||
<field name="note" placeholder="An administrator can set up default Terms and conditions in your Company settings." nolabel="1"/>
|
||||
<field name="note" placeholder="These Terms & Conditions will replace the default ones set in the Configuration menu." nolabel="1"/>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user