Files
odoo_source/odoo/addons/test_rpc/models.py
T
Christophe Simonis 24b677a359 [FIX] test_rpc: more robust tests
- mute logger to avoid logging bad queries
 - enforce fields strings

These changes will forbid tests to fail in following versions.
2019-07-03 19:20:31 +02:00

21 lines
580 B
Python

# -*- 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)