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

[MIG][13.0] connector_magento #317

Open
wants to merge 44 commits into
base: 13.0
Choose a base branch
from

Conversation

bizzappdev
Copy link

No description provided.

guewen and others added 30 commits March 9, 2021 10:47
* Add binding on sales orders
* Ensure that we always have the Connector Manager group on the
  Connector tabs (most are done in the parent views of
  connector_ecommerce)
* Fixed inheritance of the delivery.carrier view
* Use vcr.py to record the exchanges instead of a self-made recorder
* Use new base Components test case classes
* Separate export tests in 2 phases: trigger of the export which check
  that the jobs are delayed, and test the job itself in a second test
I removed it earlier, but it is required when we import products
* Rename it because it was shadowing another test
* Compute in the location's context
The wizard is available on the backend.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: connector-magento-12.0/connector-magento-12.0-connector_magento
Translate-URL: https://translation.odoo-community.org/projects/connector-magento-12-0/connector-magento-12-0-connector_magento/
OCA-git-bot and others added 9 commits March 9, 2021 10:47
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: connector-magento-12.0/connector-magento-12.0-connector_magento
Translate-URL: https://translation.odoo-community.org/projects/connector-magento-12-0/connector-magento-12-0-connector_magento/
- Rule paid to allow for order with nothing to pay (i.e. grand_total is zero)
- Rule paid not to allow negative paid amount
- Row totals are excl. discount amount
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: connector-magento-12.0/connector-magento-12.0-connector_magento
Translate-URL: https://translation.odoo-community.org/projects/connector-magento-12-0/connector-magento-12-0-connector_magento/
@bizzappdev bizzappdev force-pushed the 13.0-mig-connector_magento-format-patch branch 2 times, most recently from 0c2384d to 1f1f320 Compare March 9, 2021 08:37
@paulius-sladkevicius
Copy link

@bizzappdev great work! Looks Travis is failing because of a missing dependency base_technical_user. As I'm not 100% sure how Travis is taking it, but I suppose it would be enough to add server-tools to the oca_dependencies

@bizzappdev bizzappdev changed the title [MIG][13.0] connector Magento [MIG][13.0] connector_magento Aug 9, 2021
_logger.info(
"No component registry for database %s. "
"Probably because the Odoo registry has not been built "
"yet." % (self.env.cr.dbname)
Copy link

@naglis naglis Aug 9, 2021

Choose a reason for hiding this comment

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

Suggested change
"yet." % (self.env.cr.dbname)
"yet.", self.env.cr.dbname

Please note that leaving the string formatting to the logger is better, since it will only format it if the logging level is enabled (avoids computation if not needed) and also it can have unintended consequences with other tools, e.g. Sentry will not group the events correctly if the log message is already formatted.

Sources: [1], [2], see also pylint W1202 rule.

Copy link
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

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

Good job, just a few small changes (mostly to simplify super())


{
"name": "Magento Connector",
"version": "13.0.0.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"version": "13.0.0.0.0",
"version": "13.0.1.0.0",

_usage = "record.exporter"

def __init__(self, working_context):
super(MagentoBaseExporter, self).__init__(working_context)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(MagentoBaseExporter, self).__init__(working_context)
super().__init__(working_context)

_inherit = "magento.base.exporter"

def __init__(self, working_context):
super(MagentoExporter, self).__init__(working_context)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(MagentoExporter, self).__init__(working_context)
super().__init__(working_context)

_usage = "record.importer"

def __init__(self, work_context):
super(MagentoImporter, self).__init__(work_context)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(MagentoImporter, self).__init__(work_context)
super().__init__(work_context)

_usage = "order.line.builder.magento.store_credit"

def __init__(self, work_context):
super(StoreCreditLineBuilder, self).__init__(work_context)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(StoreCreditLineBuilder, self).__init__(work_context)
super().__init__(work_context)


class TestImportPartner(MagentoSyncTestCase):
def setUp(self):
super(TestImportPartner, self).setUp()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(TestImportPartner, self).setUp()
super().setUp()


class TestImportProduct(MagentoSyncTestCase):
def setUp(self):
super(TestImportProduct, self).setUp()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(TestImportProduct, self).setUp()
super().setUp()

""" Test the imports of the image of the products. """

def setUp(self):
super(TestImportProductImage, self).setUp()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(TestImportProductImage, self).setUp()
super().setUp()

""" Test related actions on stored jobs """

def setUp(self):
super(TestRelatedActionStorage, self).setUp()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(TestRelatedActionStorage, self).setUp()
super().setUp()


class TestSaleOrder(MagentoSyncTestCase):
def setUp(self):
super(TestSaleOrder, self).setUp()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
super(TestSaleOrder, self).setUp()
super().setUp()

@pedrobaeza pedrobaeza added this to the 13.0 milestone Aug 19, 2021
@elvise
Copy link

elvise commented May 24, 2022

@sbidoul can you help me with runboat ? 🙂

@sbidoul
Copy link
Member

sbidoul commented May 25, 2022

A rebase or push will create a build.

@bizzappdev bizzappdev force-pushed the 13.0-mig-connector_magento-format-patch branch from 70bb8da to 885b62c Compare May 25, 2022 10:56
@bizzappdev bizzappdev force-pushed the 13.0-mig-connector_magento-format-patch branch from 885b62c to 747cde7 Compare May 25, 2022 11:00
@elvise
Copy link

elvise commented May 25, 2022

@bizzappdev can you rebase ?

@bizzappdev
Copy link
Author

@bizzappdev can you rebase ?

I just did 2 hours ago. and right now Already is up to date.

@paulius-sladkevicius
Copy link

Hello, any possibility to merge it to 13.0 I see it stuck a bit :-)

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.