|
@ -285,7 +285,9 @@ class operation_request(models.Model): |
|
|
partner = self.subscription_request.create_coop_partner() |
|
|
partner = self.subscription_request.create_coop_partner() |
|
|
# get cooperator number |
|
|
# get cooperator number |
|
|
sub_reg_num = int(sequence_id.next_by_id()) |
|
|
sub_reg_num = int(sequence_id.next_by_id()) |
|
|
partner_vals = sub_request.get_eater_vals(partner, self.share_product_id) |
|
|
|
|
|
|
|
|
partner_vals.update(sub_request.get_eater_vals( |
|
|
|
|
|
partner, |
|
|
|
|
|
self.share_product_id)) |
|
|
partner_vals['cooperator_register_number'] = sub_reg_num |
|
|
partner_vals['cooperator_register_number'] = sub_reg_num |
|
|
partner.write(partner_vals) |
|
|
partner.write(partner_vals) |
|
|
self.partner_id_to = partner |
|
|
self.partner_id_to = partner |
|
@ -295,9 +297,9 @@ class operation_request(models.Model): |
|
|
if self.partner_id_to.cooperator_register_number == 0: |
|
|
if self.partner_id_to.cooperator_register_number == 0: |
|
|
sub_reg_num = int(sequence_id.next_by_id()) |
|
|
sub_reg_num = int(sequence_id.next_by_id()) |
|
|
partner_vals['cooperator_register_number'] = sub_reg_num |
|
|
partner_vals['cooperator_register_number'] = sub_reg_num |
|
|
partner_vals = sub_request.get_eater_vals( |
|
|
|
|
|
|
|
|
partner_vals.update(sub_request.get_eater_vals( |
|
|
self.partner_id_to, |
|
|
self.partner_id_to, |
|
|
self.share_product_id) |
|
|
|
|
|
|
|
|
self.share_product_id)) |
|
|
partner_vals['old_member'] = False |
|
|
partner_vals['old_member'] = False |
|
|
self.partner_id_to.write(partner_vals) |
|
|
self.partner_id_to.write(partner_vals) |
|
|
# remove the parts to the giver |
|
|
# remove the parts to the giver |
|
|