|
|
@ -23,10 +23,10 @@ class account_invoice(models.Model): |
|
|
|
mail_template_name = 'Payment Received Confirmation - Send By Email' |
|
|
|
|
|
|
|
# if not yet cooperator we generate a cooperator number |
|
|
|
if self.partner_id.member == False : |
|
|
|
if self.partner_id.member == False and self.partner_id.old_number == False: |
|
|
|
sequence_id = obj_sequence.search([('name','=','Subscription Register')])[0] |
|
|
|
sub_reg_num = sequence_id.next_by_id() |
|
|
|
self.partner_id.write({'member':True, |
|
|
|
self.partner_id.write({'member':True,'old_member':False, |
|
|
|
'cooperator_register_number':int(sub_reg_num)}) |
|
|
|
else: |
|
|
|
mail_template_name = 'Share Increase - Payment Received Confirmation - Send By Email' |
|
|
|