You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
2.6 KiB

  1. from odoo import fields, models
  2. class ResCompany(models.Model):
  3. _inherit = 'res.company'
  4. def _get_base_logo(self):
  5. base_url = self.env['ir.config_parameter'].get_param('web.base.url')
  6. self.logo_url = base_url + "/logo.png"
  7. coop_email_contact = fields.Char(string="Contact email address for the"
  8. " cooperator")
  9. subscription_maximum_amount = fields.Float(string="Maximum authorised"
  10. " subscription amount")
  11. default_country_id = fields.Many2one('res.country',
  12. string="Default country",
  13. default=lambda self: self.country_id)
  14. default_lang_id = fields.Many2one('res.lang',
  15. string="Default lang")
  16. allow_id_card_upload = fields.Boolean(string="Allow ID Card upload")
  17. create_user = fields.Boolean(string="Create user for cooperator",
  18. default=True)
  19. board_representative = fields.Char(string="Board representative name")
  20. signature_scan = fields.Binary(string="Board representative signature")
  21. property_cooperator_account = fields.Many2one('account.account',
  22. company_dependent=True,
  23. string="Cooperator Account",
  24. domain=[('internal_type', '=', 'receivable'),
  25. ('deprecated', '=', False)],
  26. help="This account will be"
  27. " the default one as the"
  28. " receivable account for the"
  29. " cooperators",
  30. required=True)
  31. unmix_share_type = fields.Boolean(string="Unmix share type",
  32. default=True,
  33. help="If checked, A cooperator will be"
  34. " authorised to have only one type"
  35. " of share")
  36. display_logo1 = fields.Boolean(string="Display logo 1")
  37. display_logo2 = fields.Boolean(string="Display logo 2")
  38. bottom_logo1 = fields.Binary(string="Bottom logo 1")
  39. bottom_logo2 = fields.Binary(string="Bottom logo 2")
  40. logo_url = fields.Char(string="logo url",
  41. compute="_get_base_logo")