rename sale_weight
37
app_product_weight_sale/i18n/zh_CN.po
Normal file
@@ -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 "<span> kg</span>"
|
||||
msgstr "<span> 公斤</span>"
|
||||
|
||||
#. 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 "公斤"
|
||||
|
||||
@@ -4,19 +4,21 @@
|
||||
|
||||
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)
|
||||
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)
|
||||
weight += (line.product_id.weight * line.product_uom_qty / line.product_uom.factor)
|
||||
line.weight = weight
|
||||
|
||||
@api.one
|
||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
@@ -1,47 +0,0 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * app_sale_order_weight
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0+e-20180429\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-06-17 15:47+0000\n"
|
||||
"PO-Revision-Date: 2018-06-17 15:47+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_sale_order_weight
|
||||
#: model:ir.ui.view,arch_db:app_sale_order_weight.sale_weight_line_form
|
||||
msgid "<span> kg</span>"
|
||||
msgstr "<span> kg</span>"
|
||||
|
||||
#. module: app_sale_order_weight
|
||||
#: model:ir.model.fields,field_description:app_sale_order_weight.field_sale_order_line_weight_net
|
||||
msgid "Net Weight(kg)"
|
||||
msgstr "重量(kg)"
|
||||
|
||||
#. module: app_sale_order_weight
|
||||
#: model:ir.model,name:app_sale_order_weight.model_sale_order
|
||||
msgid "Quotation"
|
||||
msgstr "报价单"
|
||||
|
||||
#. module: app_sale_order_weight
|
||||
#: model:ir.model,name:app_sale_order_weight.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "销售订单行"
|
||||
|
||||
#. module: app_sale_order_weight
|
||||
#: model:ir.model.fields,field_description:app_sale_order_weight.field_sale_order_total_weight_net
|
||||
msgid "Total Weight (kg)"
|
||||
msgstr "Total Weight (kg)"
|
||||
|
||||
#. module: app_sale_order_weight
|
||||
#: model:ir.ui.view,arch_db:app_sale_order_weight.sale_weight_line_form
|
||||
msgid "Total Weight:"
|
||||
msgstr "Total Weight:"
|
||||
|
||||