瀏覽代碼

commit inicial

Rodney Elpidio Enciso Arias 6 年之前
當前提交
134375adec
共有 7 個文件被更改,包括 45 次插入0 次删除
  1. 1 0
      .gitignore
  2. 1 0
      __init__.py
  3. 二進制
      __init__.pyc
  4. 15 0
      __openerp__.py
  5. 11 0
      stock_inventory_product_ean13.py
  6. 二進制
      stock_inventory_product_ean13.pyc
  7. 17 0
      stock_inventory_product_ean13.xml

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+.*pyc

+ 1 - 0
__init__.py

@@ -0,0 +1 @@
+from . import stock_inventory_product_ean13

二進制
__init__.pyc


+ 15 - 0
__openerp__.py

@@ -0,0 +1,15 @@
+{
+    'name':'Stock Inventory Product Ean13',
+    'description':"""
+Stock Inventory Product Ean13
+=============================
+Stock
+""",
+    'author': 'Eiru Software',
+    'website':'www.eiru.com.py',
+    'depends':['base','stock'],
+    'data':[
+        'stock_inventory_product_ean13.xml',
+    ],
+    'installable':True,
+}

+ 11 - 0
stock_inventory_product_ean13.py

@@ -0,0 +1,11 @@
+from openerp import models, fields, api
+
+class StockInventoryLine(models.Model):
+    _inherit = 'stock.inventory.line'
+
+    @api.one
+    @api.depends('product_id')
+    def get_product_ean13(self):
+        self.ean13 = self.product_id.ean13
+
+    ean13 = fields.Char(string="Codigo de Barras", compute="get_product_ean13")

二進制
stock_inventory_product_ean13.pyc


+ 17 - 0
stock_inventory_product_ean13.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <record model="ir.ui.view" id="stock_inventory_ean13">
+            <field name="name">stock.inventory.ean13</field>
+            <field name="model">stock.inventory</field>
+            <field name="inherit_id" ref="stock.view_inventory_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//tree[@string='Inventory Details']//field[@name='product_id']" position="after">
+                    <field name="ean13"/>
+                </xpath>
+            </field>
+        </record>
+        
+   </data>
+</openerp>