[ADD] Replace and add fields in Donation
This commit is contained in:
parent
45a70d3c2e
commit
ebed704f36
|
|
@ -281,6 +281,14 @@ class ResPartner(models.Model):
|
|||
if 'mobile' in vals:
|
||||
self._check_phone_numbers(vals['mobile'])
|
||||
vals['mobile'] = self.phone_format(vals['mobile'])
|
||||
if 'name' in vals :
|
||||
if self.kafel_id:
|
||||
self.kafel_id.name = vals['name']
|
||||
|
||||
if 'mobile' in vals :
|
||||
if self.kafel_id:
|
||||
self.kafel_id.login = vals['mobile']
|
||||
|
||||
res = super(ResPartner, self).write(vals)
|
||||
return res
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
</group>
|
||||
<group name="group_top">
|
||||
<group name="group_main" colspan="2">
|
||||
<field name="mobile" string="رقم الجوال" widget="phone" placeholder="05xxxxxxxx" attrs="{'required': [('parent_id', '=', False)]}"/>
|
||||
<field name="mobile" string="رقم الجوال" widget="phone" placeholder="05xxxxxxxx" attrs="{'required': [('parent_id', '=', False)]}" options="{'maxlength': 10}"/>
|
||||
<field name="preferred_communication" string="طريقة التواصل المفضلة" required="1"/>
|
||||
<field name="gender" attrs="{'required': [('company_type', '=', 'person')],'invisible': [('company_type', '!=', 'person')]}"/>
|
||||
<field name="street" attrs="{'invisible': [('company_type', '=', 'person')]}"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue