Skip to content

Commit

Permalink
[MIG] delivery_auto_refresh: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yankinmax committed Nov 17, 2021
1 parent c2d3bbf commit 3a78311
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion delivery_auto_refresh/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Auto-refresh delivery",
"summary": "Auto-refresh delivery price in sales orders",
"version": "13.0.1.0.2",
"version": "14.0.1.0.0",
"category": "Delivery",
"website": "https://github.com/OCA/delivery-carrier",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion delivery_auto_refresh/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models
from odoo.tools import safe_eval
from odoo.tools.safe_eval import safe_eval


class SaleOrder(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion delivery_auto_refresh/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models
from odoo.tools import safe_eval
from odoo.tools.safe_eval import safe_eval


class StockPicking(models.Model):
Expand Down
8 changes: 4 additions & 4 deletions delivery_auto_refresh/tests/test_delivery_auto_refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_auto_refresh_picking(self):
picking = self.order.picking_ids
picking.action_assign()
picking.move_line_ids[0].qty_done = 2
picking.action_done()
picking._action_done()
line_delivery = self.order.order_line.filtered("is_delivery")
self.assertEqual(line_delivery.price_unit, 50)

Expand All @@ -150,14 +150,14 @@ def test_no_auto_refresh_picking(self):
picking = self.order.picking_ids
picking.action_assign()
picking.move_line_ids[0].qty_done = 2
picking.action_done()
picking._action_done()
line_delivery = self.order.order_line.filtered("is_delivery")
self.assertEqual(line_delivery.price_unit, 60)

def test_compute_carrier_id(self):
order_form_1 = Form(self.env["sale.order"])
order_form_1.partner_id = self.partner
self.assertEquals(order_form_1.carrier_id, self.carrier_1)
self.assertEqual(order_form_1.carrier_id, self.carrier_1)
partner_without_carrier = self.env["res.partner"].create(
{
"name": "Test partner without carrier",
Expand All @@ -167,4 +167,4 @@ def test_compute_carrier_id(self):
no_carrier = self.env["delivery.carrier"]
order_form_2 = Form(self.env["sale.order"])
order_form_2.partner_id = partner_without_carrier
self.assertEquals(order_form_2.carrier_id, no_carrier)
self.assertEqual(order_form_2.carrier_id, no_carrier)

0 comments on commit 3a78311

Please sign in to comment.