mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
purchase stock
This commit is contained in:
1
app_purchase_stock_available/__init__.py
Normal file
1
app_purchase_stock_available/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
50
app_purchase_stock_available/__manifest__.py
Normal file
50
app_purchase_stock_available/__manifest__.py
Normal file
@@ -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
|
||||||
|
}
|
||||||
55
app_purchase_stock_available/i18n/zh_CN.po
Normal file
55
app_purchase_stock_available/i18n/zh_CN.po
Normal file
@@ -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 "在手数量"
|
||||||
|
|
||||||
1
app_purchase_stock_available/models/__init__.py
Normal file
1
app_purchase_stock_available/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import purchase
|
||||||
16
app_purchase_stock_available/models/purchase.py
Normal file
16
app_purchase_stock_available/models/purchase.py
Normal file
@@ -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,
|
||||||
|
)
|
||||||
8
app_purchase_stock_available/readme/CONTRIBUTORS.rst
Normal file
8
app_purchase_stock_available/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
* `AvanzOSC <http://www.avanzosc.es/>`_:
|
||||||
|
|
||||||
|
* Daniel Campos <danielcampos@avanzosc.es>
|
||||||
|
* Ana Juaristi <anajuaristi@avanzosc.es>
|
||||||
|
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||||
|
|
||||||
|
* Pedro Baeza <pedro.baeza@tecnativa.com>
|
||||||
|
* Vicent Cubells <vicent.cubells@tecnativa.com>
|
||||||
2
app_purchase_stock_available/readme/DESCRIPTION.rst
Normal file
2
app_purchase_stock_available/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
This module allows to view the virtual stock quantity of a product in the
|
||||||
|
purchase order line.
|
||||||
2
app_purchase_stock_available/readme/USAGE.rst
Normal file
2
app_purchase_stock_available/readme/USAGE.rst
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
* Create a new purchase order and now you will see available stock of product
|
||||||
|
on every purchase line.
|
||||||
BIN
app_purchase_stock_available/static/description/banner.png
Normal file
BIN
app_purchase_stock_available/static/description/banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
BIN
app_purchase_stock_available/static/description/demo1.jpg
Normal file
BIN
app_purchase_stock_available/static/description/demo1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
BIN
app_purchase_stock_available/static/description/icon.png
Normal file
BIN
app_purchase_stock_available/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
72
app_purchase_stock_available/static/description/index.html
Normal file
72
app_purchase_stock_available/static/description/index.html
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<section class="oe_container">
|
||||||
|
<div class="oe_row oe_spaced">
|
||||||
|
<div class="oe_span12">
|
||||||
|
<h2 class="oe_slogan">Show Stock available / Forecast in Purchase order line</h2>
|
||||||
|
<div class="oe_row">
|
||||||
|
<div class="oe_span12">
|
||||||
|
<img class="oe_demo oe_picture oe_screenshot" src="banner.png">
|
||||||
|
</div>
|
||||||
|
<div class="oe_span12 oe_spaced">
|
||||||
|
<div class="alert alert-info" style="padding:8px;font-weight: 300; font-size: 20px;">
|
||||||
|
<i class="fa fa-hand-o-right"></i><b> Key features: </b>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-check-square-o text-primary"></i>
|
||||||
|
Lastest update: v12.19.1.4
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-check-square-o text-primary"></i>
|
||||||
|
Show Stock available in Purchase order line
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i class="fa fa-check-square-o text-primary"></i>
|
||||||
|
Show Stock Forecast in Purchase order line
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_span12">
|
||||||
|
<img class="oe_demo oe_picture oe_screenshot" src="demo1.jpg">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="oe_container oe_dark">
|
||||||
|
<div class="oe_row oe_spaced text-center">
|
||||||
|
<div class="oe_span12">
|
||||||
|
<h2 class="oe_slogan">Technical Help & Support</h2>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12 pad0">
|
||||||
|
<div class="oe_mt16">
|
||||||
|
<p><h4>
|
||||||
|
For any type of technical help & support requests, Feel free to contact us</h4></p>
|
||||||
|
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||||
|
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:guohuadeng@hotmail.com"><span
|
||||||
|
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||||
|
<i class="fa fa-envelope"></i> guohuadeng@hotmail.com</a>
|
||||||
|
<p><h4>
|
||||||
|
Via QQ: 300883</h4></p>
|
||||||
|
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||||
|
class="btn btn-warning btn-lg" rel="nofollow" href="mailto:300883@qq.com"><span
|
||||||
|
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||||
|
<i class="fa fa-envelope"></i> 300883@qq.com</a>
|
||||||
|
</div>
|
||||||
|
<div class="oe_mt16">
|
||||||
|
<p><h4>
|
||||||
|
Visit our website for more support.</h4></p>
|
||||||
|
<a style="background: #002e5a none repeat scroll 0% 0%; color: rgb(255, 255, 255);position: relative; overflow: hidden;"
|
||||||
|
class="btn btn-warning btn-lg" rel="nofollow" href="http://www.sunpop.cn" target="_blank"><span
|
||||||
|
style="height: 354px; width: 354px; top: -147.433px; left: -6.93335px;" class="o_ripple"></span>
|
||||||
|
<i class="fa fa-web"></i>http://www.sunpop.cn</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oe_row oe_spaced text-center">
|
||||||
|
<h1>More Powerful addons, Make your odoo very easy to use, easy customize:
|
||||||
|
<a class="btn btn-primary mb16" href="http://www.odoo.com/apps/modules/browse?author=Sunpop.cn">Supop.cn Odoo Addons</a>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
16
app_purchase_stock_available/views/purchase_order_views.xml
Normal file
16
app_purchase_stock_available/views/purchase_order_views.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="purchase_order_form_view_stock">
|
||||||
|
<field name="name">purchase.order.form.view.stock</field>
|
||||||
|
<field name="model">purchase.order</field>
|
||||||
|
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='order_line']/tree//field[@name='product_uom']" position="after">
|
||||||
|
<field name="qty_available"/>
|
||||||
|
<field name="virtual_available"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user