mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
auto_create_group should be false when group_propagation_option is not 'propagate'
This commit is contained in:
committed by
Laurent Mignon (ACSONE)
parent
ecbaac78ae
commit
af77b6ceff
@@ -1,10 +1,15 @@
|
||||
# -*- 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).
|
||||
from openerp import fields, models
|
||||
from openerp import api, fields, models
|
||||
|
||||
|
||||
class ProcurementRule(models.Model):
|
||||
_inherit = 'procurement.rule'
|
||||
|
||||
auto_create_group = fields.Boolean(string='Auto-create Procurement Group')
|
||||
|
||||
@api.onchange('group_propagation_option')
|
||||
def _onchange_group_propagation_option(self):
|
||||
if self.group_propagation_option != 'propagate':
|
||||
self.auto_create_group = False
|
||||
|
||||
Reference in New Issue
Block a user