[tryton-debian-vcs] tryton-modules-sale-supply-drop-shipment branch debian updated. debian/3.4.1-1-2-gd868239

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:06:39 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-sale-supply-drop-shipment.git;a=commitdiff;h=debian/3.4.1-1-2-gd868239

commit d868239b1dc24a1a8a99b33968a550f87c26ae78
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Apr 23 17:00:06 2015 +0200

    Merging upstream version 3.6.0.

diff --git a/CHANGELOG b/CHANGELOG
index efa9b5a..58b5c1d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,6 @@
-Version 3.4.1 - 2015-02-19
+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)
 * Propagate exception handling from sale to purchase
diff --git a/PKG-INFO b/PKG-INFO
index ae4fad8..a269ee1 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_sale_supply_drop_shipment
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module for sale supply drop shipment
 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: sale_supply_drop_shipment
         =========================
         
@@ -64,5 +64,7 @@ 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
 Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/__init__.py b/__init__.py
index 2b173b1..94aaef5 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 stock import *
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 8282ab6..c32dda3 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -134,7 +134,7 @@ msgstr "Enviaments directes"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_shipment_drop_form_domain_all"
 msgid "All"
-msgstr "Tot"
+msgstr "Totes"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_shipment_drop_form_domain_draft"
@@ -168,7 +168,7 @@ msgstr "Cancel·lat"
 
 msgctxt "selection:stock.shipment.drop,state:"
 msgid "Done"
-msgstr "Realitzat"
+msgstr "Finalitzat"
 
 msgctxt "selection:stock.shipment.drop,state:"
 msgid "Draft"
@@ -184,7 +184,7 @@ msgstr "Cancel·la"
 
 msgctxt "view:stock.shipment.drop:"
 msgid "Done"
-msgstr "Realitzat"
+msgstr "Finalitza"
 
 msgctxt "view:stock.shipment.drop:"
 msgid "Draft"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 649decb..df9275c 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -169,7 +169,7 @@ msgstr "Cancelado"
 
 msgctxt "selection:stock.shipment.drop,state:"
 msgid "Done"
-msgstr "Realizado"
+msgstr "Finalizado"
 
 msgctxt "selection:stock.shipment.drop,state:"
 msgid "Draft"
@@ -185,7 +185,7 @@ msgstr "Cancelar"
 
 msgctxt "view:stock.shipment.drop:"
 msgid "Done"
-msgstr "Realizado"
+msgstr "Finalizar"
 
 msgctxt "view:stock.shipment.drop:"
 msgid "Draft"
diff --git a/purchase.py b/purchase.py
index e567c62..c95fd52 100644
--- a/purchase.py
+++ b/purchase.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.model import fields
 from trytond.pyson import Eval
 from trytond.pool import Pool, PoolMeta
@@ -59,16 +59,9 @@ class Purchase:
 
     @fields.depends('customer', 'delivery_address')
     def on_change_customer(self):
-        result = {
-            'delivery_address': None,
-            }
-        delivery_address = None
+        self.delivery_address = None
         if self.customer:
-            delivery_address = self.customer.address_get(type='delivery')
-        if delivery_address:
-            result['delivery_address'] = delivery_address.id
-            result['delivery_address.rec_name'] = delivery_address.rec_name
-        return result
+            self.delivery_address = self.customer.address_get(type='delivery')
 
     def get_drop_shipments(self, name):
         DropShipment = Pool().get('stock.shipment.drop')
diff --git a/purchase.xml b/purchase.xml
index b645bb4..7f8eda9 100644
--- a/purchase.xml
+++ b/purchase.xml
@@ -12,7 +12,9 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_purchase_drop_shipment_form">
             <field name="name">Drop Shipments</field>
             <field name="res_model">stock.shipment.drop</field>
-            <field name="domain">[('moves.purchase', 'in', Eval('active_ids'))]</field>
+            <field name="domain"
+                eval="[('moves.purchase', 'in', Eval('active_ids'))]"
+                pyson="1"/>
         </record>
         <record model="ir.action.keyword"
                 id="act_open_purchase_drop_shipment_keyword1">
diff --git a/sale.py b/sale.py
index a3a4e9a..276a0ad 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 itertools import groupby, chain
 from functools import partial
 from trytond.model import fields
diff --git a/sale.xml b/sale.xml
index 538c611..8728d0b 100644
--- a/sale.xml
+++ b/sale.xml
@@ -12,7 +12,8 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_sale_drop_shipment_form">
             <field name="name">Drop Shipments</field>
             <field name="res_model">stock.shipment.drop</field>
-            <field name="domain">[('moves.sale', 'in', Eval('active_ids'))]</field>
+            <field name="domain"
+                eval="[('moves.sale', 'in', Eval('active_ids'))]" pyson="1"/>
         </record>
         <record model="ir.action.keyword"
                 id="act_open_sale_drop_shipment_keyword1">
diff --git a/setup.py b/setup.py
index 6ee2b43..bc3f1ab 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
@@ -91,6 +91,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',
         'Topic :: Office/Business :: Financial :: Accounting',
         ],
diff --git a/stock.py b/stock.py
index 4848e4d..4dde6fb 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 trytond.model import Workflow, ModelView, ModelSQL, fields
 from trytond.pyson import Eval, If
 from trytond.pool import Pool, PoolMeta
@@ -138,18 +138,16 @@ class ShipmentDrop(Workflow, ModelSQL, ModelView):
     @fields.depends('supplier')
     def on_change_supplier(self):
         if self.supplier:
-            address = self.supplier.address_get()
-            if address:
-                return {'contact_address': address.id}
-        return {'contact_address': None}
+            self.contact_address = self.supplier.address_get()
+        else:
+            self.contact_address = None
 
     @fields.depends('customer')
     def on_change_customer(self):
         if self.customer:
-            address = self.customer.address_get(type='delivery')
-            if address:
-                return {'delivery_address': address.id}
-        return {'delivery_address': False}
+            self.delivery_address = self.customer.address_get(type='delivery')
+        else:
+            self.delivery_address = None
 
     def _get_move_planned_date(self):
         '''
diff --git a/stock.xml b/stock.xml
index 6415b9b..1bfdb64 100644
--- a/stock.xml
+++ b/stock.xml
@@ -68,13 +68,13 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window.domain" id="act_shipment_drop_form_domain_draft">
             <field name="name">Draft</field>
             <field name="sequence" eval="10"/>
-            <field name="domain">[('state', '=', 'draft')]</field>
+            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
             <field name="act_window" ref="act_shipment_drop_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_shipment_drop_form_domain_waiting">
             <field name="name">Waiting</field>
             <field name="sequence" eval="20"/>
-            <field name="domain">[('state', '=', 'waiting')]</field>
+            <field name="domain" eval="[('state', '=', 'waiting')]" pyson="1"/>
             <field name="act_window" ref="act_shipment_drop_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_shipment_drop_form_domain_all">
@@ -181,7 +181,9 @@ this repository contains the full copyright notices and license terms. -->
             <field name="global_p" eval="True"/>
         </record>
         <record model="ir.rule" id="rule_shipment_drop">
-            <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
+            <field name="domain"
+                eval="[('company', '=', Eval('user', {}).get('company', None))]"
+                pyson="1"/>
             <field name="rule_group" ref="rule_group_shipment_drop"/>
         </record>
 
diff --git a/tests/__init__.py b/tests/__init__.py
index 9a296fb..a1d8f9e 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_sale_supply_drop_shipment import suite
 
diff --git a/tests/scenario_sale_supply_drop_shipment.rst b/tests/scenario_sale_supply_drop_shipment.rst
index 220dd04..e2cbb5e 100644
--- a/tests/scenario_sale_supply_drop_shipment.rst
+++ b/tests/scenario_sale_supply_drop_shipment.rst
@@ -2,16 +2,18 @@
 Sale Supply Drop Shipment 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 sale_supply, sale, purchase::
     ...         ('name', 'in', ('sale_supply_drop_shipment', 'sale',
     ...             'purchase')),
     ...         ])
-    >>> 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::
 
@@ -100,60 +82,16 @@ Create stock user::
 
 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),
-    ...         ])
-    >>> expense, = Account.find([
-    ...         ('kind', '=', 'expense'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> create_chart.form.account_receivable = receivable
-    >>> create_chart.form.account_payable = payable
-    >>> create_chart.execute('create_properties')
-    >>> stock_journal, = AccountJournal.find([('code', '=', 'STO')])
+    >>> _ = create_chart(company)
+    >>> accounts = get_accounts(company)
+    >>> revenue = accounts['revenue']
+    >>> expense = accounts['expense']
 
 Create parties::
 
@@ -201,29 +139,22 @@ Create product::
 
 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 250 products::
 
     >>> config.user = sale_user.id
     >>> Sale = Model.get('sale.sale')
-    >>> SaleLine = Model.get('sale.line')
     >>> sale = Sale()
     >>> sale.party = customer
     >>> sale.payment_term = payment_term
-    >>> sale_line = SaleLine()
-    >>> sale.lines.append(sale_line)
+    >>> sale_line = sale.lines.new()
     >>> sale_line.product = product
     >>> sale_line.quantity = 250
-    >>> sale.save()
-    >>> Sale.quote([sale.id], config.context)
-    >>> Sale.confirm([sale.id], config.context)
-    >>> Sale.process([sale.id], config.context)
+    >>> sale.click('quote')
+    >>> sale.click('confirm')
+    >>> sale.click('process')
     >>> sale.state
     u'processing'
     >>> sale.shipments
@@ -261,13 +192,11 @@ Create Purchase from Request::
 Receive 100 products::
 
     >>> config.user = stock_user.id
-    >>> ShipmentDrop = Model.get('stock.shipment.drop')
     >>> move, = shipment.moves
     >>> move.unit_price == move.cost_price
     True
     >>> move.quantity = 100
-    >>> shipment.save()
-    >>> ShipmentDrop.done([shipment.id], config.context)
+    >>> shipment.click('done')
     >>> shipment.state
     u'done'
     >>> config.user = sale_user.id
@@ -370,10 +299,9 @@ If we opt not to cancel the shipment and deliver from stock::
     >>> sale_line = sale.lines.new()
     >>> sale_line.product = product
     >>> sale_line.quantity = 125
-    >>> sale.save()
-    >>> Sale.quote([sale.id], config.context)
-    >>> Sale.confirm([sale.id], config.context)
-    >>> Sale.process([sale.id], config.context)
+    >>> sale.click('quote')
+    >>> sale.click('confirm')
+    >>> sale.click('process')
     >>> config.user = purchase_user.id
     >>> purchase_request, = PurchaseRequest.find([('purchase_line', '=', None)])
     >>> create_purchase = Wizard('purchase.request.create_purchase',
diff --git a/tests/test_sale_supply_drop_shipment.py b/tests/test_sale_supply_drop_shipment.py
index abc49d3..bcb51b2 100644
--- a/tests/test_sale_supply_drop_shipment.py
+++ b/tests/test_sale_supply_drop_shipment.py
@@ -1,25 +1,15 @@
-#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
 import trytond.tests.test_tryton
-from trytond.tests.test_tryton import test_view, test_depends
+from trytond.tests.test_tryton import ModuleTestCase
 from trytond.tests.test_tryton import doctest_setup, doctest_teardown
 
 
-class SaleSupplyDropShipmentTestCase(unittest.TestCase):
+class SaleSupplyDropShipmentTestCase(ModuleTestCase):
     'Test SaleSupplyDropShipment module'
-
-    def setUp(self):
-        trytond.tests.test_tryton.install_module('sale_supply_drop_shipment')
-
-    def test0005views(self):
-        'Test views'
-        test_view('sale_supply_drop_shipment')
-
-    def test0006depends(self):
-        'Test depends'
-        test_depends()
+    module = 'sale_supply_drop_shipment'
 
 
 def suite():
diff --git a/tryton.cfg b/tryton.cfg
index 8b32f41..9c24fd7 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.6.0
 depends:
     company
     ir
diff --git a/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO b/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO
index 79ae531..9a2a287 100644
--- a/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO
+++ b/trytond_sale_supply_drop_shipment.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-sale-supply-drop-shipment
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module for sale supply drop shipment
 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: sale_supply_drop_shipment
         =========================
         
@@ -64,5 +64,7 @@ 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
 Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/trytond_sale_supply_drop_shipment.egg-info/requires.txt b/trytond_sale_supply_drop_shipment.egg-info/requires.txt
index f4e7e60..3ad75e6 100644
--- a/trytond_sale_supply_drop_shipment.egg-info/requires.txt
+++ b/trytond_sale_supply_drop_shipment.egg-info/requires.txt
@@ -1,6 +1,6 @@
-trytond_company >= 3.4, < 3.5
-trytond_purchase >= 3.4, < 3.5
-trytond_sale >= 3.4, < 3.5
-trytond_sale_supply >= 3.4, < 3.5
-trytond_stock >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+trytond_company >= 3.6, < 3.7
+trytond_purchase >= 3.6, < 3.7
+trytond_sale >= 3.6, < 3.7
+trytond_sale_supply >= 3.6, < 3.7
+trytond_stock >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
-- 
tryton-modules-sale-supply-drop-shipment



More information about the tryton-debian-vcs mailing list