[FIX] stock: fixed the type of account on valuation_in_account_id and valuation_out_account_id and fixed its label too. Also, improved the form view of stock.location for these 2 fields
bzr revid: qdp-launchpad@tinyerp.com-20110117165944-g50z4f6trn3qfit3
This commit is contained in:
parent
c687a3386d
commit
e183f98ad1
|
@ -208,8 +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.'),
|
||||
'valuation_in_account_id': fields.many2one('account.account', 'Stock Input Account',domain = [('type','=','other')], help='This account will be used to value stock moves that have this location as destination, instead of the stock output account from the product.'),
|
||||
'valuation_out_account_id': fields.many2one('account.account', 'Stock Output Account',domain = [('type','=','other')], help='This account will be used ta value stock moves that have this location as source, instead of the stock input account from the product.'),
|
||||
}
|
||||
_defaults = {
|
||||
'active': True,
|
||||
|
@ -2018,7 +2018,6 @@ class stock_move(osv.osv):
|
|||
if not acc_variation:
|
||||
raise osv.except_osv(_('Error!'), _('There is no inventory variation account defined on the product category: "%s" (id: %d)') % \
|
||||
(move.product_id.categ_id.name, move.product_id.categ_id.id,))
|
||||
|
||||
return journal_id, acc_src, acc_dest, acc_variation
|
||||
|
||||
def _get_reference_accounting_values_for_valuation(self, cr, uid, move, context=None):
|
||||
|
|
|
@ -493,8 +493,6 @@
|
|||
<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>
|
||||
|
@ -503,6 +501,9 @@
|
|||
<field name="posx"/>
|
||||
<field name="posy"/>
|
||||
<field name="posz"/>
|
||||
<separator string="Accounting Information" colspan="2" groups="base.group_extended"/>
|
||||
<field name="valuation_in_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}" groups="base.group_extended"/>
|
||||
<field name="valuation_out_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}" groups="base.group_extended"/>
|
||||
</group>
|
||||
<separator string="Additional Information" colspan="4"/>
|
||||
<field colspan="4" name="comment" nolabel="1"/>
|
||||
|
|
Loading…
Reference in New Issue