Skip to content
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

Migrate Suppliers to DX #2581

Merged
merged 43 commits into from
Jul 15, 2024
Merged

Migrate Suppliers to DX #2581

merged 43 commits into from
Jul 15, 2024

Conversation

Bugerman58
Copy link
Contributor

Description of the issue/feature this PR addresses

This PR migrates the AT Supplier and Suppliers to Dexterity types for Python 3 compatibility.

Current behavior before PR

Supplier and Suppliers are content types based on the Archetypes framework

Desired behavior after PR is merged

Supplier and Suppliers are content types based on the Dexterity framework

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@Bugerman58 Bugerman58 marked this pull request as ready for review July 8, 2024 08:48
@Bugerman58
Copy link
Contributor Author

Hi @ramonski
This PR ready for review. Pls, check it )

@xispa xispa self-requested a review July 15, 2024 07:27
@xispa xispa added Python 3 Python 3 compatibility Content Migration ♻️ Migrate contents to Dexterity labels Jul 15, 2024
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

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

Awesome @Bugerman58 ! I've left some comments, keep it going!

src/senaite/core/content/organization.py Outdated Show resolved Hide resolved
src/senaite/core/content/organization.py Outdated Show resolved Hide resolved
src/senaite/core/content/supplier.py Outdated Show resolved Hide resolved
src/senaite/core/content/supplier.py Show resolved Hide resolved
src/senaite/core/content/supplier.py Outdated Show resolved Hide resolved
src/senaite/core/content/organization.py Outdated Show resolved Hide resolved
src/senaite/core/content/organization.py Outdated Show resolved Hide resolved
src/senaite/core/content/organization.py Outdated Show resolved Hide resolved
src/senaite/core/content/organization.py Outdated Show resolved Hide resolved
src/senaite/core/upgrade/v02_06_000.py Outdated Show resolved Hide resolved
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

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

Just noticed that addresses were partially migrated, see comments. We are almost there!

src/senaite/core/content/organization.py Outdated Show resolved Hide resolved
src/senaite/core/upgrade/v02_06_000.py Outdated Show resolved Hide resolved
src/senaite/core/content/supplier.py Show resolved Hide resolved
src/senaite/core/content/supplier.py Show resolved Hide resolved
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

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

Excellent, thanks @Bugerman58 !

@xispa xispa merged commit ad582ba into senaite:2.x Jul 15, 2024
1 check passed
@Bugerman58 Bugerman58 deleted the migrate-supplier-to-dx branch July 15, 2024 16:12
@ramonski
Copy link
Contributor

Running the same upgrade step once again raises a traceback:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 176, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 385, in publish_module
  Module ZPublisher.WSGIPublisher, line 288, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module Products.GenericSetup.tool, line 1135, in manage_doUpgrades
  Module Products.GenericSetup.upgrade, line 185, in doStep
  Module senaite.core.upgrade, line 39, in wrap_func_args
  Module senaite.core.upgrade.v02_06_000, line 1758, in migrate_suppliers_to_dx
  Module senaite.core.upgrade.utils, line 363, in uncatalog_object
AttributeError: 'NoneType' object has no attribute 'unindexObject'

@Bugerman58: Would you mind to create a new PR to handle this gracefully?

@Bugerman58
Copy link
Contributor Author

Running the same upgrade step once again raises a traceback:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 176, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 385, in publish_module
  Module ZPublisher.WSGIPublisher, line 288, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module Products.GenericSetup.tool, line 1135, in manage_doUpgrades
  Module Products.GenericSetup.upgrade, line 185, in doStep
  Module senaite.core.upgrade, line 39, in wrap_func_args
  Module senaite.core.upgrade.v02_06_000, line 1758, in migrate_suppliers_to_dx
  Module senaite.core.upgrade.utils, line 363, in uncatalog_object
AttributeError: 'NoneType' object has no attribute 'unindexObject'

@Bugerman58: Would you mind to create a new PR to handle this gracefully?

Hi @ramonski

oh, sure. I'll fix this error soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content Migration ♻️ Migrate contents to Dexterity Python 3 Python 3 compatibility
Development

Successfully merging this pull request may close these issues.

3 participants