diff --git a/app_purchase_stock_available/__init__.py b/app_purchase_stock_available/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/app_purchase_stock_available/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/app_purchase_stock_available/__manifest__.py b/app_purchase_stock_available/__manifest__.py new file mode 100644 index 00000000..910a7b8f --- /dev/null +++ b/app_purchase_stock_available/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- + +# Created on 2019-01-04 +# author: 广州尚鹏,http://www.sunpop.cn +# email: 300883@qq.com +# resource of Sunpop +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +# Odoo12在线用户手册(长期更新) +# http://www.sunpop.cn/documentation/user/12.0/en/index.html + +# Odoo12在线开发者手册(长期更新) +# http://www.sunpop.cn/documentation/12.0/index.html + +# Odoo10在线中文用户手册(长期更新) +# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html + +# Odoo10离线中文用户手册下载 +# http://www.sunpop.cn/odoo10_user_manual_document_offline/ +# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备) +# http://www.sunpop.cn/odoo10_developer_document_offline/ + +{ + "name": "Stock available in Purchase order line, Forecast", + 'summary': 'App Show product Quantity on hand and Forecast Quantity in Purchase Order', + "version": "11.19.1.4", + 'category': 'Purchases', + 'author': 'Sunpop.cn', + 'website': 'http://www.sunpop.cn', + 'license': 'AGPL-3', + 'sequence': 2, + 'installable': True, + 'auto_install': False, + 'application': True, + 'images': ['static/description/banner.png'], + 'currency': 'EUR', + 'price': 18, + 'description': """ + App Show stock product Quantity on hand and Forecast Quantity in Purchase Order + 采购单中显示产品库存量 + """, + 'depends': [ + 'purchase', + 'stock', + ], + "data": [ + 'views/purchase_order_views.xml', + ], + "installable": True +} diff --git a/app_purchase_stock_available/i18n/zh_CN.po b/app_purchase_stock_available/i18n/zh_CN.po new file mode 100644 index 00000000..7d487034 --- /dev/null +++ b/app_purchase_stock_available/i18n/zh_CN.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_purchase_stock_available +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0+e-20181221\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 17:34+0000\n" +"PO-Revision-Date: 2019-01-03 17:34+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: app_purchase_stock_available +#: model:ir.model.fields,help:app_purchase_stock_available.field_purchase_order_line__qty_available +msgid "Current quantity of products.\n" +"In a context with a single Stock Location, this includes goods stored at this Location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n" +"stored in the Stock Location of the Warehouse of this Shop, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' type." +msgstr "在手数量。 \n" +"对单一库存位置来说,包括了此位置或其任何子位置所存储的产品。 \n" +"对单一仓库来说,包括了此仓库位置或其任何子位置所存储的产品。 \n" +"另外,这包括了所有'内部'类型的任何库存位置所存储的产品。" + +#. module: app_purchase_stock_available +#: model:ir.model.fields,field_description:app_purchase_stock_available.field_purchase_order_line__virtual_available +msgid "Forecast Quantity" +msgstr "在途数量" + +#. module: app_purchase_stock_available +#: model:ir.model.fields,help:app_purchase_stock_available.field_purchase_order_line__virtual_available +msgid "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" +"In a context with a single Stock Location, this includes goods stored in this location, or any of its children.\n" +"In a context with a single Warehouse, this includes goods stored in the Stock Location of this Warehouse, or any of its children.\n" +"Otherwise, this includes goods stored in any Stock Location with 'internal' type." +msgstr "在途数量(计算为手上数量 - 出库 + 入库) \n" +"对于单一库存位置来说,这包括了存储在此位置及其子位置的货物。\n" +"对于单一仓库来说,这包括了存储在此仓库的库存位置及其子位置的货物。\n" +"否则,这包括存储在任何“内部”类型的任何库存位置的货物。" + +#. module: app_purchase_stock_available +#: model:ir.model,name:app_purchase_stock_available.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "采购订单行" + +#. module: app_purchase_stock_available +#: model:ir.model.fields,field_description:app_purchase_stock_available.field_purchase_order_line__qty_available +msgid "Quantity On Hand" +msgstr "在手数量" + diff --git a/app_purchase_stock_available/models/__init__.py b/app_purchase_stock_available/models/__init__.py new file mode 100644 index 00000000..370f577b --- /dev/null +++ b/app_purchase_stock_available/models/__init__.py @@ -0,0 +1 @@ +from . import purchase diff --git a/app_purchase_stock_available/models/purchase.py b/app_purchase_stock_available/models/purchase.py new file mode 100644 index 00000000..813c6c01 --- /dev/null +++ b/app_purchase_stock_available/models/purchase.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models, _ + +class PurchaseOrderLine(models.Model): + _inherit = 'purchase.order.line' + + virtual_available = fields.Float( + related='product_id.virtual_available', + readonly=True, + ) + qty_available = fields.Float( + related='product_id.qty_available', + readonly=True, + ) diff --git a/app_purchase_stock_available/readme/CONTRIBUTORS.rst b/app_purchase_stock_available/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..b03c1273 --- /dev/null +++ b/app_purchase_stock_available/readme/CONTRIBUTORS.rst @@ -0,0 +1,8 @@ +* `AvanzOSC `_: + + * Daniel Campos + * Ana Juaristi +* `Tecnativa `_: + + * Pedro Baeza + * Vicent Cubells diff --git a/app_purchase_stock_available/readme/DESCRIPTION.rst b/app_purchase_stock_available/readme/DESCRIPTION.rst new file mode 100644 index 00000000..426705ed --- /dev/null +++ b/app_purchase_stock_available/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows to view the virtual stock quantity of a product in the +purchase order line. diff --git a/app_purchase_stock_available/readme/USAGE.rst b/app_purchase_stock_available/readme/USAGE.rst new file mode 100644 index 00000000..d2ad4ea3 --- /dev/null +++ b/app_purchase_stock_available/readme/USAGE.rst @@ -0,0 +1,2 @@ +* Create a new purchase order and now you will see available stock of product + on every purchase line. diff --git a/app_purchase_stock_available/static/description/banner.png b/app_purchase_stock_available/static/description/banner.png new file mode 100644 index 00000000..f7c9efa6 Binary files /dev/null and b/app_purchase_stock_available/static/description/banner.png differ diff --git a/app_purchase_stock_available/static/description/demo1.jpg b/app_purchase_stock_available/static/description/demo1.jpg new file mode 100644 index 00000000..e1ff4d20 Binary files /dev/null and b/app_purchase_stock_available/static/description/demo1.jpg differ diff --git a/app_purchase_stock_available/static/description/icon.png b/app_purchase_stock_available/static/description/icon.png new file mode 100644 index 00000000..54af10f1 Binary files /dev/null and b/app_purchase_stock_available/static/description/icon.png differ diff --git a/app_purchase_stock_available/static/description/index.html b/app_purchase_stock_available/static/description/index.html new file mode 100644 index 00000000..4cdf14b6 --- /dev/null +++ b/app_purchase_stock_available/static/description/index.html @@ -0,0 +1,72 @@ +
+
+
+

Show Stock available / Forecast in Purchase order line

+
+
+ +
+
+
+ Key features: +
    +
  • + + Lastest update: v12.19.1.4 +
  • +
  • + + Show Stock available in Purchase order line +
  • +
  • + + Show Stock Forecast in Purchase order line +
  • +
+
+
+
+ +
+
+
+
+
+ +
+
+
+

Technical Help & Support

+
+
+
+

+ For any type of technical help & support requests, Feel free to contact us

+ + guohuadeng@hotmail.com +

+ Via QQ: 300883

+ + 300883@qq.com +
+
+

+ Visit our website for more support.

+ + http://www.sunpop.cn +
+
+
+
+

More Powerful addons, Make your odoo very easy to use, easy customize: + Supop.cn Odoo Addons +

+
+
+ diff --git a/app_purchase_stock_available/static/description/split_delivery.png b/app_purchase_stock_available/static/description/split_delivery.png new file mode 100644 index 00000000..2b992ade Binary files /dev/null and b/app_purchase_stock_available/static/description/split_delivery.png differ diff --git a/app_purchase_stock_available/views/purchase_order_views.xml b/app_purchase_stock_available/views/purchase_order_views.xml new file mode 100644 index 00000000..9164b56a --- /dev/null +++ b/app_purchase_stock_available/views/purchase_order_views.xml @@ -0,0 +1,16 @@ + + + + + purchase.order.form.view.stock + purchase.order + + + + + + + + + +