[tryton-debian-vcs] tryton-modules-account-dunning branch debian updated. debian/3.4.1-1-3-gfc9cff4
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:01:06 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-account-dunning.git;a=commitdiff;h=debian/3.4.1-1-3-gfc9cff4
commit fc9cff417d79717f60524a7467f8b8a78a21b8e3
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Apr 23 17:30:13 2015 +0200
Updating Depends.
diff --git a/debian/control b/debian/control
index e3e28e0..45b7d7b 100644
--- a/debian/control
+++ b/debian/control
@@ -18,6 +18,7 @@ Package: tryton-modules-account-dunning
Architecture: all
Depends:
python-pkg-resources,
+ python-sql,
tryton-modules-account (>= ${version:major}),
tryton-modules-company (>= ${version:major}),
tryton-modules-party (>= ${version:major}),
commit 80b0b67efd50ef65951601cedb60879d79c9dbdc
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu Apr 23 16:59:49 2015 +0200
Merging upstream version 3.6.0.
diff --git a/CHANGELOG b/CHANGELOG
index 796da36..c9c89b0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
-Version 3.4.1 - 2015-03-02
+Version 3.6.0 - 2015-04-20
* Bug fixes (see mercurial logs for details)
+* Add dunning_procedure property on Move Line
+* Add support for PyPy
Version 3.4.0 - 2014-10-20
* Bug fixes (see mercurial logs for details)
@@ -8,4 +10,4 @@ Version 3.2.0 - 2014-04-21
* Bug fixes (see mercurial logs for details)
Version 3.0.0 - 2013-10-21
-* Initial release
\ No newline at end of file
+* Initial release
diff --git a/PKG-INFO b/PKG-INFO
index d641728..3ef4d36 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_account_dunning
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module for account dunning
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_account_dunning
=======================
@@ -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 546a623..0f3c012 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 .dunning import *
diff --git a/account.py b/account.py
index 67bfb72..56ddcad 100644
--- a/account.py
+++ b/account.py
@@ -1,8 +1,7 @@
-#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, PoolMeta
from trytond.model import fields
-from trytond.transaction import Transaction
__all__ = ['Configuration', 'MoveLine']
@@ -56,3 +55,8 @@ class MoveLine:
__name__ = 'account.move.line'
dunnings = fields.One2Many('account.dunning', 'line', 'Dunnings')
+
+ @property
+ def dunning_procedure(self):
+ if self.party:
+ return self.party.dunning_procedure
diff --git a/dunning.py b/dunning.py
index 31e9be9..2a5ec42 100644
--- a/dunning.py
+++ b/dunning.py
@@ -1,7 +1,9 @@
-#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 collections import defaultdict
+from sql import Null
+
from trytond.model import Model, ModelView, ModelSQL, fields
from trytond.pyson import If, Eval
from trytond.transaction import Transaction
@@ -38,7 +40,7 @@ class Level(ModelSQL, ModelView):
@staticmethod
def order_sequence(tables):
table, _ = tables[None]
- return [table.sequence == None, table.sequence]
+ return [table.sequence == Null, table.sequence]
def get_rec_name(self, name):
return '%s@%s' % (self.procedure.levels.index(self),
@@ -218,11 +220,11 @@ class Dunning(ModelSQL, ModelView):
lines = MoveLine.search(cls._overdue_line_domain(date))
dunnings = (cls._get_dunning(line, date) for line in lines)
- cls.create([d._save_values for d in dunnings if d])
+ cls.save([d for d in dunnings if d])
@classmethod
def _get_dunning(cls, line, date):
- procedure = line.party.dunning_procedure
+ procedure = line.dunning_procedure
if not procedure:
return
for level in procedure.levels:
diff --git a/dunning.xml b/dunning.xml
index bfe79a8..22b9470 100644
--- a/dunning.xml
+++ b/dunning.xml
@@ -62,6 +62,14 @@ this repository contains the full copyright notices and license terms. -->
id="menu_dunning_procedure_form"/>
<record model="ir.model.access"
+ id="access_dunning_procedure">
+ <field name="model" search="[('model', '=', 'account.dunning.procedure')]"/>
+ <field name="perm_read" eval="False"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
+ <record model="ir.model.access"
id="access_dunning_procedure_account_admin">
<field name="model" search="[('model', '=', 'account.dunning.procedure')]"/>
<field name="group" ref="account.group_account_admin"/>
@@ -98,6 +106,13 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">dunning_level_list_sequence</field>
</record>
+ <record model="ir.model.access" id="access_dunning_level">
+ <field name="model" search="[('model', '=', 'account.dunning.level')]"/>
+ <field name="perm_read" eval="False"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
<record model="ir.model.access"
id="access_dunning_level_account_admin">
<field name="model" search="[('model', '=', 'account.dunning.level')]"/>
@@ -146,14 +161,14 @@ this repository contains the full copyright notices and license terms. -->
id="act_dunning_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_dunning_form"/>
</record>
<record model="ir.action.act_window.domain"
id="act_dunning_form_domain_done">
<field name="name">Done</field>
<field name="sequence" eval="20"/>
- <field name="domain">[('state', '=', 'done')]</field>
+ <field name="domain" eval="[('state', '=', 'done')]" pyson="1"/>
<field name="act_window" ref="act_dunning_form"/>
</record>
<record model="ir.action.act_window.domain"
@@ -171,7 +186,8 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window" id="act_dunning_party">
<field name="name">Dunnings</field>
<field name="res_model">account.dunning</field>
- <field name="domain">[('line.party', 'in', Eval('active_ids'))]</field>
+ <field name="domain"
+ eval="[('line.party', 'in', Eval('active_ids'))]" pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_dunning_party_view1">
<field name="sequence" eval="10"/>
@@ -199,10 +215,19 @@ this repository contains the full copyright notices and license terms. -->
<field name="global_p" eval="True"/>
</record>
<record model="ir.rule" id="rule_dunning1">
- <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_dunning"/>
</record>
+ <record model="ir.model.access" id="access_dunning">
+ <field name="model" search="[('model', '=', 'account.dunning')]"/>
+ <field name="perm_read" eval="False"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
<record model="ir.model.access"
id="access_dunning_account_admin">
<field name="model" search="[('model', '=', 'account.dunning')]"/>
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index ba14cac..852e51f 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -40,7 +40,7 @@ msgstr "Usuari creació"
msgctxt "field:account.dunning,currency_digits:"
msgid "Currency Digits"
-msgstr "Decimals de moneda"
+msgstr "Decimals de la moneda"
msgctxt "field:account.dunning,id:"
msgid "ID"
@@ -224,7 +224,7 @@ msgstr "Totes"
msgctxt "model:ir.action.act_window.domain,name:act_dunning_form_domain_done"
msgid "Done"
-msgstr "Realitzada"
+msgstr "Finalitzada"
msgctxt "model:ir.action.act_window.domain,name:act_dunning_form_domain_draft"
msgid "Draft"
@@ -256,7 +256,7 @@ msgstr "Reclamació"
msgctxt "selection:account.dunning,state:"
msgid "Done"
-msgstr "Realitzada"
+msgstr "Finalitzada"
msgctxt "selection:account.dunning,state:"
msgid "Draft"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index ac36751..50b1bfb 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -40,7 +40,7 @@ msgstr "Usuario creación"
msgctxt "field:account.dunning,currency_digits:"
msgid "Currency Digits"
-msgstr "Dígitos de moneda"
+msgstr "Decimales de moneda"
msgctxt "field:account.dunning,id:"
msgid "ID"
@@ -60,7 +60,7 @@ msgstr "Fecha vencimiento"
msgctxt "field:account.dunning,party:"
msgid "Party"
-msgstr "Entidades"
+msgstr "Entidad"
msgctxt "field:account.dunning,procedure:"
msgid "Procedure"
@@ -76,7 +76,7 @@ msgstr "Segunda moneda"
msgctxt "field:account.dunning,second_currency_digits:"
msgid "Second Currency Digits"
-msgstr "Decimales moneda secundaria"
+msgstr "Decimales de moneda secundaria"
msgctxt "field:account.dunning,state:"
msgid "State"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index 1d194fa..e843df3 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -8,7 +8,7 @@ msgstr "La línea puede ser utilizada sólo una vez en el cobro."
msgctxt "field:account.configuration,default_dunning_procedure:"
msgid "Default Dunning Procedure"
-msgstr "Procedimiento de Cobro por Defecto"
+msgstr "Procedimiento de cobro por defecto"
msgctxt "field:account.dunning,active:"
msgid "Active"
@@ -16,11 +16,11 @@ msgstr "Activo"
msgctxt "field:account.dunning,amount:"
msgid "Amount"
-msgstr "Valor"
+msgstr "Importe"
msgctxt "field:account.dunning,amount_second_currency:"
msgid "Amount Second Currency"
-msgstr "Valor en Segunda Moneda"
+msgstr "Importe en moneda secundaria"
msgctxt "field:account.dunning,blocked:"
msgid "Blocked"
@@ -32,15 +32,15 @@ msgstr "Empresa"
msgctxt "field:account.dunning,create_date:"
msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
msgctxt "field:account.dunning,create_uid:"
msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
msgctxt "field:account.dunning,currency_digits:"
msgid "Currency Digits"
-msgstr "Decimales de Moneda"
+msgstr "Decimales de moneda"
msgctxt "field:account.dunning,id:"
msgid "ID"
@@ -56,7 +56,7 @@ msgstr "Línea"
msgctxt "field:account.dunning,maturity_date:"
msgid "Maturity Date"
-msgstr "Fecha de Vencimiento"
+msgstr "Fecha de vencimiento"
msgctxt "field:account.dunning,party:"
msgid "Party"
@@ -72,11 +72,11 @@ msgstr "Nombre"
msgctxt "field:account.dunning,second_currency:"
msgid "Second Currency"
-msgstr "Segunda Moneda"
+msgstr "Segunda moneda"
msgctxt "field:account.dunning,second_currency_digits:"
msgid "Second Currency Digits"
-msgstr "Decimales de Segunda Moneda"
+msgstr "Decimales de segunda moneda"
msgctxt "field:account.dunning,state:"
msgid "State"
@@ -84,11 +84,11 @@ msgstr "Estado"
msgctxt "field:account.dunning,write_date:"
msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
msgctxt "field:account.dunning,write_uid:"
msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
msgctxt "field:account.dunning.create.start,date:"
msgid "Date"
@@ -100,15 +100,15 @@ msgstr "ID"
msgctxt "field:account.dunning.level,create_date:"
msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
msgctxt "field:account.dunning.level,create_uid:"
msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
msgctxt "field:account.dunning.level,days:"
msgid "Number of Overdue Days"
-msgstr "Número de Días de Atraso"
+msgstr "Número de días de atraso"
msgctxt "field:account.dunning.level,id:"
msgid "ID"
@@ -128,19 +128,19 @@ msgstr "Secuencia"
msgctxt "field:account.dunning.level,write_date:"
msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
msgctxt "field:account.dunning.level,write_uid:"
msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
msgctxt "field:account.dunning.procedure,create_date:"
msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
msgctxt "field:account.dunning.procedure,create_uid:"
msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
msgctxt "field:account.dunning.procedure,id:"
msgid "ID"
@@ -160,11 +160,11 @@ msgstr "Nombre"
msgctxt "field:account.dunning.procedure,write_date:"
msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
msgctxt "field:account.dunning.procedure,write_uid:"
msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
msgctxt "field:account.dunning.process.start,id:"
msgid "ID"
@@ -176,27 +176,27 @@ msgstr "Cobros"
msgctxt "field:party.party,dunning_procedure:"
msgid "Dunning Procedure"
-msgstr "Procedimiento de Cobro"
+msgstr "Procedimiento de cobro"
msgctxt "model:account.dunning,name:"
msgid "Account Dunning"
-msgstr "Cuenta de Cobro"
+msgstr "Cuenta de cobro"
msgctxt "model:account.dunning.create.start,name:"
msgid "Create Account Dunning"
-msgstr "Crear Cuenta de Cobro"
+msgstr "Crear Cuenta de cobro"
msgctxt "model:account.dunning.level,name:"
msgid "Account Dunning Level"
-msgstr "Nivel de Cobro Contable"
+msgstr "Nivel de cobro contable"
msgctxt "model:account.dunning.procedure,name:"
msgid "Account Dunning Procedure"
-msgstr "Procedimiento de Cobro Contable"
+msgstr "Procedimiento de cobro contable"
msgctxt "model:account.dunning.process.start,name:"
msgid "Create Account Dunning"
-msgstr "Crear Cuenta de Cobro"
+msgstr "Crear cuenta de cobro"
msgctxt "model:ir.action,name:act_dunning_form"
msgid "Dunnings"
@@ -208,15 +208,15 @@ msgstr "Cobros"
msgctxt "model:ir.action,name:act_dunning_procedure_form"
msgid "Dunning Procedures"
-msgstr "Procedimientos de Cobro"
+msgstr "Procedimientos de cobro"
msgctxt "model:ir.action,name:wizard_dunning_create"
msgid "Create Dunnings"
-msgstr "Crear Cobros"
+msgstr "Crear cobros"
msgctxt "model:ir.action,name:wizard_dunning_process"
msgid "Process Dunning"
-msgstr "Procesar Cobro"
+msgstr "Procesar cobro"
msgctxt "model:ir.action.act_window.domain,name:act_dunning_form_domain_all"
msgid "All"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 3efabe6..2cdd176 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -40,7 +40,7 @@ msgstr "Usuario creación"
msgctxt "field:account.dunning,currency_digits:"
msgid "Currency Digits"
-msgstr "Decimales de moneda"
+msgstr "Decimales de la moneda"
msgctxt "field:account.dunning,id:"
msgid "ID"
@@ -76,7 +76,7 @@ msgstr "Segunda moneda"
msgctxt "field:account.dunning,second_currency_digits:"
msgid "Second Currency Digits"
-msgstr "Decimales segunda moneda"
+msgstr "Decimales de la segunda moneda"
msgctxt "field:account.dunning,state:"
msgid "State"
@@ -224,7 +224,7 @@ msgstr "Todo"
msgctxt "model:ir.action.act_window.domain,name:act_dunning_form_domain_done"
msgid "Done"
-msgstr "Realizada"
+msgstr "Finalizada"
msgctxt "model:ir.action.act_window.domain,name:act_dunning_form_domain_draft"
msgid "Draft"
@@ -256,7 +256,7 @@ msgstr "Reclamación"
msgctxt "selection:account.dunning,state:"
msgid "Done"
-msgstr "Realizada"
+msgstr "Finalizada"
msgctxt "selection:account.dunning,state:"
msgid "Draft"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 92d7275..8aa7f6c 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:account.dunning:"
msgid "Line can be used only once on dunning."
-msgstr "Une ligne ne peut être utilisée qu'une seul fois sur une relance."
+msgstr "Une ligne ne peut être utilisée qu'une seule fois sur une relance."
msgctxt "field:account.configuration,default_dunning_procedure:"
msgid "Default Dunning Procedure"
diff --git a/party.py b/party.py
index 49ef6f0..eb3fefc 100644
--- a/party.py
+++ b/party.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.pool import PoolMeta
diff --git a/setup.py b/setup.py
index 289a9a0..6169a84 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
@@ -41,7 +41,7 @@ if minor_version % 2:
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], name, version))
-requires = []
+requires = ['python-sql >= 0.4']
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
@@ -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/tests/__init__.py b/tests/__init__.py
index cafbb27..cab2de6 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_account_dunning import suite
diff --git a/tests/scenario_account_dunning.rst b/tests/scenario_account_dunning.rst
index d3c6f6c..a6c405b 100644
--- a/tests/scenario_account_dunning.rst
+++ b/tests/scenario_account_dunning.rst
@@ -2,16 +2,16 @@
Account Dunning 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
>>> today = datetime.date.today()
Create database::
@@ -19,40 +19,19 @@ Create database::
>>> config = config.set_trytond()
>>> config.pool.test = True
-Install account::
+Install account_dunning::
>>> Module = Model.get('ir.module.module')
- >>> modules = Module.find([
+ >>> module, = Module.find([
... ('name', '=', 'account_dunning'),
... ])
- >>> Module.install([x.id for x in modules], config.context)
+ >>> 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='US Dollar', symbol='$', code='USD',
- ... rounding=Decimal('0.01'), mon_grouping='[3, 3, 0]',
- ... mon_decimal_point='.')
- ... 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::
@@ -93,55 +72,17 @@ Create dunning 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
- >>> fiscalyear.save()
- >>> FiscalYear.create_period([fiscalyear.id], config.context)
+ >>> fiscalyear = create_fiscalyear(company)
+ >>> fiscalyear.click('create_period')
>>> period = fiscalyear.periods[0]
Create chart of accounts::
- >>> AccountTemplate = Model.get('account.account.template')
- >>> Account = Model.get('account.account')
- >>> 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),
- ... ])
- >>> cash, = Account.find([
- ... ('kind', '=', 'other'),
- ... ('company', '=', company.id),
- ... ('name', '=', 'Main Cash'),
- ... ])
- >>> create_chart.form.account_receivable = receivable
- >>> create_chart.form.account_payable = payable
- >>> create_chart.execute('create_properties')
+ >>> _ = create_chart(company)
+ >>> accounts = get_accounts(company)
+ >>> receivable = accounts['receivable']
+ >>> revenue = accounts['revenue']
+ >>> cash = accounts['cash']
Create dunning procedure::
diff --git a/tests/test_account_dunning.py b/tests/test_account_dunning.py
index 2d0ffb4..acc9ba1 100644
--- a/tests/test_account_dunning.py
+++ b/tests/test_account_dunning.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 AccountDunningTestCase(unittest.TestCase):
+class AccountDunningTestCase(ModuleTestCase):
'Test AccountDunning module'
-
- def setUp(self):
- trytond.tests.test_tryton.install_module('account_dunning')
-
- def test0005views(self):
- 'Test views'
- test_view('account_dunning')
-
- def test0006depends(self):
- 'Test depends'
- test_depends()
+ module = 'account_dunning'
def suite():
diff --git a/tryton.cfg b/tryton.cfg
index 6edc010..c7c6c43 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.4.1
+version=3.6.0
depends:
account
company
diff --git a/trytond_account_dunning.egg-info/PKG-INFO b/trytond_account_dunning.egg-info/PKG-INFO
index cd31c6a..ac1c2aa 100644
--- a/trytond_account_dunning.egg-info/PKG-INFO
+++ b/trytond_account_dunning.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-account-dunning
-Version: 3.4.1
+Version: 3.6.0
Summary: Tryton module for account dunning
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_account_dunning
=======================
@@ -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_account_dunning.egg-info/requires.txt b/trytond_account_dunning.egg-info/requires.txt
index da32e17..cf7cef3 100644
--- a/trytond_account_dunning.egg-info/requires.txt
+++ b/trytond_account_dunning.egg-info/requires.txt
@@ -1,4 +1,5 @@
-trytond_account >= 3.4, < 3.5
-trytond_company >= 3.4, < 3.5
-trytond_party >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+python-sql >= 0.4
+trytond_account >= 3.6, < 3.7
+trytond_company >= 3.6, < 3.7
+trytond_party >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
--
tryton-modules-account-dunning
More information about the tryton-debian-vcs
mailing list