mirror of
https://github.com/bringout/oca-report.git
synced 2026-04-25 05:42:05 +02:00
Initial commit: OCA Report packages (45 packages)
This commit is contained in:
commit
2f4db400df
2543 changed files with 469120 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
# Author: Guewen Baconnier
|
||||
# Copyright 2012-2023 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
from .pingen import Pingen
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
|
||||
_inherit = "res.company"
|
||||
|
||||
pingen_clientid = fields.Char(size=20)
|
||||
pingen_client_secretid = fields.Char(size=80)
|
||||
pingen_organization = fields.Char("Pingen organization ID")
|
||||
pingen_webhook_secret = fields.Char()
|
||||
pingen_staging = fields.Boolean()
|
||||
pingen_ssl_verify = fields.Boolean(default=True)
|
||||
|
||||
def _pingen(self):
|
||||
"""Return a Pingen instance to work on"""
|
||||
self.ensure_one()
|
||||
|
||||
clientid = self.pingen_clientid
|
||||
secretid = self.pingen_client_secretid
|
||||
return Pingen(
|
||||
clientid,
|
||||
secretid,
|
||||
organization=self.pingen_organization,
|
||||
staging=self.pingen_staging,
|
||||
verify=self.pingen_ssl_verify,
|
||||
)
|
||||
|
||||
def _get_pingen_client(self):
|
||||
"""Returns a pingen session for a user"""
|
||||
return self._pingen()
|
||||
Loading…
Add table
Add a link
Reference in a new issue