http://ludwiktrammer.github.io/odoo/custom-settings-odoo.html in this article he did
class YourSettings(models.TransientModel):
_inherit = 'res.config.settings'
_name = 'your.config.settings'
company_name = fields.Char()
company_phone = fields.Char()
@api.model
def get_default_company_values(self, fields):
company = self.env.user.company_id
return {
'company_name': company.name,
'company_phone': company.phone,
}
@api.one
def set_company_values(self):
company = self.env.user.company_id
company.name = self.company_name
company.phone = self.company_phone
i want to make company_name = fields.Char() to be company_name = fields.many2one('res.partner','company name')
but the result in employee like res.partner(9,) how to make it show the name of the company second i create custom field person height ,person weight i want to add this 2 fields to this custom settings