[IMP] stock_pull_list: black, isort, prettier

This commit is contained in:
Mateu Griful
2021-02-25 11:53:39 +01:00
parent 4533f93a7a
commit 18d768f85d
3 changed files with 28 additions and 7 deletions

View File

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

View File

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

View File

@@ -21,8 +21,13 @@ class PullListWizard(models.TransientModel):
res.update({"warehouse_id": wh.id, "location_id": wh.lot_stock_id.id}) res.update({"warehouse_id": wh.id, "location_id": wh.lot_stock_id.id})
return res return res
location_id = fields.Many2one(comodel_name="stock.location", required=True,) location_id = fields.Many2one(
warehouse_id = fields.Many2one(comodel_name="stock.warehouse",) comodel_name="stock.location",
required=True,
)
warehouse_id = fields.Many2one(
comodel_name="stock.warehouse",
)
line_ids = fields.One2many( line_ids = fields.One2many(
comodel_name="stock.pull.list.wizard.line", comodel_name="stock.pull.list.wizard.line",
inverse_name="wizard_id", inverse_name="wizard_id",
@@ -31,7 +36,8 @@ class PullListWizard(models.TransientModel):
# Step 1 - filtering options. # Step 1 - filtering options.
exclude_reserved = fields.Boolean() exclude_reserved = fields.Boolean()
location_dest_id = fields.Many2one( location_dest_id = fields.Many2one(
string="Destination Location", comodel_name="stock.location", string="Destination Location",
comodel_name="stock.location",
) )
date_to = fields.Date() date_to = fields.Date()
consolidate_by_product = fields.Boolean( consolidate_by_product = fields.Boolean(
@@ -303,15 +309,23 @@ class PullListWizardLine(models.TransientModel):
_name = "stock.pull.list.wizard.line" _name = "stock.pull.list.wizard.line"
_description = "Stock Pull List Wizard Line" _description = "Stock Pull List Wizard Line"
wizard_id = fields.Many2one(comodel_name="stock.pull.list.wizard",) wizard_id = fields.Many2one(
product_id = fields.Many2one(comodel_name="product.product",) comodel_name="stock.pull.list.wizard",
location_id = fields.Many2one(comodel_name="stock.location",) )
product_id = fields.Many2one(
comodel_name="product.product",
)
location_id = fields.Many2one(
comodel_name="stock.location",
)
date_expected = fields.Date() date_expected = fields.Date()
available_qty = fields.Float() available_qty = fields.Float()
incoming_qty = fields.Float() incoming_qty = fields.Float()
raw_demand_qty = fields.Float() raw_demand_qty = fields.Float()
needed_qty = fields.Float() needed_qty = fields.Float()
stock_rule_id = fields.Many2one(comodel_name="stock.rule",) stock_rule_id = fields.Many2one(
comodel_name="stock.rule",
)
selected = fields.Boolean(default=True) selected = fields.Boolean(default=True)
def _is_available_in_source_location(self): def _is_available_in_source_location(self):