From 50c93aef6873739bffb25e472f39ffd1cc9ab771 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 3 Mar 2016 15:34:00 +0100 Subject: [PATCH] Extend model example. --- base_multi_image/README.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/base_multi_image/README.rst b/base_multi_image/README.rst index e45a4b160..1bc488389 100644 --- a/base_multi_image/README.rst +++ b/base_multi_image/README.rst @@ -33,16 +33,28 @@ Development To develop a module based on this one: * See module ``product_multi_image`` as an example. + * You have to inherit model ``base_multi_image.owner`` to the model that needs the gallery:: class MyOwner(models.Model): - _name = "mymodule.name" - _inherit = "base_multi_image.owner" + _name = "my.model.name" + _inherit = ["my.model.name", "base_multi_image.owner"] # If you need this, you will need ``post_init_hook_for_submodules`` old_image_field = fields.Binary(related="image_main", store=False) +* Somewhere in the owner view, add:: + + + .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot :target: https://runbot.odoo-community.org/runbot/149/8.0