Skip to content

[17.0][MIG] product_profile#1731

Merged
OCA-git-bot merged 58 commits intoOCA:17.0from
bosd:17.0-mig-product_profile
Jan 24, 2026
Merged

[17.0][MIG] product_profile#1731
OCA-git-bot merged 58 commits intoOCA:17.0from
bosd:17.0-mig-product_profile

Conversation

@bosd
Copy link
Contributor

@bosd bosd commented Sep 30, 2024

No description provided.

@bosd
Copy link
Contributor Author

bosd commented Sep 30, 2024

@sbidoul, @rousseldenis Can you please review this one as well.

@bosd bosd force-pushed the 17.0-mig-product_profile branch from 0eddb6b to 8f105a8 Compare September 30, 2024 12:17
@bosd bosd mentioned this pull request Sep 30, 2024
69 tasks
@yvaucher
Copy link
Member

/ocabot migration product_profile

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Sep 30, 2024
Copy link
Member

@yvaucher yvaucher left a comment

Choose a reason for hiding this comment

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

Can you restore the previous indents of the xml file? IMO, current state makes it less readable.

<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<xpath expr="//block[@name='catalog_setting_container']" position="inside">
<setting>
Copy link
Member

Choose a reason for hiding this comment

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

This seems over indented, not blocking for this though.

@bosd bosd force-pushed the 17.0-mig-product_profile branch from 8f105a8 to c3deb6e Compare September 30, 2024 13:19
@bosd bosd requested a review from yvaucher October 10, 2024 20:41
Copy link

@Dranyel-Bosd Dranyel-Bosd left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@patrickrwilson
Copy link
Contributor

When we were looking at this and extending it with our custom module to add product fields, we found that this if statement inside the product_profile.py should be after super for it to properly update the products...
image

@bosd
Copy link
Contributor Author

bosd commented Jan 18, 2025

@patrickrwilson Thanks for the feedback.
But I think your suggestion actually bypasses the refresh_product_vals.
Likely there is still a small bug in the refactoring of the code to the new V17 orm capabilities (_read_group).
The pre V17 versions of this module where flooding the orm with searches.

Actually this code has no test/coverage. I started to work on the tester / example module.
V16 PR here: #1850

@bealdav
Copy link
Member

bealdav commented Apr 15, 2025

Hi @bosd, thanks for your contribution here.
Do you plan to go on this PR ?

@bosd
Copy link
Contributor Author

bosd commented Apr 15, 2025

We are currently not using it. So feel free to take-over /contribute.

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 17, 2025
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 24, 2025
@bosd
Copy link
Contributor Author

bosd commented Oct 29, 2025

I think after one year and a month, this PR has been "marinated" enough 😄
Let's go? 🚀

@yvaucher
Copy link
Member

yvaucher commented Dec 5, 2025

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-1731-by-yvaucher-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Dec 5, 2025
Signed-off-by yvaucher
@OCA-git-bot
Copy link
Contributor

It looks like something changed on 17.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 17.0-ocabot-merge-pr-1731-by-yvaucher-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Dec 5, 2025
Signed-off-by yvaucher
@OCA-git-bot
Copy link
Contributor

@yvaucher The merge process could not be finalized, because command oca-gen-addon-readme --if-source-changed --org-name OCA --repo-name product-attribute --branch 17.0 --addons-dir /tmp/tmpjf8dxgcu --commit failed with output:

/tmp/tmpjf8dxgcu/product_profile/README.rst:124: (ERROR/3) Duplicate substitution definition name: "image1".
Traceback (most recent call last):
  File "/usr/local/bin/oca-gen-addon-readme", line 7, in <module>
    sys.exit(gen_addon_readme())
             ^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/click/core.py", line 1462, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/click/core.py", line 1383, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/click/core.py", line 1246, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/click/core.py", line 814, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/src/oca-maintainers-tools/tools/gen_addon_readme.py", line 575, in gen_addon_readme
    check_rst(readme_filename)
  File "/ocamt/src/oca-maintainers-tools/tools/gen_addon_readme.py", line 398, in check_rst
    publish_file(
  File "/ocamt/lib/python3.12/site-packages/docutils/core.py", line 465, in publish_file
    output, _publisher = publish_programmatically(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/core.py", line 794, in publish_programmatically
    output = publisher.publish(enable_exit_status=enable_exit_status)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/core.py", line 269, in publish
    self.document = self.reader.read(self.source, self.parser,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/readers/__init__.py", line 95, in read
    self.parse()
  File "/ocamt/lib/python3.12/site-packages/docutils/readers/__init__.py", line 101, in parse
    self.parser.parse(self.input, document)
  File "/ocamt/lib/python3.12/site-packages/docutils/parsers/rst/__init__.py", line 185, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/ocamt/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 182, in run
    results = StateMachineWS.run(self, input_lines, input_offset,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/statemachine.py", line 234, in run
    context, next_state, result = self.check_line(
                                  ^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/statemachine.py", line 446, in check_line
    return method(match, context, next_state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2487, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2499, in explicit_construct
    return method(self, expmatch)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/parsers/rst/states.py", line 2215, in substitution_def
    self.document.note_substitution_def(
  File "/ocamt/lib/python3.12/site-packages/docutils/nodes.py", line 2063, in note_substitution_def
    msg = self.reporter.error(
          ^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/utils/__init__.py", line 256, in error
    return self.system_message(self.ERROR_LEVEL, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ocamt/lib/python3.12/site-packages/docutils/utils/__init__.py", line 217, in system_message
    raise SystemMessage(msg, level)
docutils.utils.SystemMessage: /tmp/tmpjf8dxgcu/product_profile/README.rst:124: (ERROR/3) Duplicate substitution definition name: "image1".

@yvaucher
Copy link
Member

@bosd This most likely needs a rebase

@StefanRijnhart
Copy link
Member

I've migrated this to 18.0 in #2173 and I fixed the duplicate image1 error with
image

sebastienbeau and others added 21 commits January 24, 2026 12:32
Currently translated at 100.0% (30 of 30 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_profile
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_profile/ca/
Give the possibility to call directly with a domain the method _customize_view
with a domain so you can reuse this method in custom module to add profile filter.

In my case I want to add a filter on mrp.bom so just adding a related
field + a call to _customize_view allow to add only profile related to
manufacturing

Also add a separator to avoid mixing profile filter with existing filter
Currently translated at 100.0% (30 of 30 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_profile
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_profile/it/
Currently translated at 100.0% (30 of 30 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_profile
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_profile/nl_NL/
Currently translated at 100.0% (30 of 30 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_profile
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_profile/it/
Fixes the warning "The model odoo.addons.product_profile is not overriding the create method in batch"

Fixup! Update product_profile
Update product_profile.py

refactor for V17 way

[IMP] product_profile: pre-commit execution

Fixup product_profile.py
@bosd bosd force-pushed the 17.0-mig-product_profile branch from c3deb6e to 8a63512 Compare January 24, 2026 11:34
Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-1731-by-StefanRijnhart-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 137fc14 into OCA:17.0 Jan 24, 2026
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@bosd bosd deleted the 17.0-mig-product_profile branch January 24, 2026 11:55
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.