[17.0][MIG] product_profile
@sbidoul, @rousseldenis Can you please review this one as well.
/ocabot migration product_profile
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...
@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: https://github.com/OCA/product-attribute/pull/1850
Hi @bosd, thanks for your contribution here. Do you plan to go on this PR ?
We are currently not using it. So feel free to take-over /contribute.
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.
I think after one year and a month, this PR has been "marinated" enough :smile: Let's go? :rocket:
/ocabot merge nobump
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.
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.
@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".
@bosd This most likely needs a rebase