[MERGE] lp:~openerp-dev/openobject-addons/trunk-addons_issue2_sale-cha
bzr revid: stw@openerp.com-20120724134007-pkcwow7kwe90fe1v
This commit is contained in:
@@ -78,6 +78,7 @@ class task(osv.osv):
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
task_id = super(task, self).create(cr, uid, vals, context=context)
|
||||
task_browse = self.browse(cr, uid, task_id, context=context)
|
||||
self.pool.get('account.analytic.account').message_append_note(cr, uid, [task_browse.project_id.analytic_account_id.id], body=_("Task <em>%s</em> has been <b>created</b>.") % (task_browse.name), context=context)
|
||||
if task_browse.project_id.analytic_account_id:
|
||||
self.pool.get('account.analytic.account').message_append_note(cr, uid, [task_browse.project_id.analytic_account_id.id], body=_("Task <em>%s</em> has been <b>created</b>.") % (task_browse.name), context=context)
|
||||
return task_id
|
||||
task()
|
||||
|
||||
@@ -68,7 +68,7 @@ class delivery_carrier(osv.osv):
|
||||
'price' : fields.function(get_price, string='Price'),
|
||||
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the delivery carrier without removing it."),
|
||||
'normal_price': fields.float('Normal Price', help="Keep empty if the pricing depends on the advanced pricing per destination"),
|
||||
'free_if_more_than': fields.boolean('Free If More Than', help="If the order is more expensive than a certain amount, the customer can benefit from a free shipping"),
|
||||
'free_if_more_than': fields.boolean('Free If Order Total Amount Is More Than', help="If the order is more expensive than a certain amount, the customer can benefit from a free shipping"),
|
||||
'amount': fields.float('Amount', help="Amount of the order to benefit from a free shipping, expressed in the company currency"),
|
||||
'use_detailed_pricelist': fields.boolean('Advanced Pricing per Destination', help="Check this box if you want to manage delivery prices that depends on the destination, the weight, the total of the order, etc."),
|
||||
'pricelist_ids': fields.one2many('delivery.grid', 'carrier_id', 'Advanced Pricing'),
|
||||
|
||||
@@ -45,9 +45,9 @@ class procurement_order(osv.osv):
|
||||
|
||||
def _convert_qty_company_hours(self, cr, uid, procurement, context=None):
|
||||
product_uom = self.pool.get('product.uom')
|
||||
company_time_uom_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id
|
||||
if procurement.product_uom.id != company_time_uom_id:
|
||||
planned_hours = product_uom._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, company_time_uom_id)
|
||||
company_time_uom_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id
|
||||
if procurement.product_uom.id != company_time_uom_id.id and procurement.product_uom.category_id.id == company_time_uom_id.category_id.id:
|
||||
planned_hours = product_uom._compute_qty(cr, uid, procurement.product_uom.id, procurement.product_qty, company_time_uom_id.id)
|
||||
else:
|
||||
planned_hours = procurement.product_qty
|
||||
return planned_hours
|
||||
@@ -71,7 +71,7 @@ class procurement_order(osv.osv):
|
||||
task_id = project_task.create(cr, uid, {
|
||||
'name': '%s:%s' % (procurement.origin or '', procurement.product_id.name),
|
||||
'date_deadline': procurement.date_planned,
|
||||
'planned_hours':planned_hours,
|
||||
'planned_hours': planned_hours,
|
||||
'remaining_hours': planned_hours,
|
||||
'user_id': procurement.product_id.product_manager.id,
|
||||
'notes': procurement.note,
|
||||
|
||||
Reference in New Issue
Block a user