[IMP] sale, website_quote: expiration date is usefull even without using the website_quote module, therefore movign the field to the sale module. It has also be added to the email templates defined in sale and portal_sale, as well as in reports.

This commit is contained in:
Mitesh Savani
2014-09-02 10:14:30 +02:00
committed by Thibault Delavallée
parent a6a46f4279
commit 77bd5181f7
7 changed files with 10 additions and 4 deletions
+3
View File
@@ -26,6 +26,9 @@
&nbsp;&nbsp;Order number: <strong>${object.name}</strong><br />
&nbsp;&nbsp;Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
&nbsp;&nbsp;Order date: ${object.date_order}<br />
% if object.validity_date and object.state in ('draft', 'sent'):
&nbsp;&nbsp;Expiration date: ${object.validity_date}<br />
% endif
% if object.origin:
&nbsp;&nbsp;Order reference: ${object.origin}<br />
% endif
@@ -40,6 +40,9 @@
&nbsp;&nbsp;Order number: <strong>${object.name}</strong><br />
&nbsp;&nbsp;Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
&nbsp;&nbsp;Order date: ${object.date_order}<br />
% if object.validity_date and object.state in ('draft', 'sent'):
&nbsp;&nbsp;Expiration date: ${object.validity_date}<br />
% endif
% if object.origin:
&nbsp;&nbsp;Order reference: ${object.origin}<br />
% endif
+1
View File
@@ -190,6 +190,7 @@ class sale_order(osv.osv):
in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception).\nThe 'Waiting Schedule' status is set when the invoice is confirmed\
but waiting for the scheduler to run on the order date.", select=True),
'date_order': fields.datetime('Date', required=True, readonly=True, select=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, copy=False),
'validity_date': fields.date('Expiration Date', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),
'create_date': fields.datetime('Creation Date', readonly=True, select=True, help="Date on which sales order is created."),
'date_confirm': fields.date('Confirmation Date', readonly=True, select=True, help="Date on which sales order is confirmed.", copy=False),
'user_id': fields.many2one('res.users', 'Salesperson', states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, select=True, track_visibility='onchange'),
+1
View File
@@ -203,6 +203,7 @@
<field name="section_id" options="{'no_create': True}" groups="base.group_multi_salesteams"/>
<field groups="base.group_no_one" name="origin"/>
<field name="client_order_ref"/>
<field name="validity_date"/>
</group>
<group name="sale_pay">
<field name="payment_term" options="{'no_create': True}"/>
+2 -2
View File
@@ -45,8 +45,8 @@
<strong>Salesperson:</strong>
<p t-field="o.user_id.name"/>
</div>
<div t-if="o.validity_date" class="col-xs-3">
<strong>Validity Date:</strong>
<div t-if="o.validity_date and o.state in ['draft','sent']" class="col-xs-3">
<strong>Expiration Date:</strong>
<p t-field="o.validity_date"/>
</div>
<div t-if="o.payment_term" class="col-xs-3">
-1
View File
@@ -114,7 +114,6 @@ class sale_order(osv.osv):
'template_id': fields.many2one('sale.quote.template', 'Quote Template', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),
'website_description': fields.html('Description'),
'options' : fields.one2many('sale.order.option', 'order_id', 'Optional Products Lines', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),
'validity_date': fields.date('Validity Date', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),
'amount_undiscounted': fields.function(_get_total, string='Amount Before Discount', type="float",
digits_compute=dp.get_precision('Account'))
}
@@ -28,7 +28,6 @@
</xpath>
<xpath expr="//field[@name='client_order_ref']" position="after">
<field name="template_id" on_change="onchange_template_id(template_id, partner_id, fiscal_position)"/>
<field name="validity_date" attrs="{'invisible': [('template_id','=',False)]}"/>
<field name="website_description" invisible="1"/>
</xpath>
</field>