From 84e520771cff591b29b857d5430a33a96e0ae932 Mon Sep 17 00:00:00 2001 From: Oscar Alvarez Date: Wed, 5 Aug 2015 07:30:10 -0500 Subject: [PATCH 01/15] Release 3.6 version --- device.py | 4 +--- locale/es_CO.po | 2 +- statement.py | 2 -- statement.xml | 13 ++++++++----- tryton.cfg | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/device.py b/device.py index 826d221..4a3625e 100644 --- a/device.py +++ b/device.py @@ -42,9 +42,7 @@ class SaleDevice(ModelSQL, ModelView): @fields.depends('shop') def on_change_shop(self): - return { - 'company': self.shop.company.id if self.shop else None - } + self.company = self.shop.company.id if self.shop else None def get_company(self, name): return self.shop.company.id diff --git a/locale/es_CO.po b/locale/es_CO.po index 8230091..20d070e 100644 --- a/locale/es_CO.po +++ b/locale/es_CO.po @@ -220,7 +220,7 @@ msgstr "Pagos" msgctxt "field:sale.sale,residual_amount:" msgid "Residual Amount" -msgstr "Cambio" +msgstr "Saldo" msgctxt "field:sale.sale,sale_device:" msgid "Sale Device" diff --git a/statement.py b/statement.py index 01120a1..8843bd5 100644 --- a/statement.py +++ b/statement.py @@ -157,7 +157,6 @@ class OpenStatement(Wizard): pool = Pool() User = pool.get('res.user') Statement = pool.get('account.statement') - Journal = pool.get('account.statement.journal') user = Transaction().user user = User(user) @@ -249,7 +248,6 @@ class CloseStatement(Wizard): pool = Pool() User = pool.get('res.user') Statement = pool.get('account.statement') - Journal = pool.get('account.statement.journal') user = Transaction().user user = User(user) diff --git a/statement.xml b/statement.xml index b54901e..6fd2ed4 100644 --- a/statement.xml +++ b/statement.xml @@ -8,7 +8,8 @@ copyright notices and license terms. --> Statements account.statement - [('users', '=', Eval('_user'))] + @@ -24,21 +25,24 @@ copyright notices and license terms. --> id="act_sale_statement_form_domain_draft"> Draft - [('state', '=', 'draft')] + Validated - [('state', '=', 'validated')] + Posted - [('state', '=', 'posted')] + - diff --git a/tryton.cfg b/tryton.cfg index d52e3c3..9a0e2fb 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=3.4.0 +version=3.6.0 depends: account_statement sale_shop From a479a4397bc0898180ef72ede2d72d0c8fb4ea3b Mon Sep 17 00:00:00 2001 From: Oscar Alvarez Date: Tue, 1 Sep 2015 23:30:06 -0500 Subject: [PATCH 02/15] Only to validate statements if these exists --- statement.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/statement.py b/statement.py index 8843bd5..cb74675 100644 --- a/statement.py +++ b/statement.py @@ -142,8 +142,8 @@ class OpenStatement(Wizard): def __setup__(cls): super(OpenStatement, cls).__setup__() cls._error_messages.update({ - 'open_statement': 'Statement %s opened.\n', - 'statement_already_opened': 'Statement %s already opened.\n', + 'open_statement': 'Statement %s opened. \n', + 'statement_already_opened': 'Statement %s already opened. \n', 'user_without_device': 'User %s has not any device assigned yet.' '\n', }) @@ -232,9 +232,9 @@ class CloseStatement(Wizard): def __setup__(cls): super(CloseStatement, cls).__setup__() cls._error_messages.update({ - 'close_statement': 'Statement %s closed.\n', - 'statement_already_closed': 'Statement %s already closed.\n', - 'not_statement_found': 'Statement %s not found.\n', + 'close_statement': 'Statement %s closed. \n', + 'statement_already_closed': 'Statement %s already closed. \n', + 'not_statement_found': 'Statement %s not found. \n', 'user_without_device': 'User %s has not any device assigned yet.' '\n', }) @@ -283,7 +283,8 @@ class CloseStatement(Wizard): result += self.raise_user_error('not_statement_found', error_args=(journal.rec_name,), raise_exception=False) - Statement.validate_statement(statements) + if statements: + Statement.validate_statement(statements) self.result = result else: self.result = self.raise_user_error('user_without_device', From 06fe927f51fc1338807bbf3e894dc70451dd9485 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 14 Sep 2015 15:56:24 +0200 Subject: [PATCH 03/15] Locales --- locale/ca_ES.po | 29 +++++++++++++++++++++++++++-- locale/es_ES.po | 27 ++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/locale/ca_ES.po b/locale/ca_ES.po index 548d99a..30df8f6 100644 --- a/locale/ca_ES.po +++ b/locale/ca_ES.po @@ -10,14 +10,26 @@ msgctxt "error:close.statement:" msgid "Statement %s already closed.\n" msgstr "Extracte %s ja tancat.\n" +msgctxt "error:close.statement:" +msgid "Statement %s already closed. \n" +msgstr "Extracto %s ya cerrado.\n" + msgctxt "error:close.statement:" msgid "Statement %s closed.\n" msgstr "Extracte %s tancat.\n" +msgctxt "error:close.statement:" +msgid "Statement %s closed. \n" +msgstr "Extracte %s ja tancat.\n" + msgctxt "error:close.statement:" msgid "Statement %s not found.\n" msgstr "Extracte %s no trobat.\n" +msgctxt "error:close.statement:" +msgid "Statement %s not found. \n" +msgstr "Extracte %s no trobat.\n" + msgctxt "error:close.statement:" msgid "User %s has not any device assigned yet.\n" msgstr "L'usuari %s no té cap terminal assignat encara.\n" @@ -26,10 +38,18 @@ msgctxt "error:open.statement:" msgid "Statement %s already opened.\n" msgstr "Extracte %s ja obert.\n" +msgctxt "error:open.statement:" +msgid "Statement %s already opened. \n" +msgstr "Extracte %s ja obert.\n" + msgctxt "error:open.statement:" msgid "Statement %s opened.\n" msgstr "Extracte %s obert.\n" +msgctxt "error:open.statement:" +msgid "Statement %s opened. \n" +msgstr "Extracte %s obert.\n" + msgctxt "error:open.statement:" msgid "User %s has not any device assigned yet.\n" msgstr "L'usuari %s no té cap terminal assignat encara.\n" @@ -41,7 +61,7 @@ msgstr "No podeu tenir dos usuaris amb el mateix identificador d'entrada." msgctxt "error:sale.payment:" msgid "A customer invoice/refund from sale device has not been created." msgstr "" -"Una factura / factura de devolució d'un terminal de venda no s'ha creat." +"Una factura/devolució d'un terminal de venda no s'ha creat." msgctxt "error:sale.payment:" msgid "A draft statement for \"%s\" payments has not been created." @@ -57,6 +77,11 @@ msgctxt "error:sale.payment:" msgid "You have not defined a sale device for your user." msgstr "No heu definit un terminal de venda per al vostre usuari." +msgctxt "error:sale.sale:" +msgid "A customer invoice/refund from sale device has not been created." +msgstr "" +"Una factura/devolució d'un terminal de venda no s'ha creat." + msgctxt "error:sale.sale:" msgid "Go to user preferences and select a shop (\"%s\")" msgstr "Selecciona una botiga en les seves preferencies (\"%s\")." @@ -231,7 +256,7 @@ msgstr "Adreces" msgctxt "field:sale.shop,company_party:" msgid "" -msgstr "" +msgstr " " msgctxt "model:close.statement.done,name:" msgid "Close Statement" diff --git a/locale/es_ES.po b/locale/es_ES.po index f87031e..6aed898 100644 --- a/locale/es_ES.po +++ b/locale/es_ES.po @@ -10,14 +10,26 @@ msgctxt "error:close.statement:" msgid "Statement %s already closed.\n" msgstr "Extracto %s ya cerrado.\n" +msgctxt "error:close.statement:" +msgid "Statement %s already closed. \n" +msgstr "Extracto %s ya cerrado.\n" + msgctxt "error:close.statement:" msgid "Statement %s closed.\n" msgstr "Extracto %s cerrado.\n" +msgctxt "error:close.statement:" +msgid "Statement %s closed. \n" +msgstr "Extracto %s cerrado. \n" + msgctxt "error:close.statement:" msgid "Statement %s not found.\n" msgstr "Extracto %s no encontrado.\n" +msgctxt "error:close.statement:" +msgid "Statement %s not found. \n" +msgstr "Extracto %s no encontrado.\n" + msgctxt "error:close.statement:" msgid "User %s has not any device assigned yet.\n" msgstr "Usuario %s no tiene ningún terminal asignado todavía.\n" @@ -26,10 +38,18 @@ msgctxt "error:open.statement:" msgid "Statement %s already opened.\n" msgstr "Extracto %s ya abierto.\n" +msgctxt "error:open.statement:" +msgid "Statement %s already opened. \n" +msgstr "Extracto %s ya abierto.\n" + msgctxt "error:open.statement:" msgid "Statement %s opened.\n" msgstr "Extracto %s abierto.\n" +msgctxt "error:open.statement:" +msgid "Statement %s opened. \n" +msgstr "Extracto %s abierto.\n" + msgctxt "error:open.statement:" msgid "User %s has not any device assigned yet.\n" msgstr "Usuario %s no tiene ningún terminal asignado todavía.\n" @@ -41,7 +61,7 @@ msgstr "No puede tener dos usuarios con el mismo registro de entrada." msgctxt "error:sale.payment:" msgid "A customer invoice/refund from sale device has not been created." msgstr "" -"Una factura/factura de devolución del terminal de venta no se ha creado." +"Una factura/devolución del terminal de venta no se ha creado." msgctxt "error:sale.payment:" msgid "A draft statement for \"%s\" payments has not been created." @@ -57,6 +77,11 @@ msgctxt "error:sale.payment:" msgid "You have not defined a sale device for your user." msgstr "No ha definido un terminal de venta para su usuario." +msgctxt "error:sale.sale:" +msgid "A customer invoice/refund from sale device has not been created." +msgstr "" +"Una factura/devolución del terminal de venta no se ha creado." + msgctxt "error:sale.sale:" msgid "Go to user preferences and select a shop (\"%s\")" msgstr "Seleccione una tienda en sus preferencias (\"%s\")." From 917196dcd5e3b482f9305c7468d431ef005810e3 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 14 Sep 2015 17:37:03 +0200 Subject: [PATCH 04/15] Locales --- locale/ca_ES.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/ca_ES.po b/locale/ca_ES.po index 30df8f6..66fa6f5 100644 --- a/locale/ca_ES.po +++ b/locale/ca_ES.po @@ -256,7 +256,7 @@ msgstr "Adreces" msgctxt "field:sale.shop,company_party:" msgid "" -msgstr " " +msgstr "" msgctxt "model:close.statement.done,name:" msgid "Close Statement" From 77d8e5ee107880aea5502561a2027e2e294695bc Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 28 Sep 2015 23:10:34 +0200 Subject: [PATCH 05/15] Increase version number --- tryton.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton.cfg b/tryton.cfg index 9a0e2fb..7a92912 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=3.6.0 +version=3.7.0 depends: account_statement sale_shop From 110e47b2dd726e4b3c309543471a7286983968be Mon Sep 17 00:00:00 2001 From: resteve Date: Tue, 29 Sep 2015 16:29:17 +0200 Subject: [PATCH 06/15] Rename ir.module.module to ir.module --- tests/scenario_sale_payment.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scenario_sale_payment.rst b/tests/scenario_sale_payment.rst index e7bee16..6cf13df 100644 --- a/tests/scenario_sale_payment.rst +++ b/tests/scenario_sale_payment.rst @@ -18,10 +18,10 @@ Create database:: Install sale:: - >>> Module = Model.get('ir.module.module') + >>> Module = Model.get('ir.module') >>> module, = Module.find([('name', '=', 'sale_payment')]) >>> module.click('install') - >>> Wizard('ir.module.module.install_upgrade').execute('upgrade') + >>> Wizard('ir.module.install_upgrade').execute('upgrade') Create company:: From 66295877dfbfa361cd60d8f0f3d823f2b8ff1864 Mon Sep 17 00:00:00 2001 From: resteve Date: Sun, 4 Oct 2015 23:25:00 +0200 Subject: [PATCH 07/15] Remove '_' in button string https://bugs.tryton.org/issue5012 --- view/sale_form.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/sale_form.xml b/view/sale_form.xml index a8b47c6..3a17234 100644 --- a/view/sale_form.xml +++ b/view/sale_form.xml @@ -11,7 +11,7 @@ copyright notices and license terms. --> -