[IMP] sale: rename field

quick quick before the feeze (saas-14)!

to_invoice_ unnecessarily added to the field names.
This commit is contained in:
Denis Vermylen
2017-01-04 16:01:10 +01:00
parent 79d73bc8a6
commit e8ff3bf2b2
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -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):
+4 -4
View File
@@ -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">