first push message

This commit is contained in:
2026-07-01 14:41:49 +07:00
parent 6667dec2bf
commit 58b5f46cc4
2951 changed files with 316619 additions and 0 deletions
@@ -0,0 +1 @@
from . import models
@@ -0,0 +1,23 @@
from odoo import models, fields, api
class AuthOAuthProvider(models.Model):
_inherit = 'auth.oauth.provider'
company_id = fields.Many2one(
'res.company',
string='Allowed Company',
help="If set, this provider is only available for this company's users."
)
website_id = fields.Many2one(
'website',
string='Allowed Website',
help="If set, this provider button will only show on this website's login page."
)
@api.onchange('company_id')
def _onchange_company_id(self):
"""Automatically link website if company is selected and only one website exists for that company"""
if self.company_id and not self.website_id:
website = self.env['website'].search([('company_id', '=', self.company_id.id)], limit=1)
if website:
self.website_id = website.id