Skip to content

Conversation

@kobros-tech
Copy link
Contributor

No description provided.

chienandalu and others added 21 commits May 28, 2025 15:01
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_comparison_hide_price
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_comparison_hide_price/
@kobros-tech
Copy link
Contributor Author

Screenshot from 2025-05-28 14-47-29
Screenshot from 2025-05-28 14-49-57

@kobros-tech kobros-tech changed the title 18.0 mig website sale comparison hide price [18.0] [MIG] website_sale_comparison_hide_price: Migration to 18.0 May 28, 2025
@kobros-tech kobros-tech force-pushed the 18.0-mig-website_sale_comparison_hide_price branch from 9364bca to 105de26 Compare May 28, 2025 12:32
@mide-dynapps mide-dynapps mentioned this pull request Jun 27, 2025
40 tasks
@mide-dynapps
Copy link

any chance to have a fix ?

@kobros-tech
Copy link
Contributor Author

any chance to have a fix ?

Do you mean test cases?

@mide-dynapps
Copy link

regarding the checks failed. Is it possible to push a fix ?

@kobros-tech
Copy link
Contributor Author

regarding the checks failed. Is it possible to push a fix ?

yes, I put it in my schedule.

Copy link

@xaviedoanhduy xaviedoanhduy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work. I have a suggestion that we should hide this compare price display too.

image image

@xaviedoanhduy
Copy link

fyi, this is the new product compare layout without website_sale_comparison_hide_price module.

image

@kobros-tech kobros-tech force-pushed the 18.0-mig-website_sale_comparison_hide_price branch from 43a77d3 to 9767af7 Compare August 25, 2025 20:58
@kobros-tech
Copy link
Contributor Author

@xaviedoanhduy

it is a good idea to hide comparison field, should be merged in older versions too!

Copy link

@xaviedoanhduy xaviedoanhduy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pilarvargas-tecnativa
Copy link
Contributor

Please rebase

@kobros-tech kobros-tech force-pushed the 18.0-mig-website_sale_comparison_hide_price branch 4 times, most recently from 9767af7 to d675501 Compare November 25, 2025 06:23
@kobros-tech
Copy link
Contributor Author

@pilarvargas-tecnativa

Is OK?

@pilarvargas-tecnativa
Copy link
Contributor

I have the next error:

Odoo Server Error

RPC_ERROR
Odoo Server Error

Occured on oca-e-commerce-18-0-pr1057-d67550184927.runboat.odoo-community.org on 2025-11-25 15:06:49 GMT

Traceback (most recent call last):
  File "<2015>", line 253, in template_2015
  File "<2015>", line 121, in template_2015_content
  File "/opt/odoo/odoo/addons/base/models/ir_qweb.py", line 2483, in _get_widget
    content = converter.value_to_html(value, field_options)
  File "/opt/odoo/odoo/addons/base/models/ir_qweb_fields.py", line 479, in value_to_html
    raise ValueError(_("The value send to monetary field is not a number."))
ValueError: The value send to monetary field is not a number.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 2166, in _transactioning
    return service_model.retrying(func, env=self.env)
  File "/opt/odoo/odoo/service/model.py", line 156, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 2133, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 2381, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 754, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/addons/website_sale_comparison/controllers/main.py", line 42, in get_product_data
    'render': request.env['ir.ui.view']._render_template(
  File "/opt/odoo/addons/website/models/ir_ui_view.py", line 453, in _render_template
    return super()._render_template(template, values=values)
  File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 2218, in _render_template
    return self.env['ir.qweb']._render(template, values)
  File "/opt/odoo/odoo/tools/profiler.py", line 313, in _tracked_method_render
    return method_render(self, template, values, **options)
  File "/opt/odoo/odoo/addons/base/models/ir_qweb.py", line 611, in _render
    result = ''.join(rendering)
  File "<2015>", line 261, in template_2015
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
ValueError: The value send to monetary field is not a number.
Template: website_sale_comparison.product_product
Path: /t/div/div[2]/h6/div[1]/del[1]
Node: <del t-if="&#10;                website.website_show_price and not product.website_hide_price&#10;            " t-attf-class="text-muted me-1 h6 mb-0 small" style="white-space: nowrap;" t-esc="combination_info[\'compare_list_price\']" t-options="{\'widget\': \'monetary\', \'display_currency\': website.currency_id}"/>

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://oca-e-commerce-18-0-pr1057-d67550184927.runboat.odoo-community.org/web/assets/1/7f05d9f/web.assets_frontend_lazy.min.js:4533:165)
        at XMLHttpRequest.<anonymous> (http://oca-e-commerce-18-0-pr1057-d67550184927.runboat.odoo-community.org/web/assets/1/7f05d9f/web.assets_frontend_lazy.min.js:4538:13)

In a clean database, I install the module that is being migrated and contacts. When I enter /shop, that error appears without configuring anything.

image

@kobros-tech
Copy link
Contributor Author

@pilarvargas-tecnativa

The error is interesting, can you add the very same steps that I can follow to reproduce the bug?

If I can reproduce the error I can introduce the solution.

In OCA boat I cannot see the bug.

@pilarvargas-tecnativa
Copy link
Contributor

@pilarvargas-tecnativa

The error is interesting, can you add the very same steps that I can follow to reproduce the bug?

If I can reproduce the error I can introduce the solution.

In OCA boat I cannot see the bug.

In a clean database, I install this module only. I log in as admin and, without configuring anything at all, I access /shop and add a product to the comparison tool, and then the error occurs.

@pilarvargas-tecnativa
Copy link
Contributor

@kobros-tech
Copy link
Contributor Author

I see it now

@pilarvargas-tecnativa
Copy link
Contributor

I see it now

Thank you, I'll wait for the fix to review again.

@kobros-tech kobros-tech force-pushed the 18.0-mig-website_sale_comparison_hide_price branch from d675501 to 0bc2480 Compare November 26, 2025 20:48
@kobros-tech
Copy link
Contributor Author

@pilarvargas-tecnativa

I hope this one is ok

Copy link
Contributor

@pilarvargas-tecnativa pilarvargas-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Thanks!

@Tecnativa TT57284

@juancarlosonate-tecnativa please take a look!

@pedrobaeza
Copy link
Member

/ocabot migration website_sale_comparison_hide_price

Let's merge it with the two existing approvals

/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Nov 27, 2025
@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-1057-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit e7a6255 into OCA:18.0 Nov 27, 2025
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.