[FIX] revert some changes

bzr revid: cha@tinyerp.com-20130214053352-p7ed5meqs0o985d3
This commit is contained in:
Ajay Chauhan (OpenERP)
2013-02-14 11:03:52 +05:30
parent 67d025a4cb
commit b8e5a3790d
2 changed files with 0 additions and 32 deletions
-15
View File
@@ -76,25 +76,14 @@ Example: Product: this product is deprecated, do not purchase more than 5.
'module_sale_stock': fields.boolean("Trigger delivery orders automatically from sales orders",
help="""Allows you to Make Quotation, Sale Order using different Order policy and Manage Related Stock.
This installs the module sale_stock."""),
'sale_note': fields.text('Terms & Conditions', translate=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
}
def onchange_company_id(self, cr, uid, ids, company_id):
res = {'value':{}}
if company_id:
company = self.pool.get('res.company').browse(cr, uid, company_id)
res['value'].update({'sale_note': company.sale_note})
return res
def default_get(self, cr, uid, fields, context=None):
ir_model_data = self.pool.get('ir.model.data')
res = super(sale_configuration, self).default_get(cr, uid, fields, context)
if res.get('module_project'):
user = self.pool.get('res.users').browse(cr, uid, uid, context)
res['time_unit'] = user.company_id.project_time_mode_id.id
res['sale_note'] = user.company_id.sale_note
res['company_id'] = user.company_id.id
else:
try:
product = ir_model_data.get_object(cr, uid, 'product', 'product_product_consultant')
@@ -126,10 +115,6 @@ Example: Product: this product is deprecated, do not purchase more than 5.
if wizard.module_project and wizard.time_unit:
user = self.pool.get('res.users').browse(cr, uid, uid, context)
user.company_id.write({'project_time_mode_id': wizard.time_unit.id})
if wizard.company_id:
self.pool.get('res.company').write(cr, uid, wizard.company_id.id, {'sale_note': wizard.sale_note}, context=context)
return {}
def onchange_task_work(self, cr, uid, ids, task_work, context=None):
-17
View File
@@ -32,23 +32,6 @@
</div>
</group>
</div>
<group name="Sale" position="before">
<group>
<label for="sale_note"/>
<div>
<div>
<label for="company_id" string="Select Company"/>
<field name="company_id"
widget="selection"
on_change="onchange_company_id(company_id)"
class="oe_inline"/>
</div>
<div>
<field name="sale_note" nolabel="1" class="oe_inline" placeholder="Terms &amp; Conditions"/>
</div>
</div>
</group>
</group>
<div name="Customer Features" position="inside">
<div>
<field name="group_sale_pricelist" class="oe_inline"/>