Browse Source
Merge pull request #80 from coopiteasy/12.0-fix-coop-member-transfer
[FIX] partner_vals was replaced by call to function.
pull/87/head
12.0-2020-04-20.00
Houssine BAKKALI
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
3 deletions
-
easy_my_coop/models/operation_request.py
|
|
@ -285,7 +285,9 @@ class operation_request(models.Model): |
|
|
|
partner = self.subscription_request.create_coop_partner() |
|
|
|
# get cooperator number |
|
|
|
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.write(partner_vals) |
|
|
|
self.partner_id_to = partner |
|
|
@ -295,9 +297,9 @@ class operation_request(models.Model): |
|
|
|
if self.partner_id_to.cooperator_register_number == 0: |
|
|
|
sub_reg_num = int(sequence_id.next_by_id()) |
|
|
|
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.share_product_id) |
|
|
|
self.share_product_id)) |
|
|
|
partner_vals['old_member'] = False |
|
|
|
self.partner_id_to.write(partner_vals) |
|
|
|
# remove the parts to the giver |
|
|
|