[MIG] stock_picking_type_default_partner from v10 to v14

This commit is contained in:
Alexis de Lattre
2021-10-01 21:21:31 +02:00
parent d3bddf5fda
commit f6ddbb48ac
5 changed files with 9 additions and 11 deletions

View File

@@ -1,3 +1 @@
# -*- encoding: utf-8 -*-
from . import stock
from . import models

View File

@@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2018 Akretion (http://www.akretion.com)
# Copyright 2014-2021 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Stock Picking Type Default Partner',
'version': '10.0.1.0.0',
'version': '14.0.1.0.0',
'category': 'Inventory, Logistics, Warehousing',
'license': 'AGPL-3',
'summary': 'Adds a default partner on types of operation',
@@ -21,6 +20,6 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['stock'],
'data': ['stock_view.xml'],
'data': ['views/stock_picking_type.xml'],
'installable': True,
}

View File

@@ -0,0 +1 @@
from . import stock_picking

View File

@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# Copyright 2014-2018 Akretion (http://www.akretion.com)
# Copyright 2014-2021 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -28,4 +27,5 @@ class StockPicking(models.Model):
return picktype.default_partner_id
return False
partner_id = fields.Many2one(default=_default_partner_id)
partner_id = fields.Many2one(
default=lambda self: self._default_partner_id())

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2018 Akretion (http://www.akretion.com/)
Copyright 2015-2021 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->