Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,2 @@
from . import models
from . import components

View file

@ -0,0 +1,22 @@
# Copyright 2016 Camptocamp SA
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
from odoo.addons.component.core import Component
class ConnectorTestBinder(Component):
_name = "connector.test.binder"
_inherit = ["base.binder"]
_apply_on = ["connector.test.binding"]
class NoInheritsBinder(Component):
_name = "connector.test.no.inherits.binder"
_inherit = ["base.binder"]
_apply_on = ["no.inherits.binding"]
def unwrap_binding(self, binding):
raise ValueError("Not an inherits")
def unwrap_model(self):
raise ValueError("Not an inherits")

View file

@ -0,0 +1,74 @@
# Copyright 2016 Camptocamp SA
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
from odoo import fields, models
class TestBackend(models.Model):
_name = "test.backend"
_inherit = ["connector.backend"]
_description = "Backends for testing Connector"
class ConnectorTestRecord(models.Model):
_name = "connector.test.record"
_description = "Records for testing Connector"
class ConnectorTestBinding(models.Model):
_name = "connector.test.binding"
_inherit = "external.binding"
_inherits = {"connector.test.record": "odoo_id"}
_description = "Bindings for testing Connector"
backend_id = fields.Many2one(
comodel_name="test.backend",
string="Backend",
required=True,
ondelete="restrict",
)
external_id = fields.Integer(string="ID on External")
odoo_id = fields.Many2one(
comodel_name="connector.test.record",
string="Test Record",
required=True,
index=True,
ondelete="restrict",
)
_sql_constraints = [
(
"test_binding_uniq",
"unique(backend_id, external_id)",
"A binding already exists for this record",
)
]
def job_related_action_unwrap(self):
return self
class NoInheritsBinding(models.Model):
_name = "no.inherits.binding"
_inherit = "external.binding"
_description = "Bindings without inherit for testing Connector"
backend_id = fields.Many2one(
comodel_name="test.backend",
string="Backend",
required=True,
ondelete="restrict",
)
external_id = fields.Integer(string="ID on External")
_sql_constraints = [
(
"test_binding_uniq",
"unique(backend_id, external_id)",
"A binding already exists for this record",
)
]
def job_related_action_unwrap(self):
return self