[tryton-debian-vcs] tryton-modules-carrier-weight branch debian updated. debian/3.4.1-1-2-g4a7787c
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:03:29 UTC 2015
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-carrier-weight.git;a=commitdiff;h=debian/3.4.1-1-2-g4a7787c
commit 4a7787c66f9ef9e79bacaa0351d8b3ac532fb596
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Apr 23 16:59:56 2015 +0200
Merging upstream version 3.6.0.
diff --git a/CHANGELOG b/CHANGELOG
index 6eb4e40..7cc74b7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,6 @@
-Version 3.4.1 - 2015-02-28
+Version 3.6.0 - 2015-04-20
* Bug fixes (see mercurial logs for details)
-
+* Add support for PyPy
Version 3.4.0 - 2014-10-20
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 458516f..64c1b78 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_carrier_weight
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module to add cost method "on weight" on carrier
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
Description: trytond_carrier_weight
======================
@@ -64,4 +64,6 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/__init__.py b/__init__.py
index cb2fff3..1f53fbb 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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
from carrier import *
diff --git a/carrier.py b/carrier.py
index 3dc5053..bdda4c5 100644
--- a/carrier.py
+++ b/carrier.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 6df99b2..7bdff55 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -8,7 +8,7 @@ msgstr "Moneda"
msgctxt "field:carrier,weight_currency_digits:"
msgid "Weight Currency Digits"
-msgstr "Decimals moneda del pes"
+msgstr "Decimals de la moneda del pes"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
@@ -16,11 +16,11 @@ msgstr "Tarifa"
msgctxt "field:carrier,weight_uom:"
msgid "Weight Uom"
-msgstr "Pes UdM"
+msgstr "UdM del pes"
msgctxt "field:carrier,weight_uom_digits:"
msgid "Weight Uom Digits"
-msgstr "Decimals UdM pes"
+msgstr "Decimals de la UdM del pes"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 4470e94..178d057 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -8,7 +8,7 @@ msgstr "Moneda"
msgctxt "field:carrier,weight_currency_digits:"
msgid "Weight Currency Digits"
-msgstr "Dígitos moneda del peso"
+msgstr "Decimales de moneda del peso"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index db6044a..345930f 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -8,19 +8,19 @@ msgstr "Moneda"
msgctxt "field:carrier,weight_currency_digits:"
msgid "Weight Currency Digits"
-msgstr "Decimales de Moneda del Peso"
+msgstr "Decimales de moneda del peso"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
-msgstr "Lista de Precios"
+msgstr "Lista de precios"
msgctxt "field:carrier,weight_uom:"
msgid "Weight Uom"
-msgstr "UdM de Peso"
+msgstr "UdM del peso"
msgctxt "field:carrier,weight_uom_digits:"
msgid "Weight Uom Digits"
-msgstr "Decimales de UdM del Peso"
+msgstr "Decimales de UdM del peso"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
@@ -28,11 +28,11 @@ msgstr "Transporte"
msgctxt "field:carrier.weight_price_list,create_date:"
msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
msgctxt "field:carrier.weight_price_list,create_uid:"
msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
msgctxt "field:carrier.weight_price_list,id:"
msgid "ID"
@@ -52,15 +52,15 @@ msgstr "Peso"
msgctxt "field:carrier.weight_price_list,write_date:"
msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
msgctxt "field:carrier.weight_price_list,write_uid:"
msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
msgctxt "model:carrier.weight_price_list,name:"
msgid "Carrier Weight Price List"
-msgstr "Lista de Precio de Transporte por Peso"
+msgstr "Lista de precio de transporte por peso"
msgctxt "selection:carrier,carrier_cost_method:"
msgid "Weight"
@@ -68,8 +68,8 @@ msgstr "Peso"
msgctxt "view:carrier.weight_price_list:"
msgid "Carrier Weight Price List"
-msgstr "Lista de Precios de Transporte por Peso"
+msgstr "Lista de precios de transporte por peso"
msgctxt "view:carrier.weight_price_list:"
msgid "Carrier Weight Price Lists"
-msgstr "Listas de Precios de Transporte por Peso"
+msgstr "Listas de precios de transporte por peso"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 2681fb4..1f197a8 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -8,7 +8,7 @@ msgstr "Moneda"
msgctxt "field:carrier,weight_currency_digits:"
msgid "Weight Currency Digits"
-msgstr "Decimales moneda del peso"
+msgstr "Decimales de la moneda del peso"
msgctxt "field:carrier,weight_price_list:"
msgid "Price List"
@@ -16,11 +16,11 @@ msgstr "Tarifa"
msgctxt "field:carrier,weight_uom:"
msgid "Weight Uom"
-msgstr "Peso UdM"
+msgstr "UdM del peso"
msgctxt "field:carrier,weight_uom_digits:"
msgid "Weight Uom Digits"
-msgstr "Decimales UdM peso"
+msgstr "Decimales de la UdM del peso"
msgctxt "field:carrier.weight_price_list,carrier:"
msgid "Carrier"
diff --git a/sale.py b/sale.py
index ba7e9ef..15176ca 100644
--- a/sale.py
+++ b/sale.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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
diff --git a/setup.py b/setup.py
index 9c79573..15a8d10 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 setuptools import setup
import re
@@ -93,6 +93,8 @@ setup(name=name,
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: Implementation :: CPython',
+ 'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
],
license='GPL-3',
diff --git a/stock.py b/stock.py
index 22ba55b..b437a7c 100644
--- a/stock.py
+++ b/stock.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 itertools import groupby
from functools import partial
diff --git a/tests/__init__.py b/tests/__init__.py
index 9d9ea3e..ca43ef1 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 test_carrier_weight import suite
diff --git a/tests/scenario_carrier_weight.rst b/tests/scenario_carrier_weight.rst
index 9e604ad..1138823 100644
--- a/tests/scenario_carrier_weight.rst
+++ b/tests/scenario_carrier_weight.rst
@@ -2,16 +2,18 @@
Carrier Weight Scenario
=======================
-=============
-General Setup
-=============
-
Imports::
>>> import datetime
>>> from dateutil.relativedelta import relativedelta
>>> from decimal import Decimal
>>> from proteus import config, Model, Wizard
+ >>> from trytond.modules.company.tests.tools import create_company, \
+ ... get_company
+ >>> from trytond.modules.account.tests.tools import create_fiscalyear, \
+ ... create_chart, get_accounts
+ >>> from.trytond.modules.account_invoice.tests.tools import \
+ ... set_fiscalyear_invoice_sequences, create_payment_term
>>> today = datetime.date.today()
Create database::
@@ -26,34 +28,14 @@ Install carrier_weight, purchase_shipment_cost and sale_shipment_cost::
... ('name', 'in', ['carrier_weight',
... 'purchase_shipment_cost', 'sale_shipment_cost']),
... ])
- >>> Module.install([x.id for x in modules], config.context)
+ >>> for module in modules:
+ ... module.click('install')
>>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
Create company::
- >>> Currency = Model.get('currency.currency')
- >>> CurrencyRate = Model.get('currency.currency.rate')
- >>> Company = Model.get('company.company')
- >>> Party = Model.get('party.party')
- >>> company_config = Wizard('company.company.config')
- >>> company_config.execute('company')
- >>> company = company_config.form
- >>> party = Party(name='Dunder Mifflin')
- >>> party.save()
- >>> company.party = party
- >>> currencies = Currency.find([('code', '=', 'USD')])
- >>> if not currencies:
- ... currency = Currency(name='U.S. Dollar', symbol='$', code='USD',
- ... rounding=Decimal('0.01'), mon_grouping='[3, 3, 0]',
- ... mon_decimal_point='.', mon_thousands_sep=',')
- ... currency.save()
- ... CurrencyRate(date=today + relativedelta(month=1, day=1),
- ... rate=Decimal('1.0'), currency=currency).save()
- ... else:
- ... currency, = currencies
- >>> company.currency = currency
- >>> company_config.execute('add')
- >>> company, = Company.find()
+ >>> _ = create_company()
+ >>> company = get_company()
Reload the context::
@@ -62,55 +44,15 @@ Reload the context::
Create fiscal year::
- >>> FiscalYear = Model.get('account.fiscalyear')
- >>> Sequence = Model.get('ir.sequence')
- >>> SequenceStrict = Model.get('ir.sequence.strict')
- >>> fiscalyear = FiscalYear(name='%s' % today.year)
- >>> fiscalyear.start_date = today + relativedelta(month=1, day=1)
- >>> fiscalyear.end_date = today + relativedelta(month=12, day=31)
- >>> fiscalyear.company = company
- >>> post_move_sequence = Sequence(name='%s' % today.year,
- ... code='account.move',
- ... company=company)
- >>> post_move_sequence.save()
- >>> fiscalyear.post_move_sequence = post_move_sequence
- >>> invoice_sequence = SequenceStrict(name='%s' % today.year,
- ... code='account.invoice',
- ... company=company)
- >>> invoice_sequence.save()
- >>> fiscalyear.out_invoice_sequence = invoice_sequence
- >>> fiscalyear.in_invoice_sequence = invoice_sequence
- >>> fiscalyear.out_credit_note_sequence = invoice_sequence
- >>> fiscalyear.in_credit_note_sequence = invoice_sequence
- >>> fiscalyear.save()
- >>> FiscalYear.create_period([fiscalyear.id], config.context)
+ >>> fiscalyear = set_fiscalyear_invoice_sequences(
+ ... create_fiscalyear(company))
+ >>> fiscalyear.click('create_period')
Create chart of accounts::
- >>> AccountTemplate = Model.get('account.account.template')
- >>> Account = Model.get('account.account')
- >>> AccountJournal = Model.get('account.journal')
- >>> account_template, = AccountTemplate.find([('parent', '=', None)])
- >>> create_chart = Wizard('account.create_chart')
- >>> create_chart.execute('account')
- >>> create_chart.form.account_template = account_template
- >>> create_chart.form.company = company
- >>> create_chart.execute('create_account')
- >>> receivable, = Account.find([
- ... ('kind', '=', 'receivable'),
- ... ('company', '=', company.id),
- ... ])
- >>> payable, = Account.find([
- ... ('kind', '=', 'payable'),
- ... ('company', '=', company.id),
- ... ])
- >>> revenue, = Account.find([
- ... ('kind', '=', 'revenue'),
- ... ('company', '=', company.id),
- ... ])
- >>> create_chart.form.account_receivable = receivable
- >>> create_chart.form.account_payable = payable
- >>> create_chart.execute('create_properties')
+ >>> _ = create_chart(company)
+ >>> accounts = get_accounts(company)
+ >>> revenue = accounts['revenue']
Create supplier::
@@ -177,7 +119,7 @@ Create carrier::
>>> carrier.party = party
>>> carrier.carrier_product = carrier_product
>>> carrier.carrier_cost_method = 'weight'
- >>> carrier.weight_currency = currency
+ >>> carrier.weight_currency = company.currency
>>> carrier.weight_uom = kilogram
>>> for weight, price in (
... (0.5, Decimal(25)),
@@ -191,15 +133,13 @@ Create carrier::
Receive a single product line::
>>> ShipmentIn = Model.get('stock.shipment.in')
- >>> Move = Model.get('stock.move')
>>> Location = Model.get('stock.location')
>>> supplier_location, = Location.find([
... ('code', '=', 'SUP'),
... ])
>>> shipment = ShipmentIn()
>>> shipment.supplier = supplier
- >>> move = Move()
- >>> shipment.incoming_moves.append(move)
+ >>> move = shipment.incoming_moves.new()
>>> move.from_location = supplier_location
>>> move.to_location = shipment.warehouse.input_location
>>> move.product = product
@@ -209,11 +149,9 @@ Receive a single product line::
>>> shipment.carrier = carrier
>>> shipment.cost
Decimal('25')
- >>> shipment.cost_currency == currency
+ >>> shipment.cost_currency == company.currency
True
- >>> shipment.save()
- >>> ShipmentIn.receive([shipment.id], config.context)
- >>> shipment.reload()
+ >>> shipment.click('receive')
>>> shipment.state
u'received'
>>> move, = shipment.incoming_moves
@@ -222,27 +160,22 @@ Receive a single product line::
Create payment term::
- >>> PaymentTerm = Model.get('account.invoice.payment_term')
- >>> PaymentTermLine = Model.get('account.invoice.payment_term.line')
- >>> payment_term = PaymentTerm(name='Direct')
- >>> payment_term_line = PaymentTermLine(type='remainder', days=0)
- >>> payment_term.lines.append(payment_term_line)
+ >>> payment_term = create_payment_term()
>>> payment_term.save()
Sale products with cost on shipment::
>>> Sale = Model.get('sale.sale')
- >>> SaleLine = Model.get('sale.line')
>>> sale = Sale()
>>> sale.party = customer
>>> sale.carrier = carrier
>>> sale.payment_term = payment_term
>>> sale.invoice_method = 'shipment'
>>> sale.shipment_cost_method = 'shipment'
- >>> sale_line = SaleLine()
- >>> sale.lines.append(sale_line)
+ >>> sale_line = sale.lines.new()
>>> sale_line.product = product
>>> sale_line.quantity = 5.0
+ >>> sale.click('quote')
>>> cost_line = sale.lines[-1]
>>> cost_line.product == carrier_product
True
@@ -250,10 +183,8 @@ Sale products with cost on shipment::
True
>>> cost_line.amount
Decimal('40.00')
- >>> sale.save()
- >>> Sale.quote([sale.id], config.context)
- >>> Sale.confirm([sale.id], config.context)
- >>> Sale.process([sale.id], config.context)
+ >>> sale.click('confirm')
+ >>> sale.click('process')
>>> sale.state
u'processing'
>>> sale.untaxed_amount
@@ -267,27 +198,23 @@ Send products::
True
>>> shipment.cost
Decimal('40')
- >>> shipment.cost_currency == currency
+ >>> shipment.cost_currency == company.currency
True
>>> move, = shipment.inventory_moves
>>> move.quantity = 4
>>> shipment.cost
Decimal('25')
- >>> shipment.cost_currency == currency
+ >>> shipment.cost_currency == company.currency
True
>>> shipment.state
u'waiting'
- >>> shipment.save()
- >>> shipment.reload()
- >>> ShipmentOut.assign_force([shipment.id], config.context)
+ >>> shipment.click('assign_force')
>>> shipment.state
u'assigned'
- >>> shipment.reload()
- >>> ShipmentOut.pack([shipment.id], config.context)
+ >>> shipment.click('pack')
>>> shipment.state
u'packed'
- >>> shipment.reload()
- >>> ShipmentOut.done([shipment.id], config.context)
+ >>> shipment.click('done')
>>> shipment.state
u'done'
@@ -306,10 +233,10 @@ Sale products with cost on order::
>>> sale.payment_term = payment_term
>>> sale.invoice_method = 'order'
>>> sale.shipment_cost_method = 'order'
- >>> sale_line = SaleLine()
- >>> sale.lines.append(sale_line)
+ >>> sale_line = sale.lines.new()
>>> sale_line.product = product
>>> sale_line.quantity = 3.0
+ >>> sale.click('quote')
>>> cost_line = sale.lines[-1]
>>> cost_line.product == carrier_product
True
@@ -317,10 +244,8 @@ Sale products with cost on order::
True
>>> cost_line.amount
Decimal('25.00')
- >>> sale.save()
- >>> Sale.quote([sale.id], config.context)
- >>> Sale.confirm([sale.id], config.context)
- >>> Sale.process([sale.id], config.context)
+ >>> sale.click('confirm')
+ >>> sale.click('process')
>>> sale.state
u'processing'
>>> sale.untaxed_amount
diff --git a/tests/test_carrier_weight.py b/tests/test_carrier_weight.py
index 04f524d..cb24f0d 100644
--- a/tests/test_carrier_weight.py
+++ b/tests/test_carrier_weight.py
@@ -1,20 +1,21 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton. The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
import unittest
import doctest
from decimal import Decimal
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, \
- test_view, test_depends
+from trytond.tests.test_tryton import ModuleTestCase
+from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
from trytond.transaction import Transaction
-class CarrierWeightTestCase(unittest.TestCase):
+class CarrierWeightTestCase(ModuleTestCase):
'Test CarrierWeight module'
+ module = 'carrier_weight'
def setUp(self):
- trytond.tests.test_tryton.install_module('carrier_weight')
+ super(CarrierWeightTestCase, self).setUp()
self.party = POOL.get('party.party')
self.uom = POOL.get('product.uom')
self.template = POOL.get('product.template')
@@ -24,14 +25,6 @@ class CarrierWeightTestCase(unittest.TestCase):
self.carrier = POOL.get('carrier')
self.weight_price_list = POOL.get('carrier.weight_price_list')
- def test0005views(self):
- 'Test views'
- test_view('carrier_weight')
-
- def test0006depends(self):
- 'Test depends'
- test_depends()
-
def test0010compute_weight_price(self):
'Test compute_weight_price'
with Transaction().start(DB_NAME, USER, context=CONTEXT):
diff --git a/tryton.cfg b/tryton.cfg
index f39582c..d852f28 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.4.1
+version=3.6.0
depends:
carrier
company
diff --git a/trytond_carrier_weight.egg-info/PKG-INFO b/trytond_carrier_weight.egg-info/PKG-INFO
index 555b2ec..67b09fa 100644
--- a/trytond_carrier_weight.egg-info/PKG-INFO
+++ b/trytond_carrier_weight.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-carrier-weight
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module to add cost method "on weight" on carrier
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
Description: trytond_carrier_weight
======================
@@ -64,4 +64,6 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/trytond_carrier_weight.egg-info/requires.txt b/trytond_carrier_weight.egg-info/requires.txt
index f394221..2b1cec9 100644
--- a/trytond_carrier_weight.egg-info/requires.txt
+++ b/trytond_carrier_weight.egg-info/requires.txt
@@ -1,6 +1,6 @@
-trytond_carrier >= 3.4, < 3.5
-trytond_company >= 3.4, < 3.5
-trytond_currency >= 3.4, < 3.5
-trytond_product >= 3.4, < 3.5
-trytond_product_measurements >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+trytond_carrier >= 3.6, < 3.7
+trytond_company >= 3.6, < 3.7
+trytond_currency >= 3.6, < 3.7
+trytond_product >= 3.6, < 3.7
+trytond_product_measurements >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
--
tryton-modules-carrier-weight
More information about the tryton-debian-vcs
mailing list