From 1dfcfb05a2ab09c3735bc6db878e92cdaf7ec100 Mon Sep 17 00:00:00 2001 From: Bhoomi Date: Thu, 26 Sep 2019 14:51:44 -0400 Subject: [PATCH] WIP `purchase_by_sale_history` For odoo 13.0 --- purchase_by_sale_history/__manifest__.py | 2 +- .../tests/test_purchase_by_sale_history.py | 4 ---- purchase_by_sale_history/wizard/purchase_by_sale_history.py | 3 --- .../wizard/purchase_by_sale_history_views.xml | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/purchase_by_sale_history/__manifest__.py b/purchase_by_sale_history/__manifest__.py index 482c45bb..4949292f 100755 --- a/purchase_by_sale_history/__manifest__.py +++ b/purchase_by_sale_history/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'Purchase by Sale History', 'author': 'Hibou Corp. ', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'category': 'Purchases', 'sequence': 95, 'summary': 'Fill Purchase Orders by Sales History', diff --git a/purchase_by_sale_history/tests/test_purchase_by_sale_history.py b/purchase_by_sale_history/tests/test_purchase_by_sale_history.py index 8640929c..8d42ce32 100644 --- a/purchase_by_sale_history/tests/test_purchase_by_sale_history.py +++ b/purchase_by_sale_history/tests/test_purchase_by_sale_history.py @@ -64,7 +64,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase): self.env['sale.order'].create({ 'partner_id': sale_partner.id, 'date_order': sale_date, - 'confirmation_date': sale_date, 'picking_policy': 'direct', 'order_line': [ (0, 0, {'product_id': product11.id, 'product_uom_qty': 3.0}), @@ -93,7 +92,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase): self.env['sale.order'].create({ 'partner_id': sale_partner.id, 'date_order': sale_date, - 'confirmation_date': sale_date, 'picking_policy': 'direct', 'order_line': [ (0, 0, {'product_id': product11.id, 'product_uom_qty': 3.0}), @@ -112,7 +110,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase): self.env['sale.order'].create({ 'partner_id': sale_partner.id, 'date_order': sale_date, - 'confirmation_date': sale_date, 'picking_policy': 'direct', 'warehouse_id': wh2.id, 'order_line': [ @@ -132,7 +129,6 @@ class TestPurchaseBySaleHistory(common.TransactionCase): self.env['sale.order'].create({ 'partner_id': sale_partner.id, 'date_order': sale_date, - 'confirmation_date': sale_date, 'picking_policy': 'direct', 'order_line': [ (0, 0, {'product_id': product11.id, 'product_uom_qty': 3.0}), diff --git a/purchase_by_sale_history/wizard/purchase_by_sale_history.py b/purchase_by_sale_history/wizard/purchase_by_sale_history.py index eb19c316..a585bf7c 100644 --- a/purchase_by_sale_history/wizard/purchase_by_sale_history.py +++ b/purchase_by_sale_history/wizard/purchase_by_sale_history.py @@ -22,7 +22,6 @@ class PurchaseBySaleHistory(models.TransientModel): 'If it is left blank then all warehouses and inventory ' 'will be considered.') - @api.multi @api.depends('history_start', 'history_end') def _compute_history_days(self): for wiz in self: @@ -32,7 +31,6 @@ class PurchaseBySaleHistory(models.TransientModel): delta = fields.Date.from_string(wiz.history_end) - fields.Date.from_string(wiz.history_start) wiz.history_days = delta.days - @api.multi @api.depends('purchase_id', 'purchase_id.order_line', 'purchase_id.partner_id') def _compute_product_count(self): for wiz in self: @@ -130,7 +128,6 @@ class PurchaseBySaleHistory(models.TransientModel): for line in other_lines: line._onchange_quantity() - @api.multi def action_confirm(self): self.ensure_one() history_product_ids = self._history_product_ids() diff --git a/purchase_by_sale_history/wizard/purchase_by_sale_history_views.xml b/purchase_by_sale_history/wizard/purchase_by_sale_history_views.xml index 41b2b3b3..f3557826 100644 --- a/purchase_by_sale_history/wizard/purchase_by_sale_history_views.xml +++ b/purchase_by_sale_history/wizard/purchase_by_sale_history_views.xml @@ -32,7 +32,6 @@ Fill PO From Sales History purchase.sale.history.make - form form new