Browse Source

[IMP] handle case where an old cooperator subscribe again for shares

pull/1/head
houssine 6 years ago
parent
commit
6c4cb32a87
  1. 2
      easy_my_coop/models/account_invoice.py

2
easy_my_coop/models/account_invoice.py

@ -28,6 +28,8 @@ class account_invoice(models.Model):
sub_reg_num = sequence_id.next_by_id() sub_reg_num = sequence_id.next_by_id()
self.partner_id.write({'member':True,'old_member':False, self.partner_id.write({'member':True,'old_member':False,
'cooperator_register_number':int(sub_reg_num)}) 'cooperator_register_number':int(sub_reg_num)})
elif self.partner_id.old_member == False:
self.partner_id.write({'member':True,'old_member':False})
else: else:
mail_template_name = 'Share Increase - Payment Received Confirmation - Send By Email' mail_template_name = 'Share Increase - Payment Received Confirmation - Send By Email'
sequence_operation = obj_sequence.search([('name','=','Register Operation')])[0] sequence_operation = obj_sequence.search([('name','=','Register Operation')])[0]

Loading…
Cancel
Save