Skip to content

[18.0] [MIG] product_configurator_mrp: Migration to 18.0 #154

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

Open
wants to merge 121 commits into
base: 18.0
Choose a base branch
from

Conversation

bizzappdev
Copy link

Dependency PR for module product_configurator #150

PCatinean and others added 30 commits February 3, 2025 11:43
de translations of product_configurator (Pledra)
* Flake8 fixes
…igurator_mrp : correct method-name, claas-name, arguments
…production_lots, fix singleton error(product.config.step.line)
…igurator_mrp : correct method-name, claas-name, arguments
…production_lots, fix singleton error(product.config.step.line)
Chandresh-OSI and others added 24 commits February 3, 2025 11:43
This commit fixes the error received when finishing a configuration and it tries to create or write of the mrp order
[IMP] Add Bom Line if no config_id

[FIX] Removed unused UserError

[IMP] Better config set attribute matching

[FIX] Travis

[IMP] Don't create bom if no bom lines

[FIX] no bom line if
…t should copy over the operations from the master BOM
Correction of bug access key "product_qty" not in dictionary
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-configurator-16.0/product-configurator-16.0-product_configurator_mrp
Translate-URL: https://translation.odoo-community.org/projects/product-configurator-16-0/product-configurator-16-0-product_configurator_mrp/
Currently translated at 100.0% (47 of 47 strings)

Translation: product-configurator-16.0/product-configurator-16.0-product_configurator_mrp
Translate-URL: https://translation.odoo-community.org/projects/product-configurator-16-0/product-configurator-16-0-product_configurator_mrp/it/
@bizzappdev bizzappdev marked this pull request as ready for review February 27, 2025 07:54
Copy link

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

Thanks!

non-blocking comments, pre-approving

Comment on lines 5 to 6
patch(FormController.prototype, {});
applyConfigButtonMixin(FormController.prototype, ".o_form_button_create_config");

Choose a reason for hiding this comment

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

With the current mixin approach, patch seems pointless here, isn't it?

I would recommend, though, rather than removing it, do a refactoring on the mixin to return a patch-like object and use it (roughly) like this:

// config_button_mixin.esm.js

export function ConfigButtonMixin(buttonSelector) {
    return {
        setup() {
            super.setup();
            // do stuff
        },

        async _onConfigure() {
            // do stuff
        }
    }
}
// form_controller.esm.js

patch(FormController.prototype, ConfigButtonMixin(".o_form_button_create_config"))

Here's an example of this pattern in upstream code: https://github.com/odoo/odoo/blob/0bc69d757f7c3429c6112aa5aaa1ceb999428189/addons/mail/static/src/js/onchange_on_keydown.js#L42

import {patch} from "@web/core/utils/patch";

patch(KanbanController.prototype, {});
applyConfigButtonMixin(KanbanController.prototype, ".o-kanban-button-new_config");

Choose a reason for hiding this comment

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

Same comment

import {patch} from "@web/core/utils/patch";

patch(ListController.prototype, {});
applyConfigButtonMixin(ListController.prototype, ".o_list_button_add_config");

Choose a reason for hiding this comment

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

Same

Comment on lines 82 to 83
"Please inform the administrator/manager. [Product: {}]"
).format(product_name)

Choose a reason for hiding this comment

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

Suggested change
"Please inform the administrator/manager. [Product: {}]"
).format(product_name)
"Please inform the administrator/manager. [Product: %s]",
product_name
)

@bizzappdev bizzappdev force-pushed the 18.0-mig-product_configurator_mrp-BAD branch from a4d6c21 to bde2dab Compare March 18, 2025 09:22
@bizzappdev
Copy link
Author

@ivantodorovich Thank you for the review. changes are done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.