From 8ae67f6a5412ccde126bf8c85849f33f387df198 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 11 Jun 2015 17:05:43 +0200 Subject: [PATCH] [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 --- addons/account_check_writing/account_voucher.py | 2 +- addons/crm/wizard/crm_lead_to_opportunity.py | 2 +- addons/hr_gamification/wizard/grant_badge.py | 4 ++-- addons/l10n_be_invoice_bba/invoice.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account_check_writing/account_voucher.py b/addons/account_check_writing/account_voucher.py index 1e635f3dd53..e85184a07b9 100644 --- a/addons/account_check_writing/account_voucher.py +++ b/addons/account_check_writing/account_voucher.py @@ -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): diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index 5f8727eb6da..ee0db8585e4 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -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'), diff --git a/addons/hr_gamification/wizard/grant_badge.py b/addons/hr_gamification/wizard/grant_badge.py index b8a51044d4c..e6247a1cd8c 100644 --- a/addons/hr_gamification/wizard/grant_badge.py +++ b/addons/hr_gamification/wizard/grant_badge.py @@ -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 \ No newline at end of file + return result diff --git a/addons/l10n_be_invoice_bba/invoice.py b/addons/l10n_be_invoice_bba/invoice.py index a84b783372e..92796d409b9 100644 --- a/addons/l10n_be_invoice_bba/invoice.py +++ b/addons/l10n_be_invoice_bba/invoice.py @@ -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']),