contract icon indicating copy to clipboard operation
contract copied to clipboard

[ADD] contract_sale_generation_payment_mode

Open victor-champonnois opened this issue 1 year ago • 7 comments

Set the payment mode from the contract on sales orders created by the contract.

victor-champonnois avatar Jan 13 '25 10:01 victor-champonnois

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Jul 27 '25 12:07 github-actions[bot]

@OCA/human-resources-maintainers could someone please review or merge this?

huguesdk avatar Aug 04 '25 14:08 huguesdk

@victor-champonnois Thanks for this. Maybe a little test ? Thanks

rousseldenis avatar Sep 15 '25 08:09 rousseldenis

@rousseldenis thanks, I've added some tests

victor-champonnois avatar Sep 17 '25 10:09 victor-champonnois

I don't manage to see why the codecov stays red, an idea on how to fix this ? It states that these lines are not covered, but I don't see a way to cover them more than what I've already did. Can someone help ? :)

+         res = super()._prepare_recurring_sales_values(date_ref)
+         if res:
+             res[0]["payment_mode_id"] = self.payment_mode_id.id
+         return res

victor-champonnois avatar Sep 18 '25 07:09 victor-champonnois

according to the logs and the coverage report, the test files are loaded, but the tests don’t run. those of contract_sale_generation don’t run either. this is due to a recent change in the tests of contract_sale_generation (in #1201). i fixed it in #1305 (and tagged the tests as post_install here also). i think the coverage will be fine as soon as #1305 is merged.

huguesdk avatar Sep 19 '25 10:09 huguesdk

many thanks @huguesdk !

victor-champonnois avatar Sep 19 '25 11:09 victor-champonnois