[tryton-debian-vcs] tryton-modules-carrier-percentage branch upstream updated. upstream/3.4.1-1-g6e64ddf
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:03:25 UTC 2015
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-carrier-percentage.git;a=commitdiff;h=upstream/3.4.1-1-g6e64ddf
commit 6e64ddf46a0c807596f7340a55d4973d0d41b969
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Apr 23 16:59:55 2015 +0200
Adding upstream version 3.6.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
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 4fedf57..e4615f7 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_carrier_percentage
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module to add cost method "on percentage" 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_percentage
==========================
@@ -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 1818d1f..90a94eb 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 d9f6548..cb89b87 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 fields
from trytond.transaction import Transaction
diff --git a/sale.py b/sale.py
index d54bcd7..d2bf02f 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 decimal import Decimal
from trytond.pool import PoolMeta
diff --git a/setup.py b/setup.py
index 01c18c2..f1b5618 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 c39e1b5..5618bd0 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 decimal import Decimal
from trytond.pool import Pool, PoolMeta
diff --git a/tests/__init__.py b/tests/__init__.py
index 1803291..ac2f05e 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_percentage import suite
diff --git a/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst b/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
index d7e06da..16c249d 100644
--- a/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
+++ b/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
@@ -2,16 +2,18 @@
Carrier Percentage with Purchase Shipment Cost 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_percentage, purchase_shipment_cost and sale_shipment_cost::
... ('name', 'in', ['carrier_percentage',
... '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::
@@ -178,15 +120,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
@@ -196,11 +136,9 @@ Receive a single product line::
>>> shipment.carrier = carrier
>>> shipment.cost
Decimal('60.00')
- >>> 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
@@ -209,38 +147,31 @@ 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
>>> cost_line.quantity
- 1
+ 1.0
>>> cost_line.amount
Decimal('15.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
@@ -254,27 +185,23 @@ Send products::
True
>>> shipment.cost
Decimal('15.00')
- >>> shipment.cost_currency == currency
+ >>> shipment.cost_currency == company.currency
True
>>> move, = shipment.inventory_moves
>>> move.quantity = 4
>>> shipment.cost
Decimal('12.00')
- >>> 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'
@@ -293,10 +220,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
@@ -304,10 +231,8 @@ Sale products with cost on order::
True
>>> cost_line.amount
Decimal('9.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_percentage.py b/tests/test_carrier_percentage.py
index 3c94fda..fdd3ae9 100644
--- a/tests/test_carrier_percentage.py
+++ b/tests/test_carrier_percentage.py
@@ -1,19 +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, doctest_setup, doctest_teardown
+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_percentage'
def setUp(self):
- trytond.tests.test_tryton.install_module('carrier_percentage')
+ super(CarrierWeightTestCase, self).setUp()
self.party = POOL.get('party.party')
self.uom = POOL.get('product.uom')
self.template = POOL.get('product.template')
@@ -22,14 +24,6 @@ class CarrierWeightTestCase(unittest.TestCase):
self.currency = POOL.get('currency.currency')
self.carrier = POOL.get('carrier')
- def test0005views(self):
- 'Test views'
- test_view('carrier_percentage')
-
- def test0006depends(self):
- 'Test depends'
- test_depends()
-
def test0010compute_percentage(self):
'Test compute_percentage'
with Transaction().start(DB_NAME, USER, context=CONTEXT):
diff --git a/tryton.cfg b/tryton.cfg
index 317b494..bb94a17 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.4.1
+version=3.6.0
depends:
carrier
currency
diff --git a/trytond_carrier_percentage.egg-info/PKG-INFO b/trytond_carrier_percentage.egg-info/PKG-INFO
index 273f4f0..e69e792 100644
--- a/trytond_carrier_percentage.egg-info/PKG-INFO
+++ b/trytond_carrier_percentage.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-carrier-percentage
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module to add cost method "on percentage" 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_percentage
==========================
@@ -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_percentage.egg-info/requires.txt b/trytond_carrier_percentage.egg-info/requires.txt
index 687009a..f357448 100644
--- a/trytond_carrier_percentage.egg-info/requires.txt
+++ b/trytond_carrier_percentage.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_carrier >= 3.4, < 3.5
-trytond_currency >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+trytond_carrier >= 3.6, < 3.7
+trytond_currency >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
--
tryton-modules-carrier-percentage
More information about the tryton-debian-vcs
mailing list