[MERGE] forward port of branch saas-3 up to d3e7a8e
This commit is contained in:
commit
8ac8281a7f
|
@ -34,8 +34,9 @@ class stock_picking(osv.osv):
|
|||
total_weight = total_weight_net = 0.00
|
||||
|
||||
for move in picking.move_lines:
|
||||
total_weight += move.weight
|
||||
total_weight_net += move.weight_net
|
||||
if move.state != 'cancel':
|
||||
total_weight += move.weight
|
||||
total_weight_net += move.weight_net
|
||||
|
||||
res[picking.id] = {
|
||||
'weight': total_weight,
|
||||
|
@ -57,12 +58,12 @@ class stock_picking(osv.osv):
|
|||
'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
|
||||
store={
|
||||
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 40),
|
||||
'stock.move': (_get_picking_line, ['picking_id', 'product_id','product_uom_qty','product_uom'], 40),
|
||||
'stock.move': (_get_picking_line, ['state', 'picking_id', 'product_id','product_uom_qty','product_uom'], 40),
|
||||
}),
|
||||
'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
|
||||
store={
|
||||
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 40),
|
||||
'stock.move': (_get_picking_line, ['picking_id', 'product_id','product_uom_qty','product_uom'], 40),
|
||||
'stock.move': (_get_picking_line, ['state', 'picking_id', 'product_id','product_uom_qty','product_uom'], 40),
|
||||
}),
|
||||
'carrier_tracking_ref': fields.char('Carrier Tracking Ref', copy=False),
|
||||
'number_of_packages': fields.integer('Number of Packages', copy=False),
|
||||
|
|
|
@ -219,7 +219,7 @@ class mrp_production(osv.osv):
|
|||
workcenter_line.signal_workflow('button_done')
|
||||
return super(mrp_production,self).action_production_end(cr, uid, ids, context=context)
|
||||
|
||||
def action_in_production(self, cr, uid, ids):
|
||||
def action_in_production(self, cr, uid, ids, context=None):
|
||||
""" Changes state to In Production and writes starting date.
|
||||
@return: True
|
||||
"""
|
||||
|
@ -227,7 +227,7 @@ class mrp_production(osv.osv):
|
|||
for prod in self.browse(cr, uid, ids):
|
||||
if prod.workcenter_lines:
|
||||
workcenter_pool.signal_workflow(cr, uid, [prod.workcenter_lines[0].id], 'button_start_working')
|
||||
return super(mrp_production,self).action_in_production(cr, uid, ids)
|
||||
return super(mrp_production,self).action_in_production(cr, uid, ids, context=context)
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
""" Cancels work order if production order is canceled.
|
||||
|
|
|
@ -44,6 +44,7 @@ class sale_report(osv.osv):
|
|||
'nbr': fields.integer('# of Lines', readonly=True), # TDE FIXME master: rename into nbr_lines
|
||||
'state': fields.selection([
|
||||
('draft', 'Quotation'),
|
||||
('sent', 'Quotation Sent'),
|
||||
('waiting_date', 'Waiting Schedule'),
|
||||
('manual', 'Manual In Progress'),
|
||||
('progress', 'In Progress'),
|
||||
|
|
|
@ -37,7 +37,7 @@ class sale_order_line(osv.osv):
|
|||
to_cur = self.pool.get('product.pricelist').browse(cr, uid, [pricelist])[0].currency_id.id
|
||||
if product:
|
||||
product = self.pool['product.product'].browse(cr, uid, product, context=context)
|
||||
purchase_price = product.standard_price
|
||||
purchase_price = product.price_get(ptype='standard_price', context=dict(context, currency_id=to_cur))[product.id]
|
||||
to_uom = res.get('product_uom', uom)
|
||||
if to_uom != product.uom_id.id:
|
||||
purchase_price = self.pool['product.uom']._compute_price(cr, uid, product.uom_id.id, purchase_price, to_uom)
|
||||
|
|
|
@ -30,6 +30,7 @@ class sale_report(osv.osv):
|
|||
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse',readonly=True),
|
||||
'state': fields.selection([
|
||||
('draft', 'Quotation'),
|
||||
('sent', 'Quotation Sent'),
|
||||
('waiting_date', 'Waiting Schedule'),
|
||||
('manual', 'Manual In Progress'),
|
||||
('progress', 'In Progress'),
|
||||
|
|
Loading…
Reference in New Issue