[MIG] stock_free_quantity: Migration to 15.0

This commit is contained in:
hda
2022-10-11 14:15:18 +02:00
committed by Denis Roussel
parent 886b235e30
commit af30d04be9
5 changed files with 11 additions and 3 deletions

View File

@@ -0,0 +1 @@
../../../../stock_free_quantity

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

View File

@@ -2,7 +2,7 @@
{
"name": "Stock Free Quantity",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"author": "akretion,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"development_status": "Production/Stable",

View File

@@ -20,6 +20,7 @@ class ProductTemplate(models.Model):
res = self._compute_quantities_dict()
for template in self:
template.free_qty = res[template.id]["free_qty"]
return
def _search_free_qty(self, operator, value):
return [("product_variant_ids.free_qty", operator, value)]

View File

@@ -1,9 +1,9 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo.tests import common
from odoo.tests.common import TransactionCase
class TestTemplateFreeQty(common.SavepointCase):
class TestTemplateFreeQty(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()