diff options
Diffstat (limited to 'odoo/addons/test_rpc/models.py')
| -rw-r--r-- | odoo/addons/test_rpc/models.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/odoo/addons/test_rpc/models.py b/odoo/addons/test_rpc/models.py new file mode 100644 index 00000000000..2d547a9947e --- /dev/null +++ b/odoo/addons/test_rpc/models.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class ModelA(models.Model): + _name = "test_rpc.model_a" + _description = "Model A" + + name = fields.Char(required=True) + field_b1 = fields.Many2one("test_rpc.model_b", string="required field", required=True) + field_b2 = fields.Many2one("test_rpc.model_b", string="restricted field", ondelete="restrict") + + +class ModelB(models.Model): + _name = "test_rpc.model_b" + _description = "Model B" + + name = fields.Char(required=True) |
