mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] connector_amazon_sp: partial 14.0
Need to investigate form for Amazon orders. Installing it complains that `action_...` doesn't actually exist. I started making pass through methods like `action_unlock` in sale_order.common, but then came to an action that would only exist in inherited views and not in this specific new form.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# © 2021 Hibou Corp.
|
||||
|
||||
from odoo import api, models, fields
|
||||
from odoo.addons.queue_job.job import job, related_action
|
||||
|
||||
|
||||
class AmazonBinding(models.AbstractModel):
|
||||
@@ -26,7 +25,6 @@ class AmazonBinding(models.AbstractModel):
|
||||
('Amazon_uniq', 'unique(backend_id, external_id)', 'A binding already exists for this Amazon ID.'),
|
||||
]
|
||||
|
||||
@job(default_channel='root.amazon')
|
||||
@api.model
|
||||
def import_batch(self, backend, filters=None):
|
||||
""" Prepare the import of records modified on Amazon """
|
||||
@@ -36,29 +34,9 @@ class AmazonBinding(models.AbstractModel):
|
||||
importer = work.component(usage='batch.importer')
|
||||
return importer.run(filters=filters)
|
||||
|
||||
@job(default_channel='root.amazon')
|
||||
@related_action(action='related_action_unwrap_binding')
|
||||
@api.model
|
||||
def import_record(self, backend, external_id, force=False):
|
||||
""" Import a Amazon record """
|
||||
with backend.work_on(self._name) as work:
|
||||
importer = work.component(usage='record.importer')
|
||||
return importer.run(external_id, force=force)
|
||||
|
||||
# @job(default_channel='root.amazon')
|
||||
# @related_action(action='related_action_unwrap_binding')
|
||||
# @api.multi
|
||||
# def export_record(self, fields=None):
|
||||
# """ Export a record on Amazon """
|
||||
# self.ensure_one()
|
||||
# with self.backend_id.work_on(self._name) as work:
|
||||
# exporter = work.component(usage='record.exporter')
|
||||
# return exporter.run(self, fields)
|
||||
#
|
||||
# @job(default_channel='root.amazon')
|
||||
# @related_action(action='related_action_amazon_link')
|
||||
# def export_delete_record(self, backend, external_id):
|
||||
# """ Delete a record on Amazon """
|
||||
# with backend.work_on(self._name) as work:
|
||||
# deleter = work.component(usage='record.exporter.deleter')
|
||||
# return deleter.run(external_id)
|
||||
|
||||
Reference in New Issue
Block a user