'property_stock_account_input':fields.many2one('account.account', 'Stock Input Account', required=True),
'property_stock_account_output':fields.many2one('account.account', 'Stock Output Account', required=True),
- 'property_stock_journal':fields.many2one('account.journal', 'Stock journal', required=True),
-
-# 'property_stock_account_input': fields.property('account.account',
-# type='many2one', relation='account.account',
-# string='Stock Input Account', method=True, view_load=True,
-# help='This account will be used, instead of the default one, to value input stock'),
-# 'property_stock_account_output': fields.property('account.account',
-# type='many2one', relation='account.account',
-# string='Stock Output Account', method=True, view_load=True,
-# help='This account will be used, instead of the default one, to value output stock'),
-#
-# 'property_stock_journal': fields.property('account.journal',
-# relation='account.journal', type='many2one',
-# string='Stock journal', method=True, view_load=True,
-# required = True,
-# help="This journal will be used for the accounting move generated by stock move"),
-
- 'enable_acc':fields.boolean('Enable Related Account',),
+ 'property_stock_journal':fields.many2one('account.journal', 'Stock journal', required=True),
+ 'enable_stock_in_out_acc':fields.boolean('Enable Related Account',),
}
def default_get(self, cr, uid, fields, context):
res.update({'property_stock_account_output': stock_output_acc})
if 'property_stock_journal' in fields:
res.update({'property_stock_journal': journal_id})
- if 'enable_acc' in fields:
- res.update({'enable_acc': True})
+ if 'enable_stock_in_out_acc' in fields:
+ res.update({'enable_stock_in_out_acc': True})
return res
price = product_obj.standard_price
diff = price - new_price
if diff > 0 :
- return {'value' : {'enable_acc':False}}
+ return {'value' : {'enable_stock_in_out_acc':False}}
else :
- return {'value' : {'enable_acc':True}}
+ return {'value' : {'enable_stock_in_out_acc':True}}
def change_price(self, cr, uid, ids, context):
"""