Merge branch 'master-account-discount' into 'master'
Improve code of prepare invoice vals and increase width of div See merge request flectra-hq/flectra!86
This commit is contained in:
commit
db6cd01722
@ -4,7 +4,7 @@
|
|||||||
<xpath expr="//div/div[hasclass('clearfix')]" position="replace">
|
<xpath expr="//div/div[hasclass('clearfix')]" position="replace">
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<div id="total" class="row">
|
<div id="total" class="row">
|
||||||
<div class="col-xs-4 pull-right">
|
<div class="col-xs-5 pull-right">
|
||||||
<table class="table table-condensed" style="min-width: 250px;max-width: 400px;">
|
<table class="table table-condensed" style="min-width: 250px;max-width: 400px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>Gross Amount</strong></td>
|
<td><strong>Gross Amount</strong></td>
|
||||||
|
@ -145,13 +145,11 @@ class SaleOrder(models.Model):
|
|||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _prepare_invoice(self):
|
def _prepare_invoice(self):
|
||||||
sale_order = self.env['sale.order'].browse(
|
|
||||||
self._context.get('active_ids', []))
|
|
||||||
invoice_vals = super(SaleOrder, self)._prepare_invoice()
|
invoice_vals = super(SaleOrder, self)._prepare_invoice()
|
||||||
invoice_vals.update({
|
invoice_vals.update({
|
||||||
'discount_method': sale_order.discount_method,
|
'discount_method': self.discount_method,
|
||||||
'discount_amount': sale_order.discount_amount,
|
'discount_amount': self.discount_amount,
|
||||||
'discount_per': sale_order.discount_per,
|
'discount_per': self.discount_per,
|
||||||
'discount': sale_order.discount,
|
'discount': self.discount,
|
||||||
})
|
})
|
||||||
return invoice_vals
|
return invoice_vals
|
||||||
|
Loading…
Reference in New Issue
Block a user