Merge PR #1294 into 14.0

Signed-off-by LoisRForgeFlow
This commit is contained in:
OCA-git-bot
2021-11-08 11:51:52 +00:00
3 changed files with 15 additions and 2 deletions

View File

@@ -16,6 +16,7 @@
"data": [
"wizards/stock_pull_list_wizard.xml",
"security/ir.model.access.csv",
"data/stock_pull_list_sequence_data.xml",
],
"installable": True,
}

View File

@@ -0,0 +1,9 @@
<odoo noupdate="1">
<record id="seq_stock_pull_list" model="ir.sequence">
<field name="name">Stock Pull List</field>
<field name="code">stock.pull.list</field>
<field name="prefix">SPL/</field>
<field name="padding">6</field>
<field name="company_id" eval="False" />
</record>
</odoo>

View File

@@ -238,8 +238,11 @@ class PullListWizard(models.TransientModel):
return list(itertools.product(*options_list))
def _prepare_proc_group_values(self):
# TODO: use special secuence to name procurement groups of pull lists.
return {}
vals = {}
name = self.env["ir.sequence"].next_by_code("stock.pull.list")
if name:
vals["name"] = name
return vals
def action_procure(self):
self.ensure_one()