[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:
Jared Kipe
2022-02-04 15:23:27 -08:00
parent bf7192f71a
commit 5944db313e
17 changed files with 58 additions and 113 deletions

View File

@@ -124,7 +124,6 @@ class AmazonBackend(models.Model):
)
@contextmanager
@api.multi
def work_on(self, model_name, **kwargs):
self.ensure_one()
amazon_api = self.get_wrapped_api()
@@ -180,12 +179,10 @@ class AmazonBackend(models.Model):
for backend in backends:
self.env['amazon.product.product'].update_price(backend)
@api.multi
def import_sale_orders(self):
self._import_from_date('amazon.sale.order', 'import_orders_from_date')
return True
@api.multi
def _import_from_date(self, model_name, from_date_field):
import_start_time = datetime.now().replace(microsecond=0) - timedelta(seconds=IMPORT_DELTA_BUFFER)
for backend in self: