Files
odoo_source/addons/purchase_stock/models/res_config_settings.py
T
Arnold Moyaux 46a78eb995 [IMP] purchase_stock: day to purchase
Create RFQ with an order by date in futur. It will allow to
discuss RFQ before validate them and to be in time for the need.

today            Order by         Sheduled date of receipt
|_______________|___________________|_____________________|
days to purchase      vendor LT           security days

Task: 1849912
2020-01-09 16:09:12 +00:00

22 lines
725 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
module_stock_dropshipping = fields.Boolean("Dropshipping")
days_to_purchase = fields.Float(
related='company_id.days_to_purchase', readonly=False)
is_installed_sale = fields.Boolean(string="Is the Sale Module Installed")
def get_values(self):
res = super(ResConfigSettings, self).get_values()
res.update(
is_installed_sale=self.env['ir.module.module'].search([('name', '=', 'sale'), ('state', '=', 'installed')]).id,
)
return res