summaryrefslogtreecommitdiff
path: root/odoo/addons/test_documentation_examples/inheritance.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2016-09-02 15:58:39 +0200
committerRaphael Collet <rco@openerp.com>2016-09-02 17:28:12 +0200
commit9e64f9f9514194d74e166b032add8511182f2677 (patch)
tree5086710c04c6b923be18a6d1d97b3f0f3a2a9c4a /odoo/addons/test_documentation_examples/inheritance.py
parent11812b0b9e82b2b1b9041d8250ce01e7b4a5f7ee (diff)
[REF] openerp: move `openerp` to `odoo`
Diffstat (limited to 'odoo/addons/test_documentation_examples/inheritance.py')
-rw-r--r--odoo/addons/test_documentation_examples/inheritance.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/odoo/addons/test_documentation_examples/inheritance.py b/odoo/addons/test_documentation_examples/inheritance.py
new file mode 100644
index 00000000000..b1586760d98
--- /dev/null
+++ b/odoo/addons/test_documentation_examples/inheritance.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import models, fields
+
+class Inheritance0(models.Model):
+ _name = 'inheritance.0'
+
+ name = fields.Char()
+
+ def call(self):
+ return self.check("model 0")
+
+ def check(self, s):
+ return "This is {} record {}".format(s, self.name)
+
+class Inheritance1(models.Model):
+ _name = 'inheritance.1'
+ _inherit = 'inheritance.0'
+
+ def call(self):
+ return self.check("model 1")