changeset 8c5cd7b9406c in modules/web_shop:default
details: https://hg.tryton.org/modules/web_shop?cmd=changeset&node=8c5cd7b9406c
description:
        Add web_shop_shopify module

        issue10611
        review362271002
diffstat:

 __init__.py                    |   1 +
 product.py                     |  11 +++++++++++
 product.xml                    |   6 ++++++
 view/product_template_form.xml |  11 +++++++++++
 4 files changed, 29 insertions(+), 0 deletions(-)

diffs (67 lines):

diff -r 32c42e2dc2fe -r 8c5cd7b9406c __init__.py
--- a/__init__.py       Mon Sep 13 23:29:57 2021 +0200
+++ b/__init__.py       Tue Oct 12 10:15:55 2021 +0200
@@ -17,6 +17,7 @@
         web.Shop_Product,
         web.Shop_ProductCategory,
         web.User,
+        product.Template,
         product.Product,
         product.Category,
         sale.Sale,
diff -r 32c42e2dc2fe -r 8c5cd7b9406c product.py
--- a/product.py        Mon Sep 13 23:29:57 2021 +0200
+++ b/product.py        Tue Oct 12 10:15:55 2021 +0200
@@ -1,10 +1,21 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 
+from trytond.config import config
 from trytond.model import fields
 from trytond.pool import PoolMeta
 from trytond.pyson import Eval
 
+if not config.get('html', 'plugins-product.template-web_shop_description'):
+    config.set(
+        'html', 'plugins-product.template-web_shop_description', 'fullpage')
+
+
+class Template(metaclass=PoolMeta):
+    __name__ = 'product.template'
+
+    web_shop_description = fields.Text("Web Shop Description", translate=True)
+
 
 class Product(metaclass=PoolMeta):
     __name__ = 'product.product'
diff -r 32c42e2dc2fe -r 8c5cd7b9406c product.xml
--- a/product.xml       Mon Sep 13 23:29:57 2021 +0200
+++ b/product.xml       Tue Oct 12 10:15:55 2021 +0200
@@ -3,6 +3,12 @@
 this repository contains the full copyright notices and license terms. -->
 <tryton>
     <data>
+        <record model="ir.ui.view" id="product_template_view_form">
+            <field name="model">product.template</field>
+            <field name="inherit" ref="product.template_view_form"/>
+            <field name="name">product_template_form</field>
+        </record>
+
         <record model="ir.ui.view" id="product_product_view_form">
             <field name="model">product.product</field>
             <field name="inherit" ref="product.product_view_form"/>
diff -r 32c42e2dc2fe -r 8c5cd7b9406c view/product_template_form.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/product_template_form.xml    Tue Oct 12 10:15:55 2021 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+    <xpath expr="//notebook/page[@id='customers']" position="inside">
+        <group name="web_shop_description" colspan="4" col="-1">
+            <field name="web_shop_description"/>
+            <field name="web_shop_description" string="Edit" widget="html" 
xexpand="0"/>
+        </group>
+    </xpath>
+</data>

Reply via email to