Skip to content

[FIX] product_replenishment_cost: correct misleading update wizard message - #918

Closed
les-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-h-123474-les
Closed

[FIX] product_replenishment_cost: correct misleading update wizard message#918
les-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-h-123474-les

Conversation

@les-adhoc

@les-adhoc les-adhoc commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The "Update Accounting Cost from Replenishment Cost" wizard message stated the action only applied to products with the "Standard Price" costing method:

This will apply to all the selected products across company with costing method "Standard Price" and with Replenishment Cost different from 0.

However, _update_cost_from_replenishment_cost() in product_template.py overwrites standard_price for products of any costing method — it only filters replenishment_cost != 0 and never checks the category costing method. This was reproduced on an AVCO category, where the cost went from 0 to a non-zero value on confirm.

Change

The action itself is intentional (useful e.g. for currency-based valuation), so the behavior is not blocked. Only the wizard message is corrected so it no longer restricts the scope to the "Standard Price" costing method:

This will apply to all the selected products across company with a Replenishment Cost different from 0.

Source terms re-exported (.pot). Translations are handled by the usual Transifex sync.

Test plan

  • Open a product list, select products in a category using AVCO (or FIFO) with a Replenishment Cost != 0.
  • Run Update Accounting Cost from Replenishment Cost.
  • The wizard message no longer claims it only applies to "Standard Price"; confirming still updates the accounting cost as before.

Ref: https://www.adhoc.inc/odoo/action-helpdesk.helpdesk_ticket_action_main/123474

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@les-adhoc
les-adhoc force-pushed the 19.0-h-123474-les branch 3 times, most recently from 0c8e27d to 424fb5d Compare July 22, 2026 14:09
@jcadhoc

jcadhoc commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

@roboadhoc

Copy link
Copy Markdown
Contributor

@jcadhoc you may want to rebuild or fix this PR as it has failed CI.

@mav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc rebuild

@roboadhoc

Copy link
Copy Markdown
Contributor

@mav-adhoc unknown command 'rebuild'.

For your own safety I've ignored everything in your entire comment.

Currently available commands:

command
help displays this help
r(eview)+ approves the PR, if it's a forwardport also approves all non-detached parents
r(eview)=<number> only approves the specified parents
r(eview)- removes approval of a previously approved PR, if the PR is staged the staging will be cancelled
retry re-tries staging a PR in the "error" state
fw=no does not forward-port this PR
fw=default forward-ports this PR normally
fw=skipci does not wait for a forward-port's statuses to succeed before creating the next one
fw=skipmerge does not wait for the source to be merged before creating forward ports
up to <branch> only ports this PR forward to the specified branch (included)
merge integrate the PR with a simple merge commit, using the PR description as message
rebase-merge rebases the PR on top of the target branch the integrates with a merge commit, using the PR description as message
rebase-ff rebases the PR on top of the target branch, then fast-forwards
squash squashes the PR as a single commit on the target branch, using the PR description as message
delegate+ grants approval rights to the PR author
delegate=<...> grants approval rights on this PR to the specified github users
nice only stages the PR if there's room in the batch after default PRs
default stages the PR normally
priority tries to stage this PR first, then adds default PRs if the staging has room
alone stages this PR only with other PRs of the same priority
cancel=staging automatically cancels the current staging when this PR becomes ready
check fetches or refreshes PR metadata, resets mergebot state
remindme:<branch>=<message> When the PR gets forward-ported to , ping you with . can be quoted if it needs spaces.

Note: this help text is dynamic and will change with the state of the PR.

@mav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc retry

@roboadhoc

Copy link
Copy Markdown
Contributor

@mav-adhoc retry makes no sense when the PR is not in error.

@les-adhoc
les-adhoc force-pushed the 19.0-h-123474-les branch 3 times, most recently from 72485e6 to aaa6d35 Compare July 27, 2026 20:03
…ssage

The "Update Accounting Cost from Replenishment Cost" wizard stated the
action only applied to products with the "Standard Price" costing method.
However, _update_cost_from_replenishment_cost() overwrites standard_price
for products of any costing method (it only filters replenishment_cost != 0),
as reproduced on an AVCO category where the cost went from 0 to a non-zero
value on confirm.

The action itself is intentional (e.g. currency-based valuation), so only
the message is corrected: it no longer restricts the scope to the
"Standard Price" costing method. Source terms re-exported (.pot).
@les-adhoc
les-adhoc force-pushed the 19.0-h-123474-les branch from aaa6d35 to 26f2b36 Compare July 28, 2026 12:41
@jcadhoc

jcadhoc commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

@roboadhoc roboadhoc closed this in 98cf87a Jul 28, 2026
@roboadhoc
roboadhoc deleted the 19.0-h-123474-les branch July 28, 2026 13:28
@roboadhoc roboadhoc added the 18.1 label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants