[MERGE]: Merge with lp:~openerp-dev/openobject-addons/ksa-addons2

bzr revid: rpa@tinyerp.com-20110203131511-dan3b3e2l876xxbt
This commit is contained in:
rpa (Open ERP) 2011-02-03 18:45:11 +05:30
commit 3a9316b52a
3 changed files with 7 additions and 11 deletions

View File

@ -28,6 +28,7 @@
<field name="name">procurement.order.tree.board</field>
<field name="model">procurement.order</field>
<field name="type">tree</field>
<field eval="20" name="priority"/>
<field name="arch" type="xml">
<tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state in ('exception');black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('ready')">
<field name="date_planned" widget="date"/>
@ -246,8 +247,8 @@
<act_window
context="{'search_default_warehouse_id': active_id}"
id="act_stock_warehouse_2_stock_warehouse_orderpoint"
name="Minimum Stock Rules"
res_model="stock.warehouse.orderpoint"
name="Minimum Stock Rules"
res_model="stock.warehouse.orderpoint"
src_model="stock.warehouse"
groups="stock.group_stock_user"/>

View File

@ -170,7 +170,7 @@ class purchase_order(osv.osv):
'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, change_default=True),
'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True,
states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},domain="[('partner_id', '=', partner_id)]"),
'dest_address_id':fields.many2one('res.partner.address', 'Destination Address',
'dest_address_id':fields.many2one('res.partner.address', 'Destination Address', domain="[('partner_id', '!=', False)]",
states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},
help="Put an address if you want to deliver directly from the supplier to the customer." \
"In this case, it will remove the warehouse link and set the customer location."

View File

@ -1463,7 +1463,7 @@ class stock_move(osv.osv):
_description = "Stock Move"
_order = 'date_expected desc, id'
_log_create = False
def action_partial_move(self, cr, uid, ids, context=None):
if context is None: context = {}
partial_id = self.pool.get("stock.partial.move").create(
@ -1481,7 +1481,7 @@ class stock_move(osv.osv):
'domain': '[]',
'context': context
}
def name_get(self, cr, uid, ids, context=None):
res = []
@ -1855,11 +1855,6 @@ class stock_move(osv.osv):
"""
moves = self.browse(cr, uid, ids, context=context)
self.write(cr, uid, ids, {'state': 'confirmed'})
res_obj = self.pool.get('res.company')
location_obj = self.pool.get('stock.location')
move_obj = self.pool.get('stock.move')
wf_service = netsvc.LocalService("workflow")
self.create_chained_picking(cr, uid, moves, context)
return []
@ -2143,7 +2138,7 @@ class stock_move(osv.osv):
prodlot_id = partial_datas and partial_datas.get('move%s_prodlot_id' % (move.id), False)
if prodlot_id:
self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}, context=context)
if move.state not in ('confirmed','done'):
if move.state not in ('confirmed','done','assigned'):
self.action_confirm(cr, uid, move_ids, context=context)
self.write(cr, uid, move_ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)