[FIX] agreement_legal: copy agreement not get the current agreement I… - #133
Conversation
| @@ -487,6 +487,7 @@ def copy(self, default=None): | |||
| section_map[section.id] = new_section.id | |||
| for clause in self.clauses_ids: | |||
| values = {"agreement_id": res.id} | |||
There was a problem hiding this comment.
| values = {"agreement_id": res.id} | |
| values = { | |
| "agreement_id": res.id, | |
| "temp_agreement_id": res.id, | |
| } |
eb2971c to
4254c50
Compare
|
Hi @max3903 , can be merge? |
|
Thanks for the fix — the One related gap: https://github.com/OCA/agreement/blob/18.0/agreement_legal/models/agreement.py#L297-L301 That path has the same symptom after “reset from template”. Could you apply the same Otherwise LGTM for merging the copy fix as-is and doing that as a tiny follow-up. |
Sure @max3903 , no problem, I'll add the other correction and the test |
…D for temp_agreement_id
4254c50 to
882803c
Compare
|
Hi @max3903 , I've already made the changes, can you check? |
|
/ocabot merge patch |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at d337a0b. Thanks a lot for contributing to OCA. ❤️ |
When an agreement is copied from the template, the temp_agreement_id does not pick up the ID of the new agreement, which makes it impossible to select the section of the created agreement.
cc https://github.com/APSL
@shirashi3771 @palomagrc93 @miquelalzanillas @peluko00 @BernatObrador @cubells @miquelpascual @ppyczko @isugac @javierobcn please review.