Parcourir la source

Secuencia de items de stock picking

sebas il y a 4 ans
commit
a107c36c0a
4 fichiers modifiés avec 150 ajouts et 0 suppressions
  1. 53 0
      README.rst
  2. 3 0
      __init__.py
  3. 18 0
      __openerp__.py
  4. 76 0
      views/stockpicking.xml

+ 53 - 0
README.rst

@@ -0,0 +1,53 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+   :alt: License: AGPL-3
+
+======================
+Stock Picking Sequence
+======================
+
+This module extends the functionality of report to add the sequence and total quantity into the delivery order printout.
+
+Installation
+============
+
+To install this module, you need to:
+
+ * have basic modules installed (stock)
+
+
+Usage
+=====
+
+* A new column is created to display the sequence.
+* A new field diplays the total quantity.
+
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues <https://github.com/Elico-Corp/odoo/issues>`_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
+`here <https://github.com/Elico-Corp/odoo/issues/new?body=module:%20stock_picking_sequence%0Aversion:%20{8.0}%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Siyuan Gu: gu.siyuan@elico-corp.com
+
+Maintainer
+----------
+
+.. image:: https://www.elico-corp.com/logo.png
+:alt: Elico Corp
+:target: https://www.elico-corp.com
+
+This module is maintained by Elico Corporation.
+
+Elico Corporation offers consulting services to implement open source management software in SMEs, with a strong involvement in quality of service.
+
+Our headquarters are located in Shanghai with branches in Hong Kong, ShenZhen and Singapore servicing customers from Greater China, Asia Pacific, Europe, Americas, etc...

+ 3 - 0
__init__.py

@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+# © 2015 Elico Corp (www.elico-corp.com).
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

+ 18 - 0
__openerp__.py

@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+# © 2015 Elico Corp (www.elico-corp.com).
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+{
+    'name': 'Stock Picking Sequence',
+    'version': '8.0.1.0.1',
+    'depends': [
+        'stock',
+    ],
+    'author': 'Elico Corp',
+    'license': 'AGPL-3',
+    'website': 'https://www.elico-corp.com',
+    'data': [
+        'views/stockpicking.xml',
+    ],
+    'installable': True,
+    'application': False,
+}

+ 76 - 0
views/stockpicking.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <template id="report_picking_improvement" inherit_id="stock.report_picking">
+            <xpath expr="//table[@t-if='not o.pack_operation_ids']//thead//tr//th" position="before">
+                <th></th>
+            </xpath>
+
+            <xpath expr="//tr[@t-foreach='o.move_lines']" position="before">
+                <t t-set="index" t-value="1"/>
+            </xpath>
+
+            <xpath expr="//tr[@t-foreach='o.move_lines']//td" position="before">
+                <td>
+                    <span t-esc="index"/>
+                    <t t-set="index" t-value="index + 1"/>
+                </td>
+            </xpath>
+
+            <xpath expr="//tr[@t-foreach='o.move_lines']" position="after">
+                <tr>
+                    <td></td>
+                    <td></td>
+                    <td class="text-right">
+                        <span t-esc="sum(move.product_uom_qty for move in o.move_lines)"/>
+                    </td>
+                    <td></td>
+                    <td></td>
+                </tr>
+            </xpath>
+
+            <xpath expr="//table[@t-if='o.pack_operation_ids']//thead//tr//th" position="before">
+                <th></th>
+            </xpath>
+
+            <xpath expr="//tr[@t-foreach='o.pack_operation_ids']" position="before">
+                <t t-set="index" t-value="1"/>
+            </xpath>
+
+            <xpath expr="//tr[@t-foreach='o.pack_operation_ids']//td" position="before">
+                <td>
+                    <span t-esc="index"/>
+                    <t t-set="index" t-value="index + 1"/>
+                </td>
+            </xpath>
+
+            <xpath expr="//tr[@t-foreach='o.pack_operation_ids']" position="after">
+                <tr>
+                    <td></td>
+                    <td></td>
+                    <td class="text-right">
+                        <span t-esc="sum(pack_operation.product_qty for pack_operation in o.pack_operation_ids)"/>
+                    </td>
+                    <td></td>
+                    <td></td>
+                </tr>
+            </xpath>
+
+            <xpath expr="//table[@t-if='o.pack_operation_ids']" position="after">
+                <table class="table table-condensed">
+                    <thead>
+                        <tr>
+                            <th><strong>Note:</strong></th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr>
+                            <td><span t-field="o.note"/></td>
+                        </tr>
+                    </tbody>
+                </table>
+            </xpath>
+
+        </template>
+    </data>
+</openerp>