OCA / sale-reporting

GNU Affero General Public License v3.0
50 stars 193 forks source link

[15.0][FIX] sale_multicompany_reporting_currency: Fix multicompany_reporting_currency_rate calculation #209

Closed yankinmax closed 1 year ago

yankinmax commented 1 year ago

@ivantodorovich I would say I've written _compute_multicompany_reporting_currency_rate as much as close to compute_currency_rate to avoid any issues: https://github.com/odoo/odoo/blob/b396584515b51035c14f100bf6b90fc9f7606284/addons/sale/models/sale_order.py#L308 But, the condition when if not order.company_id seems redundant to me, because company_id is required on db level https://github.com/odoo/odoo/blob/b396584515b51035c14f100bf6b90fc9f7606284/addons/sale/models/sale_order.py#L259 So, no need to write extra test here.

yankinmax commented 1 year ago

@gurneyalex can you pls help to get it merged?

yankinmax commented 1 year ago

NOTE: pre-commit is failing because of an error caused by pre-commit initialisation itself. So, it's not related to a module.

simahawk commented 1 year ago

@yankinmax can you pls remove the odoo version from the commit msg?

simahawk commented 1 year ago

Need an update https://github.com/OCA/oca-addons-repo-template/issues/185 https://github.com/OCA/sale-reporting/pull/213

simahawk commented 1 year ago

/ocabot merge patch

OCA-git-bot commented 1 year ago

This PR looks fantastic, let's merge it! Prepared branch 15.0-ocabot-merge-pr-209-by-simahawk-bump-patch, awaiting test results.

OCA-git-bot commented 1 year ago

@simahawk your merge command was aborted due to failed check(s), which you can inspect on this commit of 15.0-ocabot-merge-pr-209-by-simahawk-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

simahawk commented 1 year ago

/ocabot merge patch

simahawk commented 1 year ago

FTR pre-commit was failing due to a broken download likely. Reported here anyway https://github.com/OCA/oca-addons-repo-template/issues/186

OCA-git-bot commented 1 year ago

What a great day to merge this nice PR. Let's do it! Prepared branch 15.0-ocabot-merge-pr-209-by-simahawk-bump-patch, awaiting test results.

OCA-git-bot commented 1 year ago

@simahawk The merge process could not be finalized, because command git push origin 15.0-ocabot-merge-pr-209-by-simahawk-bump-patch:15.0 failed with output:

To https://github.com/OCA/sale-reporting
 ! [remote rejected] 15.0-ocabot-merge-pr-209-by-simahawk-bump-patch -> 15.0 (cannot lock ref 'refs/heads/15.0': is at 26ee33fc3604bee3aa7e1cc619311c81c20e6327 but expected ec9e42d725ea171ff27826a9c4242160b8fd59c7)
error: failed to push some refs to 'https://***@github.com/OCA/sale-reporting'
OCA-git-bot commented 1 year ago

Congratulations, your PR was merged at 26ee33fc3604bee3aa7e1cc619311c81c20e6327. Thanks a lot for contributing to OCA. ❤️