diff --git a/app_product_weight_sale/__init__.py b/app_product_weight_sale/__init__.py new file mode 100644 index 00000000..95ef785c --- /dev/null +++ b/app_product_weight_sale/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import models + + diff --git a/app_product_weight_sale/__manifest__.py b/app_product_weight_sale/__manifest__.py new file mode 100644 index 00000000..64ccd49b --- /dev/null +++ b/app_product_weight_sale/__manifest__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 ---*--- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +{ + 'name' : 'App Sales Order Weight', + 'version' : '12.0.11.14', + 'summary': 'Add sku weight in Sale Order', + 'sequence': 10, + 'license':'LGPL-3', + 'description': """ + Add sku weight in Sale Order. + Calculates total weight of a sale order, which is the sum of individual weights of each unit of the products in the order + """, + 'category': 'Sales', + 'author' : 'Sunpop.cn', + 'website' : 'http://www.sunpop.cn', + 'images': ['static/description/banner.jpg'], + 'depends' : ['sale_management'], + 'data': [ + 'views/sale_order_views.xml', + ], + 'demo': [ + ], + 'qweb': [ + ], + 'installable': True, + 'application': True, + 'auto_install': False, +} diff --git a/app_product_weight_sale/i18n/zh_CN.po b/app_product_weight_sale/i18n/zh_CN.po new file mode 100644 index 00000000..b0a0dd49 --- /dev/null +++ b/app_product_weight_sale/i18n/zh_CN.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_product_weight_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0+e-20180617\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-20 17:42+0000\n" +"PO-Revision-Date: 2018-07-20 17:42+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_product_weight_sale +#: model:ir.ui.view,arch_db:app_product_weight_sale.sale_weight_line_form +msgid " kg" +msgstr " 公斤" + +#. module: app_product_weight_sale +#: model:ir.model.fields,field_description:app_product_weight_sale.field_sale_order_total_weight +msgid "Total Weight(kg)" +msgstr "总重量(kg)" + +#. module: app_product_weight_sale +#: model:ir.ui.view,arch_db:app_product_weight_sale.sale_weight_line_form +msgid "Total Weight:" +msgstr "总重量:" + +#. module: app_product_weight_sale +#: model:ir.model.fields,field_description:app_product_weight_sale.field_sale_order_line_weight +msgid "Weight(kg)" +msgstr "公斤" + diff --git a/app_product_weight_sale/models/__init__.py b/app_product_weight_sale/models/__init__.py new file mode 100644 index 00000000..4ae612e7 --- /dev/null +++ b/app_product_weight_sale/models/__init__.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import sale_order +from . import sale_order_line + + diff --git a/app_product_weight_sale/models/sale_order.py b/app_product_weight_sale/models/sale_order.py new file mode 100644 index 00000000..9f4818bf --- /dev/null +++ b/app_product_weight_sale/models/sale_order.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + + +from odoo import api, fields, models, _ + +class SaleOrder(models.Model): + _inherit = "sale.order" + + total_weight = fields.Float(string='Total Weight(kg)', compute='_compute_weight_total') + + def _compute_weight_total(self): + for sale in self: + weight_tot = 0 + for line in sale.order_line: + if line.product_id: + weight_tot += line.weight or 0.0 + sale.total_weight = weight_tot + diff --git a/app_product_weight_sale/models/sale_order_line.py b/app_product_weight_sale/models/sale_order_line.py new file mode 100644 index 00000000..31e3ba86 --- /dev/null +++ b/app_product_weight_sale/models/sale_order_line.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + + +from odoo import api, fields, models, _ + + +# Record the net weight of the order line +class SaleOrderLine(models.Model): + _inherit = 'sale.order.line' + + weight = fields.Float(string='Weight(kg)', compute='_compute_weight', + inverse='_set_weight', store=True) + + @api.multi + @api.depends('product_id', 'product_uom_qty') + def _compute_weight(self): + for line in self: + weight = 0 + if line.product_id and line.product_id.weight: + weight += (line.product_id.weight * line.product_uom_qty / line.product_uom.factor) + line.weight = weight + + @api.one + def _set_weight(self): + pass diff --git a/app_product_weight_sale/static/description/banner.jpg b/app_product_weight_sale/static/description/banner.jpg new file mode 100644 index 00000000..c064ed42 Binary files /dev/null and b/app_product_weight_sale/static/description/banner.jpg differ diff --git a/app_product_weight_sale/static/description/icon.png b/app_product_weight_sale/static/description/icon.png new file mode 100644 index 00000000..4c57f611 Binary files /dev/null and b/app_product_weight_sale/static/description/icon.png differ diff --git a/app_product_weight_sale/static/description/index.html b/app_product_weight_sale/static/description/index.html new file mode 100644 index 00000000..8a244b65 --- /dev/null +++ b/app_product_weight_sale/static/description/index.html @@ -0,0 +1,68 @@ +
+
+
+

Sales Order Weight

+
+

+This module from BroadTech IT Solutions manages to calculate total weight of a sale order, which is the sum of individual weights of each unit of the products in the order. +

+

+The product form has a field 'Weight', which stores the weight of the product in Kg. +

+
+ +
+ + +

+ The module adds a field 'Net Weight' in sale order line, which calculates the Order line weight based on Order line Quantity and Unit of Measure. The new field 'Total Weight' in Sale Order would be the sum of sale order line weights. +

+ +
+ +
+ +

+The calculation uses the following formula: +

+

+Sale_order_line_net_weight = (line_product_weight * line_product_uom_qty / line_product_uom_factor) +
+Total_weight = sum(Sale_order_line_net_weight) +

+ +
+
+ +
+
+
+

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 +
+
+
+
+ diff --git a/app_product_weight_sale/static/description/product_weight.jpg b/app_product_weight_sale/static/description/product_weight.jpg new file mode 100644 index 00000000..92a4573c Binary files /dev/null and b/app_product_weight_sale/static/description/product_weight.jpg differ diff --git a/app_product_weight_sale/views/sale_order_views.xml b/app_product_weight_sale/views/sale_order_views.xml new file mode 100644 index 00000000..90bfb434 --- /dev/null +++ b/app_product_weight_sale/views/sale_order_views.xml @@ -0,0 +1,52 @@ + + + + + + + sale.weight.view.tree + sale.order + + + + + + + + + + sale.quotation.weight.view.tree + sale.order + + + + + + + + + + + + sale.weight.view.line.form + sale.order + + + +
+
+ +
+ + + + + + +
+
+ +
+
diff --git a/app_stock_putaway/__init__.py b/app_stock_putaway/__init__.py new file mode 100644 index 00000000..fa9f002c --- /dev/null +++ b/app_stock_putaway/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- + +from . import models +from . import ir +from . import res \ No newline at end of file diff --git a/app_stock_putaway/__manifest__.py b/app_stock_putaway/__manifest__.py new file mode 100644 index 00000000..0816776e --- /dev/null +++ b/app_stock_putaway/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +# Created on 2018-11-05 +# author: 广州尚鹏,http://www.sunpop.cn +# email: 300883@qq.com +# resource of Sunpop +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +# Odoo在线中文用户手册(长期更新) +# 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/ +# description: + + +{ + 'name': "App stock putaway show. 单独的上架策略界面及菜单", + 'version': '12.0.11.14', + 'author': 'Sunpop.cn', + 'category': 'Base', + 'website': 'http://www.sunpop.cn', + 'license': 'LGPL-3', + 'sequence': 2, + 'summary': """ + Show stock putaway strategy in stock menu. + """, + 'description': """ + 上架策略菜单。 + 广州尚鹏,Sunpop.cn 的odoo模块。 + """, + 'depends': ['stock'], + 'images': [], + + 'data': [ + 'views/product_putaway_views.xml', + 'views/stock_procrules_views.xml', + ], + 'demo': [ + ], + 'test': [ + ], + 'css': [ + ], + 'qweb': [ + ], + 'js': [ + ], + 'installable': True, + 'application': True, + 'auto_install': True, +} diff --git a/app_stock_putaway/i18n/zh_CN.po b/app_stock_putaway/i18n/zh_CN.po new file mode 100644 index 00000000..9f736e7e --- /dev/null +++ b/app_stock_putaway/i18n/zh_CN.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * app_stock_putaway +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0+e-20180915\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-11-04 20:04+0000\n" +"PO-Revision-Date: 2018-11-04 20:04+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_stock_putaway +#: model:ir.actions.act_window,help:app_stock_putaway.action_product_putaway +msgid "Click to define a new picking type group." +msgstr "点击创建一条新的记录." + +#. module: app_stock_putaway +#: model:ir.ui.view,arch_db:app_stock_putaway.app_view_strock_putaway_tree +msgid "Stock Put Away Strategy" +msgstr "上架策略" + +#. module: app_stock_putaway +#: model:ir.actions.act_window,name:app_stock_putaway.action_product_putaway +#: model:ir.ui.menu,name:app_stock_putaway.menu_putaway +msgid "Stock Putaway Strategy" +msgstr "上架策略" + diff --git a/app_stock_putaway/ir/__init__.py b/app_stock_putaway/ir/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/app_stock_putaway/ir/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/app_stock_putaway/models/__init__.py b/app_stock_putaway/models/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/app_stock_putaway/models/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/app_stock_putaway/report/__init__.py b/app_stock_putaway/report/__init__.py new file mode 100644 index 00000000..633f8661 --- /dev/null +++ b/app_stock_putaway/report/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- + diff --git a/app_stock_putaway/res/__init__.py b/app_stock_putaway/res/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/app_stock_putaway/res/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/app_stock_putaway/static/description/icon.png b/app_stock_putaway/static/description/icon.png new file mode 100644 index 00000000..2a04f219 Binary files /dev/null and b/app_stock_putaway/static/description/icon.png differ diff --git a/app_stock_putaway/static/description/index.html b/app_stock_putaway/static/description/index.html new file mode 100644 index 00000000..8d53dcc0 --- /dev/null +++ b/app_stock_putaway/static/description/index.html @@ -0,0 +1,71 @@ +
+
+
+

App stock picking type group

+
+

This moduld allows user to .

+

More Powerful addons: + Supop.cn Odoo Addons +

+
+

Lastest update: v10.0.3.27, 2018-03-27

+
    +
  • 1. Manager picking type groups
  • +
  • 2. Group by picking type groups in stock dashboard
  • +
+
+ +
+

Base setup:

+
    +
  • 1. Go to Inventory->Configuration->Warehouse Management
  • +
  • 2. Set Picking Type Group for the certain type
  • +
+ +
+
+ +
+

After setup, the view would look like:

+ +
+
+
+ +
+
+
+
+ +
+
+
+

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 +
+
+
+
+ diff --git a/app_stock_putaway/static/stock_procrules_views.xml b/app_stock_putaway/static/stock_procrules_views.xml new file mode 100644 index 00000000..ddd350d2 --- /dev/null +++ b/app_stock_putaway/static/stock_procrules_views.xml @@ -0,0 +1,27 @@ + + + + + + Global Procurement Rules + stock.location.route + ir.actions.act_window + form + tree,form + +

+ Click to add a route. +

+

You can define here the main routes that run through + your warehouses and that define the flows of your products. These + routes can be assigned to a product, a product category or be fixed + on procurement or sales order.

+
+
+ + + +
+
\ No newline at end of file diff --git a/app_stock_putaway/views/product_putaway_views.xml b/app_stock_putaway/views/product_putaway_views.xml new file mode 100644 index 00000000..9e6aede3 --- /dev/null +++ b/app_stock_putaway/views/product_putaway_views.xml @@ -0,0 +1,28 @@ + + + + Stock Putaway Strategy + product.putaway + + + + + + + + + + Stock Putaway Strategy + product.putaway + ir.actions.act_window + form + list,form + +

+ Click to define a new picking type group. +

+
+
+ + +
diff --git a/app_stock_putaway/views/stock_procrules_views.xml b/app_stock_putaway/views/stock_procrules_views.xml new file mode 100644 index 00000000..33ffb4b7 --- /dev/null +++ b/app_stock_putaway/views/stock_procrules_views.xml @@ -0,0 +1,26 @@ + + + + + + Global Procurement Rules + procurement.rule + ir.actions.act_window + form + tree,form + +

+ Click to add a route. +

+

You can define here the main routes that run through + your warehouses and that define the flows of your products. These + routes can be assigned to a product, a product category or be fixed + on procurement or sales order.

+
+
+ + + + +
+
\ No newline at end of file