mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] procurement_auto_create_group: Migration to 12.0
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
from . import procurement_rule
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import stock_rule
|
||||
from . import procurement_group
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import api, models, _
|
||||
from odoo.exceptions import UserError
|
||||
@@ -26,7 +25,7 @@ class ProcurementGroup(models.Model):
|
||||
name = self.env['ir.sequence'].next_by_code(
|
||||
'procurement.group') or False
|
||||
if not name:
|
||||
raise UserError(_('No sequence defined for procurement group'))
|
||||
raise UserError(_('No sequence defined for procurement group.'))
|
||||
return {
|
||||
'name': name
|
||||
'name': name,
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class ProcurementRule(models.Model):
|
||||
_inherit = 'procurement.rule'
|
||||
class StockRule(models.Model):
|
||||
_inherit = 'stock.rule'
|
||||
|
||||
auto_create_group = fields.Boolean(string='Auto-create Procurement Group')
|
||||
|
||||
Reference in New Issue
Block a user