# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ResCompany(models.Model): _inherit = 'res.company' days_to_purchase = fields.Float( string='Days to Purchase', help="Days needed to confirm a PO, define when a PO should be validated") def _get_security_by_rule_action(self): res = super()._get_security_by_rule_action() res['buy'] = self.po_lead return res