first commit

This commit is contained in:
root
2026-03-14 09:42:12 +00:00
commit 0adbd20c2c
10991 changed files with 1646955 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,115 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from decimal import Decimal
from trytond.model import ModelSQL, ModelView, fields
from trytond.modules.currency.fields import Monetary
from trytond.pool import PoolMeta
from trytond.pyson import Bool, Eval, Id
from trytond.transaction import Transaction
class Carrier(metaclass=PoolMeta):
__name__ = 'carrier'
weight_uom = fields.Many2One(
'product.uom', "Weight UoM",
domain=[('category', '=', Id('product', 'uom_cat_weight'))],
states={
'invisible': Eval('carrier_cost_method') != 'weight',
'required': Eval('carrier_cost_method') == 'weight',
'readonly': Bool(Eval('weight_price_list', [])),
},
help="The Unit of Measure of weight criteria for the price list.")
weight_currency = fields.Many2One('currency.currency', 'Currency',
states={
'invisible': Eval('carrier_cost_method') != 'weight',
'required': Eval('carrier_cost_method') == 'weight',
'readonly': Bool(Eval('weight_price_list', [])),
},
help="The currency of the price.")
weight_price_list = fields.One2Many('carrier.weight_price_list', 'carrier',
'Price List',
states={
'invisible': Eval('carrier_cost_method') != 'weight',
'readonly': ~(Eval('weight_uom', 0) & Eval('weight_currency', 0)),
},
help="Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price.")
@classmethod
def __setup__(cls):
super().__setup__()
selection = ('weight', 'Weight')
if selection not in cls.carrier_cost_method.selection:
cls.carrier_cost_method.selection.append(selection)
def compute_weight_price(self, weight):
"Compute price based on weight"
line = None
for line in reversed(self.weight_price_list):
if line.weight < weight:
return line.price
else:
if line and not line.weight and not weight:
return line.price
return Decimal(0)
def _get_weight_price(self):
weights = Transaction().context.get('weights', [])
if weights:
weight_price = sum(
self.compute_weight_price(w) for w in weights)
else:
weight_price = self.compute_weight_price(0)
return weight_price, self.weight_currency.id
def get_sale_price(self):
price, currency_id = super().get_sale_price()
if self.carrier_cost_method == 'weight':
price, currency_id = self._get_weight_price()
return price, currency_id
def get_purchase_price(self):
price, currency_id = super().get_purchase_price()
if self.carrier_cost_method == 'weight':
price, currency_id = self._get_weight_price()
return price, currency_id
class WeightPriceList(ModelSQL, ModelView):
__name__ = 'carrier.weight_price_list'
carrier = fields.Many2One(
'carrier', "Carrier", required=True,
help="The carrier that the price list belongs to.")
weight = fields.Float(
"Weight", digits='weight_uom',
domain=[
('weight', '>=', 0),
],
depends={'carrier'},
help="The lower limit for the price.")
price = Monetary(
"Price", currency='currency', digits='currency',
help="The price of the carrier service.")
currency = fields.Function(fields.Many2One(
'currency.currency', "Currency"),
'on_change_with_currency')
weight_uom = fields.Function(fields.Many2One(
'product.uom', "Weight UoM",
help="The Unit of Measure of the weight."),
'on_change_with_weight_uom')
@classmethod
def __setup__(cls):
super().__setup__()
cls._order.insert(0, ('weight', 'ASC'))
@fields.depends('carrier', '_parent_carrier.weight_currency')
def on_change_with_currency(self, name=None):
return self.carrier.weight_currency if self.carrier else None
@fields.depends('carrier', '_parent_carrier.weight_uom')
def on_change_with_weight_uom(self, name=None):
return self.carrier.weight_uom if self.carrier else None

View File

@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="carrier_view_form">
<field name="model">carrier</field>
<field name="type" eval="None"/>
<field name="inherit" ref="carrier.carrier_view_form"/>
<field name="name">carrier_form</field>
</record>
<record model="ir.ui.view" id="weight_price_list_view_form">
<field name="model">carrier.weight_price_list</field>
<field name="type">form</field>
<field name="name">weight_price_list_form</field>
</record>
<record model="ir.ui.view" id="weight_price_list_view_tree">
<field name="model">carrier.weight_price_list</field>
<field name="type">tree</field>
<field name="name">weight_price_list_tree</field>
</record>
</data>
</tryton>

View File

@@ -0,0 +1,27 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
def parcel_weight(parcel, carrier_uom, uom_field='unit'):
pool = Pool()
Uom = pool.get('product.uom')
weight = 0
for line in parcel:
product = getattr(line, 'product', None)
quantity = getattr(line, 'quantity', None)
uom = getattr(line, uom_field, None)
if not all([product, quantity, uom]):
continue
if product.weight is not None:
internal_quantity = Uom.compute_qty(
uom, quantity, product.default_uom, round=False)
weight += Uom.compute_qty(
product.weight_uom, internal_quantity * product.weight,
carrier_uom, round=False)
elif uom.category == carrier_uom.category:
weight += Uom.compute_qty(uom, quantity, carrier_uom, round=False)
return weight

View File

@@ -0,0 +1,78 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Валута"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Ценова листа"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Мер. ед. за тегло"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Превозвач"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Валута"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Цена"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Тегло"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Мер. ед. за тегло"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Ценови лист на карго тегло"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Тегло"

View File

@@ -0,0 +1,77 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Moneda"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Tarifa"
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "UdM del pes"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Transportista"
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Moneda"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Preu"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Pes"
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "UdM del pes"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "La moneda del preu."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
"Afegeix el preu per pes al servei del transportista.\n"
"S'utilitza la primera línia que el pes es superior. \n"
"Una línia amb pes 0 s'utilitzarà com a preu per defecte."
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr "La unitat de mesura del pes utilitzada per la tarifa."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr "El transportista al que pertany la tarifa."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "El preu del servei del transportista."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "El límit inferior al que aplica el preu."
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "La unitat de mesura del pes."
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Tarifa pes transportista"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Pes"

View File

@@ -0,0 +1,74 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr ""
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr ""

View File

@@ -0,0 +1,79 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Währung"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Preiskonditionsschema"
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Gewichtsmaßeinheit"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Versanddienstleister"
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Währung"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Preis"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Gewicht"
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Gewichtsmaßeinheit"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "Die Währung des Preises."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
"Fügt den Preis pro Gewicht zur Versanddienstleistung hinzu.\n"
"Die erste Zeile, bei der das Gewicht größer ist, wird verwendet.\n"
"Die Zeile mit einem Gewicht von 0 wird als Standardpreis verwendet."
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
"Die Gewichtseinheit des Gewichtskriteriums für das Preiskonditionsschema."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
"Der Versanddienstleister dem dieses Preiskonditionsschema zugeordnet ist."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "Der Preis der Versanddienstleistung."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "Die Untergrenze für den Preis."
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "Die Maßeinheit für das Gewicht."
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Versanddienstleister Gewicht Preiskonditionsschema"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Gewicht"

View File

@@ -0,0 +1,77 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Moneda"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Tarifa"
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "UdM del peso"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Transportista"
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Moneda"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Precio"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Peso"
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "UdM del peso"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "La moneda del precio."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
"Añade un precio por peso al servicio del transportista.\n"
"Se utiliza la primera lína que el peso es superior.\n"
"Una línea con peso 0 se utilizara como precio por defecto."
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr "La unidad medida del peso utilizada por la tarifa."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr "El transportista al que pertenece la tarifa."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "El precio del servicio del transportista."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "El límite inferior al que aplica el precio."
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "La unidad medida del peso."
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Tarifa peso transportista"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Peso"

View File

@@ -0,0 +1,75 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Lista de precios"
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Lista de precio por peso de transportista"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr ""

View File

@@ -0,0 +1,78 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Valuuta"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Hinnakiri"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Kaalu mõõtühik"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Vedaja"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Valuuta"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Hind"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Kaal"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Kaalu mõõtühik"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "Hinna valuuta."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "Vedaja teenuse hind."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "Hinnale kehtim madalaim piirang"
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Vedaja kaalu hinnakiri"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Kaal"

View File

@@ -0,0 +1,81 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "واحد پول"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "لیست قیمت"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "واحد اندازی گیری وزن"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "حمل کننده"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "واحد پول"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "قیمت"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "وزن"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "واحد اندازی گیری وزن"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "واحد ارز قیمت."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
#, fuzzy
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr "شاخص واحد اندازه گیری وزن لیست قیمت."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr "حمل کننده ای که لیست قیمت متعلق به آن است."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "قیمت خدمات حمل ونقل."
#, fuzzy
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "حد بالا برای قیمت."
#, fuzzy
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "شاخص واحد اندازه گیری وزن لیست قیمت."
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "لیست قیمت وزن حمل کننده"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "وزن"

View File

@@ -0,0 +1,74 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr ""
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr ""

View File

@@ -0,0 +1,77 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Devise"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Liste de prix"
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "UDM de poids"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Transporteur"
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Devise"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Prix"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Poids"
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "UDM de poids"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "La devise du prix."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
"Ajoutez le prix au poids au service de transport.\n"
"La première ligne pour laquelle le poids est plus élevé est utilisée.\n"
"La ligne avec un poids de 0 est utilisée comme prix par défaut."
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr "L'unit de mesure de poids des critères pour la liste de prix."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr "Le transporteur à qui la liste de prix appartient."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "Le prix du service du transporteur."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "La limite inférieure pour le prix."
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "L'unité de mesure de poids."
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Liste de prix par poids de transporteur"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Poids"

View File

@@ -0,0 +1,81 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Pénznem"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Fuvarozási árlista"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Súly mértékegysége"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Fuvarozó"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Pénznem"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Ár"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Súly"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Súly mértékegysége"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "Az árlista ebben a pénznemben van megadva."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
#, fuzzy
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
"A fuvarozási árlistában a súlyok ebben a mértékegységben vannak megadva."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "A fuvarozás díja."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "Az ár ettől a súlytól érvényes."
#, fuzzy
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
"A fuvarozási árlistában a súlyok ebben a mértékegységben vannak megadva."
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "súly"

View File

@@ -0,0 +1,75 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Mata uang"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr ""
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Mata uang"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Harga"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr ""

View File

@@ -0,0 +1,79 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Valuta"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "listino"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "udm peso"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Vettore"
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Valuta"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Prezzo"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Peso"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "udm peso"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "La valuta del prezzo."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
#, fuzzy
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr "L'unità di peso utilizzata nel listino prezzi."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr "Il corriere a cui appartiene il listino prezzi."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "Il prezzo del servizio di trasporto."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "Il limite inferiore per il prezzo."
#, fuzzy
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "L'unità di peso utilizzata nel listino prezzi."
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "listino vettore per peso"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Peso"

View File

@@ -0,0 +1,78 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "ສະກຸນເງິນ"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "ລາຍການລາຄາ"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "ຫົວໜ່ວຍນໍ້າໜັກ"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "ຜູ້ໃຫ້ບໍລິການ"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "ສະກຸນເງິນ"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "ລາຄາ"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "ນໍ້າໜັກ"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "ຫົວໜ່ວຍນໍ້າໜັກ"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "ລາຍການລາຄາຂອງຜູ້ໃຫ້ບໍລິການນໍ້າໜັກ"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "ນໍ້າໜັກ"

View File

@@ -0,0 +1,78 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Valiuta"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Kainoraštis"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Svorio mato vienetas"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Vežėjas"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Valiuta"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Kaina"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Svoris"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Svorio mato vienetas"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "Kainos valiuta."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Vežėjo kainoraštis pagal svorį"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Svoris"

View File

@@ -0,0 +1,77 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Valuta"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Prijslijst"
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Maateenheid gewicht"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Transporteur"
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Valuta"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Prijs"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Gewicht"
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Maateenheid gewicht"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "De valuta van de prijs."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
"Voeg prijs per gewicht toe aan de koerier service.\n"
"De eerste regel waarvan het gewicht groter is wordt gebruikt.\n"
"De regel met gewicht 0 wordt gebruikt als standaard prijs."
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr "De maateenheid van gewichtscriteria voor de prijslijst."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr "De prijslijst van de transporteur."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "De prijs van de transport service."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "De ondergrens voor de prijs."
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "De maateenheid van het gewicht."
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Prijslijst vervoerder gewicht"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Gewicht"

View File

@@ -0,0 +1,77 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Waluta"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Cennik"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Waga"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Waluta"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Cena"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Waga"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Waga"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Waga"

View File

@@ -0,0 +1,78 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Moeda"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Lista de preços"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "UDM do peso"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Transportadora"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Moeda"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Preço"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Peso"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "UDM do peso"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Lista de preço por peso da transportadora"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Peso"

View File

@@ -0,0 +1,77 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Valută"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Listă de prețuri"
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "UM Greutate"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Curier"
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Monedă"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Preț"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Greutate"
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "UM Greutate"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr "Moneda prețului."
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
"Adăugați prețul pe greutate la serviciul de transport.\n"
"Se folosește primul rând pentru care greutatea este mai mare.\n"
"Rândul cu greutatea 0 este utilizată ca preț implicit."
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr "Unitatea de măsură a criteriilor de greutate pentru lista de prețuri."
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr "Transportatorul căruia îi aparține lista de prețuri."
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr "Prețul serviciului de transport."
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr "Limita inferioară a prețului."
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr "Unitatea de măsură a greutății."
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Lista de prețuri Greutate transport"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Greutate"

View File

@@ -0,0 +1,80 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
#, fuzzy
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Валюты"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr ""
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "Ширина"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Валюты"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr ""
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Ширина"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "Ширина"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
#, fuzzy
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Ширина"

View File

@@ -0,0 +1,78 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr "Valuta"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr "Cenik"
#, fuzzy
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr "ME za težo"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr "Špediter"
#, fuzzy
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr "Valuta"
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr "Cena"
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr "Teža"
#, fuzzy
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr "ME za težo"
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
#, fuzzy
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr "Ceniki po teži"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr "Teža"

View File

@@ -0,0 +1,74 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr ""
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr ""

View File

@@ -0,0 +1,74 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr ""
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr ""

View File

@@ -0,0 +1,74 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:carrier,weight_currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
msgstr ""
msgctxt "field:carrier,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
msgstr ""
msgctxt "field:carrier.weight_price_list,currency:"
msgid "Currency"
msgstr ""
msgctxt "field:carrier.weight_price_list,price:"
msgid "Price"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight:"
msgid "Weight"
msgstr ""
msgctxt "field:carrier.weight_price_list,weight_uom:"
msgid "Weight UoM"
msgstr ""
msgctxt "help:carrier,weight_currency:"
msgid "The currency of the price."
msgstr ""
msgctxt "help:carrier,weight_price_list:"
msgid ""
"Add price per weight to the carrier service.\n"
"The first line for which the weight is greater is used.\n"
"The line with weight of 0 is used as default price."
msgstr ""
msgctxt "help:carrier,weight_uom:"
msgid "The Unit of Measure of weight criteria for the price list."
msgstr ""
msgctxt "help:carrier.weight_price_list,carrier:"
msgid "The carrier that the price list belongs to."
msgstr ""
msgctxt "help:carrier.weight_price_list,price:"
msgid "The price of the carrier service."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight:"
msgid "The lower limit for the price."
msgstr ""
msgctxt "help:carrier.weight_price_list,weight_uom:"
msgid "The Unit of Measure of the weight."
msgstr ""
msgctxt "model:carrier.weight_price_list,string:"
msgid "Carrier Weight Price List"
msgstr ""
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
msgstr ""

View File

@@ -0,0 +1,40 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from functools import partial
from itertools import groupby
from trytond.pool import PoolMeta
from trytond.tools import sortable_values
from .common import parcel_weight
class Sale(metaclass=PoolMeta):
__name__ = 'sale.sale'
def _group_parcel_key(self, lines, line):
"""
The key to group lines by parcel
"""
return ()
def _parcel_weight(self, parcel):
if self.carrier:
return parcel_weight(parcel, self.carrier.weight_uom, 'unit')
def _get_carrier_context(self, carrier):
context = super()._get_carrier_context(carrier)
if not carrier or carrier.carrier_cost_method != 'weight':
return context
context = context.copy()
weights = []
context['weights'] = weights
lines = [l for l in self.lines or [] if l.quantity and l.quantity > 0]
keyfunc = partial(self._group_parcel_key, lines)
lines = sorted(lines, key=sortable_values(keyfunc))
for key, parcel in groupby(lines, key=keyfunc):
weights.append(self._parcel_weight(parcel))
return context

View File

@@ -0,0 +1,84 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from functools import partial
from itertools import groupby
from trytond.model import fields
from trytond.pool import PoolMeta
from trytond.tools import sortable_values
from .common import parcel_weight
class ShipmentIn(metaclass=PoolMeta):
__name__ = 'stock.shipment.in'
def _group_parcel_key(self, lines, line):
"""
The key to group lines by parcel
"""
return ()
@fields.depends('carrier')
def _parcel_weight(self, parcel):
if self.carrier:
return parcel_weight(parcel, self.carrier.weight_uom)
@fields.depends('carrier', 'incoming_moves',
methods=['_group_parcel_key', '_parcel_weight'])
def _get_carrier_context(self):
context = super()._get_carrier_context()
if not self.carrier:
return context
if self.carrier.carrier_cost_method != 'weight':
return context
weights = []
context['weights'] = weights
lines = self.incoming_moves or []
keyfunc = partial(self._group_parcel_key, lines)
lines = sorted(lines, key=sortable_values(keyfunc))
for key, parcel in groupby(lines, key=keyfunc):
weights.append(self._parcel_weight(parcel))
return context
class ShipmentOut(metaclass=PoolMeta):
__name__ = 'stock.shipment.out'
def _group_parcel_key(self, lines, line):
"""
The key to group lines by parcel
"""
return ()
@fields.depends('carrier')
def _parcel_weight(self, parcel):
if self.carrier:
return parcel_weight(parcel, self.carrier.weight_uom)
@fields.depends(
'state', 'carrier', 'inventory_moves', 'outgoing_moves',
'warehouse_storage', 'warehouse_output',
methods=['_group_parcel_key', '_parcel_weight'])
def _get_carrier_context(self):
context = super()._get_carrier_context()
if not self.carrier:
return context
if self.carrier.carrier_cost_method != 'weight':
return context
weights = []
context['weights'] = weights
if (self.state in {'draft', 'waiting', 'assigned'}
and self.warehouse_storage != self.warehouse_output):
lines = self.inventory_moves or []
else:
lines = self.outgoing_moves or []
keyfunc = partial(self._group_parcel_key, lines)
lines = sorted(lines, key=sortable_values(keyfunc))
for key, parcel in groupby(lines, key=keyfunc):
weights.append(self._parcel_weight(parcel))
return context

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,252 @@
=======================
Carrier Weight Scenario
=======================
Imports::
>>> from decimal import Decimal
>>> from proteus import Model
>>> from trytond.modules.account.tests.tools import (
... create_chart, create_fiscalyear, get_accounts)
>>> from trytond.modules.account_invoice.tests.tools import (
... create_payment_term, set_fiscalyear_invoice_sequences)
>>> from trytond.modules.company.tests.tools import create_company, get_company
>>> from trytond.tests.tools import activate_modules, assertEqual
Activate modules::
>>> config = activate_modules([
... 'carrier_weight',
... 'purchase_shipment_cost',
... 'sale_shipment_cost',
... ],
... create_company, create_chart)
Get company::
>>> company = get_company()
Create fiscal year::
>>> fiscalyear = set_fiscalyear_invoice_sequences(
... create_fiscalyear())
>>> fiscalyear.click('create_period')
Get accounts::
>>> accounts = get_accounts()
>>> revenue = accounts['revenue']
Create supplier::
>>> Party = Model.get('party.party')
>>> supplier = Party(name='Supplier')
>>> supplier.save()
Create customer::
>>> Party = Model.get('party.party')
>>> customer = Party(name='Customer')
>>> customer.save()
Create account category::
>>> ProductCategory = Model.get('product.category')
>>> account_category = ProductCategory(name="Account Category")
>>> account_category.accounting = True
>>> account_category.account_revenue = revenue
>>> account_category.save()
Create product::
>>> ProductUom = Model.get('product.uom')
>>> ProductTemplate = Model.get('product.template')
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
>>> gram, = ProductUom.find([('name', '=', 'Gram')])
>>> template = ProductTemplate()
>>> template.name = 'Product'
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.salable = True
>>> template.list_price = Decimal('20')
>>> template.account_category = account_category
>>> template.weight = 250
>>> template.weight_uom = gram
>>> template.save()
>>> product, = template.products
>>> product.cost_price = Decimal('8')
>>> product.save()
>>> carrier_template = ProductTemplate()
>>> carrier_template.name = 'Carrier Product'
>>> carrier_template.default_uom = unit
>>> carrier_template.type = 'service'
>>> carrier_template.salable = True
>>> carrier_template.list_price = Decimal('3')
>>> carrier_template.account_category = account_category
>>> carrier_template.save()
>>> carrier_product, = carrier_template.products
>>> carrier_product.cost_price = Decimal('3')
>>> carrier_product.save()
Create carrier::
>>> Carrier = Model.get('carrier')
>>> kilogram, = ProductUom.find([('name', '=', 'Kilogram')])
>>> carrier = Carrier()
>>> party = Party(name='Carrier')
>>> party.save()
>>> carrier.party = party
>>> carrier.carrier_product = carrier_product
>>> carrier.carrier_cost_method = 'weight'
>>> carrier.weight_currency = company.currency
>>> carrier.weight_uom = kilogram
>>> for weight, price in (
... (0.5, Decimal(25)),
... (1, Decimal(40)),
... (5, Decimal(180)),
... ):
... line = carrier.weight_price_list.new(weight=weight, price=price)
>>> carrier.save()
Receive a single product line::
>>> ShipmentIn = Model.get('stock.shipment.in')
>>> Location = Model.get('stock.location')
>>> supplier_location, = Location.find([
... ('code', '=', 'SUP'),
... ])
>>> shipment = ShipmentIn()
>>> shipment.supplier = supplier
>>> move = shipment.incoming_moves.new()
>>> move.from_location = supplier_location
>>> move.to_location = shipment.warehouse.input_location
>>> move.product = product
>>> move.quantity = 4
>>> move.unit_price = Decimal('8')
>>> move.currency = company.currency
>>> shipment.carrier = carrier
>>> shipment.cost_used
Decimal('25.0000')
>>> assertEqual(shipment.cost_currency_used, company.currency)
>>> shipment.click('receive')
>>> shipment.state
'received'
>>> move, = shipment.incoming_moves
>>> move.unit_price
Decimal('14.2500')
Create payment term::
>>> payment_term = create_payment_term()
>>> payment_term.save()
Sale products with cost on shipment::
>>> Sale = Model.get('sale.sale')
>>> sale = Sale()
>>> sale.party = customer
>>> sale.carrier = carrier
>>> sale.payment_term = payment_term
>>> sale.invoice_method = 'shipment'
>>> sale.shipment_cost_method = 'shipment'
>>> sale_line = sale.lines.new()
>>> sale_line.product = product
>>> sale_line.quantity = 3.0
>>> sale_line = sale.lines.new()
>>> sale_line.product = product
>>> sale_line.quantity = 2.0
>>> sale_line = sale.lines.new()
>>> sale_line.type = 'comment'
>>> sale_line.description = 'Comment'
>>> sale.click('quote')
>>> cost_line = sale.lines[-1]
>>> assertEqual(cost_line.product, carrier_product)
>>> cost_line.quantity
1.0
>>> cost_line.amount
Decimal('40.00')
>>> sale.click('confirm')
>>> sale.click('process')
>>> sale.state
'processing'
>>> sale.untaxed_amount
Decimal('140.00')
Send products::
>>> ShipmentOut = Model.get('stock.shipment.out')
>>> shipment, = sale.shipments
>>> assertEqual(shipment.carrier, carrier)
>>> shipment.cost_used
Decimal('40.0000')
>>> shipment.cost_sale_used
Decimal('40.0000')
>>> assertEqual(shipment.cost_sale_currency_used, company.currency)
>>> move = shipment.inventory_moves[0]
>>> move.quantity -= 1
>>> shipment.cost_used
Decimal('25.0000')
>>> shipment.cost_sale_used
Decimal('25.0000')
>>> assertEqual(shipment.cost_sale_currency_used, company.currency)
>>> shipment.state
'waiting'
>>> shipment.click('assign_force')
>>> shipment.state
'assigned'
>>> shipment.click('pick')
>>> shipment.state
'picked'
>>> shipment.click('pack')
>>> shipment.state
'packed'
>>> shipment.click('do')
>>> shipment.state
'done'
Check customer invoice::
>>> sale.reload()
>>> invoice, = sale.invoices
>>> invoice.untaxed_amount
Decimal('105.00')
Sale products with cost on order::
>>> sale = Sale()
>>> sale.party = customer
>>> sale.carrier = carrier
>>> sale.payment_term = payment_term
>>> sale.invoice_method = 'order'
>>> sale.shipment_cost_method = 'order'
>>> sale_line = sale.lines.new()
>>> sale_line.product = product
>>> sale_line.quantity = 3.0
>>> sale.click('quote')
>>> cost_line = sale.lines[-1]
>>> assertEqual(cost_line.product, carrier_product)
>>> cost_line.quantity
1.0
>>> cost_line.amount
Decimal('25.00')
>>> sale.click('confirm')
>>> sale.click('process')
>>> sale.state
'processing'
>>> sale.untaxed_amount
Decimal('85.00')
Check customer shipment::
>>> shipment, = sale.shipments
>>> assertEqual(shipment.carrier, carrier)
Check customer invoice::
>>> sale.reload()
>>> invoice, = sale.invoices
>>> invoice.untaxed_amount
Decimal('85.00')

View File

@@ -0,0 +1,104 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from decimal import Decimal
from trytond.modules.company.tests import CompanyTestMixin
from trytond.modules.currency.tests import create_currency
from trytond.pool import Pool
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.transaction import Transaction
class CarrierWeightTestCase(CompanyTestMixin, ModuleTestCase):
'Test CarrierWeight module'
module = 'carrier_weight'
extras = [
'purchase_shipment_cost', 'sale_shipment_cost', 'stock_shipment_cost']
def create_carrier(self):
pool = Pool()
Party = pool.get('party.party')
Uom = pool.get('product.uom')
Template = pool.get('product.template')
Product = pool.get('product.product')
Carrier = pool.get('carrier')
WeightPriceList = pool.get('carrier.weight_price_list')
party, = Party.create([{
'name': 'Carrier',
}])
uom, = Uom.search([
('name', '=', 'Unit'),
])
template, = Template.create([{
'name': 'Carrier',
'default_uom': uom.id,
'type': 'service',
}])
product, = Product.create([{
'template': template.id,
}])
weight_uom, = Uom.search([
('name', '=', 'Kilogram'),
])
currency = create_currency('cu1')
carrier, = Carrier.create([{
'party': party.id,
'carrier_product': product.id,
'carrier_cost_method': 'weight',
'weight_uom': weight_uom.id,
'weight_currency': currency.id,
}])
for i, weight in enumerate(range(0, 100, 20), 1):
WeightPriceList.create([{
'carrier': carrier.id,
'weight': weight,
'price': Decimal(i),
}])
return carrier
@with_transaction()
def test_compute_weight_price(self):
'Test compute_weight_price'
carrier = self.create_carrier()
for weight, price in [
(-1, Decimal(0)),
(0, Decimal(1)),
(1, Decimal(1)),
(10, Decimal(1)),
(20, Decimal(1)),
(21, Decimal(2)),
(80, Decimal(4)),
(81, Decimal(5)),
(100, Decimal(5)),
]:
with self.subTest(weight=weight):
self.assertEqual(carrier.compute_weight_price(weight), price)
@with_transaction()
def test_get_weight_price(self):
"Test get_weight_price"
transaction = Transaction()
carrier = self.create_carrier()
for weights, price in [
([], Decimal(1)),
([0], Decimal(1)),
([0, 0], Decimal(2)),
([21], Decimal(2)),
([10, 21], Decimal(3)),
([0, 21], Decimal(3)),
]:
with self.subTest(weights=weights):
with transaction.set_context(weights=weights):
self.assertEqual(
carrier.get_sale_price(),
(price, carrier.weight_currency.id))
self.assertEqual(
carrier.get_purchase_price(),
(price, carrier.weight_currency.id))
del ModuleTestCase

View File

@@ -0,0 +1,8 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.tests.test_tryton import load_doc_tests
def load_tests(*args, **kwargs):
return load_doc_tests(__name__, __file__, *args, **kwargs)

View File

@@ -0,0 +1,30 @@
[tryton]
version=7.8.0
depends:
carrier
company
currency
ir
product
product_measurements
res
extras_depend:
purchase_shipment_cost
sale_shipment_cost
stock_shipment_cost
xml:
carrier.xml
[register]
model:
carrier.Carrier
carrier.WeightPriceList
[register purchase_shipment_cost]
model:
stock.ShipmentIn
[register sale_shipment_cost]
model:
stock.ShipmentOut
sale.Sale

View File

@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/field[@name='carrier_cost_method']" position="after">
<newline/>
<label name="weight_uom"/>
<field name="weight_uom"/>
<label name="weight_currency"/>
<field name="weight_currency"/>
<field name="weight_price_list" colspan="4"/>
</xpath>
</data>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="carrier"/>
<field name="carrier"/>
<newline/>
<label name="weight"/>
<field name="weight"/>
<label name="price"/>
<field name="price"/>
</form>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="carrier"/>
<field name="weight"/>
<field name="price"/>
</tree>