mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] delivery_hibou: to Odoo 13.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
'name': 'Delivery Hibou',
|
||||
'summary': 'Adds underlying pinnings for things like "RMA Return Labels"',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '13.0.1.0.0',
|
||||
'author': "Hibou Corp.",
|
||||
'category': 'Stock',
|
||||
'license': 'AGPL-3',
|
||||
|
||||
@@ -12,7 +12,6 @@ class StockPicking(models.Model):
|
||||
], string='Require Insurance', default='auto',
|
||||
help='If your carrier supports it, auto should be calculated off of the "Automatic Insurance Value" field.')
|
||||
|
||||
@api.one
|
||||
@api.depends('move_lines.priority', 'carrier_id')
|
||||
def _compute_priority(self):
|
||||
if self.carrier_id.procurement_priority:
|
||||
@@ -40,7 +39,6 @@ class StockPicking(models.Model):
|
||||
return cost
|
||||
|
||||
|
||||
|
||||
class StockMove(models.Model):
|
||||
_inherit = 'stock.move'
|
||||
|
||||
|
||||
@@ -37,14 +37,20 @@ class TestDeliveryHibou(common.TransactionCase):
|
||||
'partner_id': self.partner.id,
|
||||
'partner_shipping_id': self.partner.id,
|
||||
'partner_invoice_id': self.partner.id,
|
||||
'carrier_id': self.carrier.id,
|
||||
'shipping_account_id': self.shipping_account.id,
|
||||
'order_line': [(0, 0, {
|
||||
'product_id': self.product.id,
|
||||
})]
|
||||
})
|
||||
sale_order.get_delivery_price()
|
||||
sale_order.set_delivery_line()
|
||||
self.assertFalse(sale_order.carrier_id)
|
||||
action = sale_order.action_open_delivery_wizard()
|
||||
form = common.Form(self.env[action['res_model']].with_context(**action.get('context', {})))
|
||||
form.carrier_id = self.carrier
|
||||
wizard = form.save()
|
||||
wizard.button_confirm()
|
||||
|
||||
#sale_order.set_delivery_line()
|
||||
self.assertEqual(sale_order.carrier_id, self.carrier)
|
||||
sale_order.action_confirm()
|
||||
# Make sure 3rd party Shipping Account is set.
|
||||
self.assertEqual(sale_order.shipping_account_id, self.shipping_account)
|
||||
@@ -140,22 +146,3 @@ class TestDeliveryHibou(common.TransactionCase):
|
||||
picking_in.partner_id)
|
||||
self.assertEqual(picking_in.carrier_id.get_recipient(picking=picking_in),
|
||||
picking_in.picking_type_id.warehouse_id.partner_id)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user