[FIX] fields: correct sides effect of change to old api
The commit 3269ad8f
get back the behaviour of 7.0 (which changed in
october 2014) that when a field is overrided via the old api, attributes
of a previous definition of the field are lost.
This fix corrects the case when this behaviour might have had an effect
so specified attributes overrided don't get lost.
related to opw-639712
This commit is contained in:
parent
3269ad8f48
commit
8ae67f6a54
|
@ -38,7 +38,7 @@ class account_voucher(osv.osv):
|
|||
_columns = {
|
||||
'amount_in_word' : fields.char("Amount in Word", readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'allow_check' : fields.related('journal_id', 'allow_check_writing', type='boolean', string='Allow Check Writing'),
|
||||
'number': fields.char('Number'),
|
||||
'number': fields.char('Number', readonly=True),
|
||||
}
|
||||
|
||||
def _amount_to_text(self, cr, uid, amount, currency_id, context=None):
|
||||
|
|
|
@ -188,7 +188,7 @@ class crm_lead2opportunity_mass_convert(osv.osv_memory):
|
|||
|
||||
_columns = {
|
||||
'user_ids': fields.many2many('res.users', string='Salesmen'),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team', select=True),
|
||||
'deduplicate': fields.boolean('Apply deduplication', help='Merge with existing leads/opportunities of each partner'),
|
||||
'action': fields.selection([
|
||||
('each_exist_or_create', 'Use existing partner or create'),
|
||||
|
|
|
@ -30,7 +30,7 @@ class hr_grant_badge_wizard(osv.TransientModel):
|
|||
'employee_id': fields.many2one("hr.employee", string='Employee', required=True),
|
||||
'user_id': fields.related("employee_id", "user_id",
|
||||
type="many2one", relation="res.users",
|
||||
store=True, string='User')
|
||||
store=True, string='User', required=True)
|
||||
}
|
||||
|
||||
def action_grant_badge(self, cr, uid, ids, context=None):
|
||||
|
@ -57,4 +57,4 @@ class hr_grant_badge_wizard(osv.TransientModel):
|
|||
|
||||
badge_user = badge_user_obj.create(cr, uid, values, context=context)
|
||||
result = badge_user_obj._send_badge(cr, uid, [badge_user], context=context)
|
||||
return result
|
||||
return result
|
||||
|
|
|
@ -224,7 +224,7 @@ class account_invoice(osv.osv):
|
|||
_columns = {
|
||||
'reference': fields.char('Communication', help="The partner reference of this invoice."),
|
||||
'reference_type': fields.selection(_get_reference_type, 'Communication Type',
|
||||
required=True),
|
||||
required=True, readonly=True),
|
||||
}
|
||||
_constraints = [
|
||||
(_check_communication, 'Invalid BBA Structured Communication !', ['Communication']),
|
||||
|
|
Loading…
Reference in New Issue