Ver Fonte

Módulo que extiende la vista lista de pos order line - agrega parner_id y user_id

SEBAS há 1 ano atrás
commit
5d816c1f78
9 ficheiros alterados com 131 adições e 0 exclusões
  1. 26 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 35 0
      __openerp__.py
  4. 26 0
      model/__init__.py
  5. BIN
      model/__init__.pyc
  6. 7 0
      model/pos.py
  7. BIN
      model/pos.pyc
  8. BIN
      static/description/icon.png
  9. 37 0
      view/pos_order_line_extend.xml

+ 26 - 0
__init__.py

@@ -0,0 +1,26 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################
+
+from . import model

BIN
__init__.pyc


+ 35 - 0
__openerp__.py

@@ -0,0 +1,35 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################
+
+{
+    'name': 'Vista Point of Sale Line',
+    'version': '1.0',
+    'author': 'Eiru',
+    'depends': ['point_of_sale'],
+    'data': [
+        'view/pos_order_line_extend.xml',
+    ],
+    'installable': True,
+}

+ 26 - 0
model/__init__.py

@@ -0,0 +1,26 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################
+
+from . import pos

BIN
model/__init__.pyc


+ 7 - 0
model/pos.py

@@ -0,0 +1,7 @@
+from openerp import models, fields
+
+class PosOrderLineExtended(models.Model):
+    _inherit = 'pos.order.line'
+
+    partner_id = fields.Many2one('res.partner', string='Partner', related='order_id.partner_id', store=True)
+    user_id = fields.Many2one('res.users', string='User', related='order_id.user_id', store=True)

BIN
model/pos.pyc


BIN
static/description/icon.png


+ 37 - 0
view/pos_order_line_extend.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <!-- Extender la vista tree de pos.order.line -->
+        <record id="view_pos_order_line_extend" model="ir.ui.view">
+            <field name="name">pos.order.line.extend.tree</field>
+            <field name="model">pos.order.line</field>
+            <field name="inherit_id" ref="point_of_sale.view_pos_order_line"/>
+            <field name="arch" type="xml">
+              <xpath expr="//field[@name='product_id']" position="after">
+                  <field name="partner_id" string="Cliente"/>
+                  <field name="user_id" string="Usuario"/>
+              </xpath>
+
+
+            </field>
+        </record>
+
+        <record id="view_pos_order_linefilter_search1" model="ir.ui.view">
+            <field name="name">pos_order_linefilter.search1</field>
+            <field name="model">pos.order.line</field>
+            <!-- <field name="inherit_id" ref="point_of_sale.view_pos_order_line"/> -->
+            <field name="arch" type="xml">
+              <search>
+                 <field name="partner_id" string="Cliente" operator="child_of"/>
+                 <field name="user_id" string="Usuario"/>
+                  <separator/>
+                  <group string="Agrupar por">
+                      <filter string="Por Cliente" context="{'group_by':'partner_id'}"/>
+                      <filter string="Por Usuario" context="{'group_by':'user_id'}"/>
+                  </group>
+               </search>
+            </field>
+        </record>
+
+    </data>
+</openerp>