[IMP] sale: rename field
quick quick before the feeze (saas-14)! to_invoice_ unnecessarily added to the field names.
This commit is contained in:
@@ -21,10 +21,10 @@ class CrmTeam(models.Model):
|
||||
string='Invoicing Target',
|
||||
help="Target of invoice revenue for the current month. This is the amount the sales "
|
||||
"channel estimates to be able to invoice this month.")
|
||||
quotations_to_invoice_count = fields.Integer(
|
||||
quotations_count = fields.Integer(
|
||||
compute='_compute_quotations_to_invoice',
|
||||
string='Number of quotations to invoice', readonly=True)
|
||||
quotations_to_invoice_amount = fields.Integer(
|
||||
quotations_amount = fields.Integer(
|
||||
compute='_compute_quotations_to_invoice',
|
||||
string='Amount of quotations to invoice', readonly=True)
|
||||
sales_to_invoice_count = fields.Integer(
|
||||
@@ -41,8 +41,8 @@ class CrmTeam(models.Model):
|
||||
('state', 'in', ['draft', 'sent']),
|
||||
], ['price_total', 'team_id', 'name'], ['team_id', 'name'], lazy=False)
|
||||
for rec in amounts:
|
||||
self.browse(rec['team_id'][0]).quotations_to_invoice_amount += rec['price_total']
|
||||
self.browse(rec['team_id'][0]).quotations_to_invoice_count += 1
|
||||
self.browse(rec['team_id'][0]).quotations_amount += rec['price_total']
|
||||
self.browse(rec['team_id'][0]).quotations_count += 1
|
||||
|
||||
@api.multi
|
||||
def _compute_sales_to_invoice(self):
|
||||
|
||||
@@ -62,16 +62,16 @@
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//t[@name='second_options']" position="after">
|
||||
<div class="row" t-if="record.quotations_to_invoice_count.raw_value">
|
||||
<div class="row" t-if="record.quotations_count.raw_value">
|
||||
<div class="col-xs-8">
|
||||
<a name="%(action_quotations_salesteams)d" type="action" context="{'search_default_draft': True, 'search_default_sent': True}">
|
||||
<field name="quotations_to_invoice_count"/>
|
||||
<t t-if="record.quotations_to_invoice_count.raw_value == 1">Quotation</t>
|
||||
<field name="quotations_count"/>
|
||||
<t t-if="record.quotations_count.raw_value == 1">Quotation</t>
|
||||
<t t-else="">Quotations</t>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<field name="quotations_to_invoice_amount" widget="monetary"/>
|
||||
<field name="quotations_amount" widget="monetary"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" name="orders_to_invoice" t-if="record.sales_to_invoice_count.raw_value">
|
||||
|
||||
Reference in New Issue
Block a user