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

bzr revid: rpa@tinyerp.com-20110117135136-4xtzqi6y6sr8nfxe
This commit is contained in:
rpa (Open ERP)
2011-01-17 19:21:36 +05:30
2 changed files with 15 additions and 3 deletions
+12 -2
View File
@@ -208,6 +208,8 @@ class stock_location(osv.osv):
'stock_virtual_value': fields.function(_product_value, method=True, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),
'company_id': fields.many2one('res.company', 'Company', select=1, help='Let this field empty if this location is shared between all companies'),
'scrap_location': fields.boolean('Scrap Location', help='Check this box to allow using this location to put scrapped/damaged goods.'),
'valuation_in_account_id': fields.many2one('account.account', 'Valuation In Account',domain = [('type','=','regular')], help='This account will be used for incoming move for this location, instead of account from Product variation account.'),
'valuation_out_account_id': fields.many2one('account.account', 'Valuation Out Account',domain = [('type','=','regular')], help='This account will be used for outgoing move for this location, instead of account from Product variation account.'),
}
_defaults = {
'active': True,
@@ -1985,8 +1987,16 @@ class stock_move(osv.osv):
"""
product_obj=self.pool.get('product.product')
accounts = product_obj.get_product_accounts(cr, uid, move.product_id.id, context)
acc_src = accounts['stock_account_input']
acc_dest = accounts['stock_account_output']
if move.location_id.valuation_out_account_id:
acc_src = move.location_id.valuation_out_account_id.id
else:
acc_src = accounts['stock_account_input']
if move.location_dest_id.valuation_in_account_id:
acc_dest = move.location_dest_id.valuation_in_account_id.id
else:
acc_dest = accounts['stock_account_output']
acc_variation = accounts.get('property_stock_variation', False)
journal_id = accounts['stock_journal']
+3 -1
View File
@@ -410,7 +410,7 @@
<field name="context">{'full':'1',"search_default_available":1}</field>
<field name="help">This is the list of all the production lots (serial numbers) you recorded. When you select a lot, you can get the upstream or downstream traceability of the products contained in lot. By default, the list is filtred on the serial numbers that are available in your warehouse but you can uncheck the 'Available' button to get all the lots you produced, received or delivered to customers.</field>
</record>
<menuitem action="action_production_lot_form" id="menu_action_production_lot_form"
<menuitem action="action_production_lot_form" id="menu_action_production_lot_form"
parent="menu_traceability" groups="base.group_extended"
sequence="1"/>
@@ -493,6 +493,8 @@
<field name="chained_auto_packing"/>
<field name="chained_delay"/>
<field name="chained_journal_id"/>
<field name="valuation_in_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}"/>
<field name="valuation_out_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}"/>
<field name="chained_picking_type"/>
<field name="chained_company_id" widget="selection"/>
</group>