-
-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][MIG] website_sale_secondary_unit: Migration to version 17.0 #1003
[17.0][MIG] website_sale_secondary_unit: Migration to version 17.0 #1003
Conversation
…ice when product has secondary units defined
…ucts when "Add to cart" view is enabled.
As the product.secondary.unit view has been isolated, we have to inherit from that one.
…play unpublished secondary units. TT31018
complementary to OCA@3fa2331
Before this changes, the change in the value of the secondary unit input field didn't launch the execution of the onchanges of the real input field. Adding this changes, we achieve to capture the event of the new input field to launch the onchanges of the real input field. cc @Tecnativa TT29708
For mobile users adding an extra column in the cart summary makes that the others content won't fit very well, specially for products with long names. As we can infer the sale line information without the secondary units computation computation column we choose to hide it if the screen is too small as Odoo does with the product image column. TT37137
Currently translated at 53.3% (8 of 15 strings) Translation: e-commerce-15.0/e-commerce-15.0-website_sale_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_secondary_unit/it/
Currently translated at 100.0% (15 of 15 strings) Translation: e-commerce-15.0/e-commerce-15.0-website_sale_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_secondary_unit/es/
Currently translated at 100.0% (15 of 15 strings) Translation: e-commerce-15.0/e-commerce-15.0-website_sale_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_secondary_unit/it/
…antity description and delete column in purchase summary There were two quantity columns in the purchase summary, one with the secondary unit quantity and one with the product quantity. A quantity column in the purchase summary has been removed to give more clarity to the view. When product names or units of measure have a considerable number of characters, having two columns causes a crowding of the view and therefore a feeling of content clutter. Instead, their content has been moved so that both the secondary unit quantity and the quantity of product purchased appear in the same column. We have also added the option to hide the name of the secondary unit of measure in the secondary unit description template in case it matches the unit of measure of the product as depending on where it is being called from it can be redundant. TT45032
Currently translated at 100.0% (15 of 15 strings) Translation: e-commerce-15.0/e-commerce-15.0-website_sale_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_secondary_unit/it/
Currently translated at 100.0% (15 of 15 strings) Translation: e-commerce-15.0/e-commerce-15.0-website_sale_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_secondary_unit/es/
- Switch to setUpClass for avoiding repeat the same setup for each test. - Include context keys for avoiding mail operations overhead.
Currently translated at 100.0% (15 of 15 strings) Translation: e-commerce-15.0/e-commerce-15.0-website_sale_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_secondary_unit/it/
a7b529a
to
a306615
Compare
There was a problem hiding this 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 😄
When trying to remove a line of the cart with secondary units I'm getting next error, can you take a look?
Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 1783, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo/odoo/http.py", line 1810, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo/odoo/http.py", line 2014, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 221, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo/odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/mnt/data/odoo-addons-dir/website_sale_secondary_unit/controllers/main.py", line 34, in cart_update_json
return super().cart_update_json(
File "/opt/odoo/odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo/addons/website_sale/controllers/main.py", line 899, in cart_update_json
values['notification_info'] = self._get_cart_notification_information(order, [values['line_id']])
File "/mnt/data/odoo-addons-dir/website_sale_secondary_unit/controllers/main.py", line 52, in _get_cart_notification_information
for line in res["lines"]:
KeyError: 'lines'
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (http://oca-e-commerce-17-0-pr1003-a3066151f1fd.runboat.odoo-community.org/web/assets/1/4e5c03a/web.assets_frontend_lazy.min.js:4720:163)
at XMLHttpRequest.<anonymous> (http://oca-e-commerce-17-0-pr1003-a3066151f1fd.runboat.odoo-community.org/web/assets/1/4e5c03a/web.assets_frontend_lazy.min.js:4724:13)
a306615
to
e78f349
Compare
Solved, please try again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 😄
e78f349
to
c905ee2
Compare
@pilarvargas-tecnativa I have applied your suggestion. Could you please update your review? Thanks! |
- Replaced the popover implementation with notifications, following the update in odoo/odoo#133990. - Removed the Unit from the displayed price. Previously, Odoo showed the price per unit, making it appropriate to include the UoM. However, as it now displays the total, the UoM is unnecessary.
c905ee2
to
09b889c
Compare
/ocabot migration website_sale_secondary_unit |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at e729ba0. Thanks a lot for contributing to OCA. ❤️ |
TT52395
@Tecnativa @pedrobaeza @sergio-teruel @pilarvargas-tecnativa @chienandalu @CarlosRoca13 could you please review this