mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
Do not raise ConnectionError if we get a response Use ConnectionError from requests lib instead of overriding it Fix push_to_pingen (writes on state as for cron), remove unneeded loops
21 lines
559 B
Python
21 lines
559 B
Python
# -*- coding: utf-8 -*-
|
|
# Author: Guewen Baconnier
|
|
# Copyright 2012-2017 Camptocamp SA
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import models, fields
|
|
from .pingen import Pingen
|
|
|
|
|
|
class ResCompany(models.Model):
|
|
|
|
_inherit = 'res.company'
|
|
|
|
pingen_token = fields.Char('Pingen Token', size=32)
|
|
pingen_staging = fields.Boolean('Pingen Staging')
|
|
|
|
def _pingen(self):
|
|
""" Return a Pingen instance to work on """
|
|
self.ensure_one()
|
|
return Pingen(self.pingen_token, staging=self.pingen_staging)
|