diff --git a/stock_pull_list/__manifest__.py b/stock_pull_list/__manifest__.py index 95c7e23b9..575525423 100644 --- a/stock_pull_list/__manifest__.py +++ b/stock_pull_list/__manifest__.py @@ -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, } diff --git a/stock_pull_list/data/stock_pull_list_sequence_data.xml b/stock_pull_list/data/stock_pull_list_sequence_data.xml new file mode 100644 index 000000000..c81858846 --- /dev/null +++ b/stock_pull_list/data/stock_pull_list_sequence_data.xml @@ -0,0 +1,9 @@ + + + Stock Pull List + stock.pull.list + SPL/ + 6 + + + diff --git a/stock_pull_list/wizards/stock_pull_list_wizard.py b/stock_pull_list/wizards/stock_pull_list_wizard.py index f581f8d2c..40eb5bf87 100644 --- a/stock_pull_list/wizards/stock_pull_list_wizard.py +++ b/stock_pull_list/wizards/stock_pull_list_wizard.py @@ -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()