瀏覽代碼

[FIX] correcion de las vistas

Rodney Enciso Arias 7 年之前
父節點
當前提交
f236e17492
共有 3 個文件被更改,包括 9 次插入20 次删除
  1. 5 11
      product_curve.py
  2. 二進制
      product_curve.pyc
  3. 4 9
      product_curve_view.xml

+ 5 - 11
product_curve.py

@@ -6,22 +6,16 @@ from openerp import models, fields, api
 class ProductCurve(models.Model):
     _name = 'product.curve'
 
-    name = fields.Char('Curve Name', required=True)
-    description = fields.Text('Description', translate=True)
-    # partner_id = fields.Many2one(
-    #     'res.partner',
-    #     string='Partner',
-    #     help='Select a partner for this brand if it exists',
-    #     ondelete='restrict'
-    # )
+    name = fields.Char('Nombre', required=True)
+    description = fields.Text('Descripción', translate=True)
     logo = fields.Binary('Logo File')
     product_ids = fields.One2many(
         'product.template',
         'product_curve_id',
-        string='Curve Products',
+        string='Curva de Productos',
     )
     products_count = fields.Integer(
-        string='Number of products',
+        string='Numero de productos',
         compute='_get_products_count',
     )
 
@@ -37,7 +31,7 @@ class ProductTemplate(models.Model):
     product_curve_id = fields.Many2one(
         'product.curve',
         string='Curva',
-        help='Select a curve for this product'
+        help='Selecionar curva para este producto'
     )
 
     @api.multi

二進制
product_curve.pyc


+ 4 - 9
product_curve_view.xml

@@ -8,7 +8,6 @@
             <field name="arch" type="xml">
                 <search string="Product Curve">
                     <field name="name"/>
-                    <!-- <field name="partner_id"/> -->
                 </search>
             </field>
         </record>
@@ -39,7 +38,7 @@
                         <field name="logo" widget="image" class="oe_avatar oe_left"/>
                         <div class="oe_title">
                             <div class="oe_edit_only">
-                                <label for="name" string="Curve Name"/>
+                                <label for="name" string="Nombre"/>
                             </div>
                             <h1>
                                 <field name="name"/>
@@ -54,10 +53,7 @@
                                 <field name="products_count" string="Products" widget="statinfo" />
                             </button>
                         </div>
-                        <!-- <group>
-                            <field name="partner_id"/>
-                        </group> -->
-                        <group string="Description">
+                        <group string="Descripción">
                             <field name="description" nolabel="1"/>
                         </group>
                     </sheet>
@@ -72,7 +68,6 @@
                 <tree string="product.curve">
                     <field name="name"/>
                     <field name="description"/>
-                    <!-- <field name="partner_id"/> -->
                 </tree>
             </field>
         </record>
@@ -101,7 +96,7 @@
                                     <div>
                                         <a name="%(product_curve.action_open_curve_products)d"
                                            type="action">
-                                            <t t-esc="record.products_count.value"/> Products
+                                            <t t-esc="record.products_count.value"/> Productos
                                         </a>
                                     </div>
                                     <span>
@@ -127,7 +122,7 @@
                     <field name="product_curve_id"/>
                 </field>
                 <group string='Group by...' position="inside">
-                    <filter string="Curve" name="groupby_curve" domain="[]"
+                    <filter string="Curva" name="groupby_curve" domain="[]"
                             context="{'group_by' : 'product_curve_id'}"/>
                 </group>
             </field>