[IMP] stock_orderpoint_generator: black, isort, prettier

This commit is contained in:
sergiocorato
2023-10-20 12:29:46 +02:00
parent a5592019f4
commit 19d9086b4d
6 changed files with 19 additions and 11 deletions

View File

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

View File

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

View File

@@ -10,7 +10,7 @@ from odoo import api, fields, models
class OrderpointTemplate(models.Model):
""" Template for orderpoints
"""Template for orderpoints
Here we use same model as stock.warehouse.orderpoint but set product_id
as non mandatory as we cannot remove it. This field will be ignored.
@@ -83,7 +83,7 @@ class OrderpointTemplate(models.Model):
def _template_fields_to_discard(self):
"""In order to create every orderpoint we should pop this template
customization fields """
customization fields"""
return [
"auto_generate",
"auto_product_ids",
@@ -181,7 +181,7 @@ class OrderpointTemplate(models.Model):
orderpoint_model.create(vals_list)
def create_orderpoints(self, products):
""" Create orderpoint for *products* based on these templates.
"""Create orderpoint for *products* based on these templates.
:type products: recordset of products
"""
self._disable_old_instances(products)

View File

@@ -285,7 +285,8 @@ class TestOrderpointGenerator(SavepointCase):
def wizard_over_products(self, product, template):
return self.wizard_model.with_context(
active_model=product._name, active_ids=product.ids,
active_model=product._name,
active_ids=product.ids,
).create({"orderpoint_template_id": [(6, 0, template.ids)]})
def test_product_orderpoint(self):

View File

@@ -9,7 +9,7 @@ _template_register = ["orderpoint_template_id"]
class OrderpointGenerator(models.TransientModel):
""" Wizard defining stock.warehouse.orderpoint configurations for selected
"""Wizard defining stock.warehouse.orderpoint configurations for selected
products. Those configs are generated using templates
"""