Merge lp:~factorlibre/sale-wkfl/sale-wkfl-7-partnerrisk-partnerinsurance into lp:~sale-core-editors/sale-wkfl/7.0

Proposed by Alberto Garcia (Factor Libre)
Status: Needs review
Proposed branch: lp:~factorlibre/sale-wkfl/sale-wkfl-7-partnerrisk-partnerinsurance
Merge into: lp:~sale-core-editors/sale-wkfl/7.0
Diff against target: 2282 lines (+2163/-0)
23 files modified
partner_risk/__init__.py (+28/-0)
partner_risk/__openerp__.py (+31/-0)
partner_risk/i18n/ca.po (+197/-0)
partner_risk/i18n/es.po (+193/-0)
partner_risk/i18n/gl.po (+194/-0)
partner_risk/i18n/nan_partner_risk.pot (+177/-0)
partner_risk/risk.py (+260/-0)
partner_risk/risk_view.xml (+26/-0)
partner_risk/sale_view.xml (+33/-0)
partner_risk/sale_workflow.xml (+49/-0)
partner_risk/wizard/__init__.py (+22/-0)
partner_risk/wizard/open_risk_window.py (+64/-0)
partner_risk/wizard/open_risk_window_view.xml (+36/-0)
partner_risk_insurance/__init__.py (+24/-0)
partner_risk_insurance/__openerp__.py (+22/-0)
partner_risk_insurance/i18n/ca.po (+126/-0)
partner_risk_insurance/i18n/ca_ES.po (+117/-0)
partner_risk_insurance/i18n/es.po (+124/-0)
partner_risk_insurance/i18n/es_ES.po (+116/-0)
partner_risk_insurance/i18n/nan_partner_risk_insurance.pot (+112/-0)
partner_risk_insurance/i18n/pt.po (+127/-0)
partner_risk_insurance/partner.py (+47/-0)
partner_risk_insurance/partner_view.xml (+38/-0)
To merge this branch: bzr merge lp:~factorlibre/sale-wkfl/sale-wkfl-7-partnerrisk-partnerinsurance
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Needs Resubmitting
Yannick Vaucher @ Camptocamp Needs Fixing
Review via email: mp+209204@code.launchpad.net

Description of the change

Add 2 modules ported to openerp 7. Partner_risk y partner_risk_insurande

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Alberto, I think you haven't made "bzr add" before comitting, because there is no new revision with mentioned modules.

Regards.

37. By Alberto Garcia (Factor Libre)

Add partner_risk and partner_risk_insurance

Revision history for this message
Alberto Garcia (Factor Libre) (agarcia-flibre) wrote :

Any change fot this?

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Sorry, Alberto, I didn't see it, but if you don't write on the MP, anyone is notified about changes, so this is the first time I see that you have uploaded the modules. I'll see them soon and comment you back.

Regards.

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Hello Alberto,

Please adapt the code to community standards:

osv.osv -> orm.Model
PEP8
replacement of mx.Datetime by datetime

ll.912 + 963 + 1114 ..

You can remove the class calls.

Cheers,

review: Needs Fixing
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

This project is now hosted on https://github.com/OCA/sale-workflow. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

review: Needs Resubmitting

Unmerged revisions

37. By Alberto Garcia (Factor Libre)

Add partner_risk and partner_risk_insurance

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'partner_risk'
=== added file 'partner_risk/__init__.py'
--- partner_risk/__init__.py 1970-01-01 00:00:00 +0000
+++ partner_risk/__init__.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,28 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2009 Albert Cervera i Areny (http://www.nan-tic.com). All Rights Reserved
6# Copyright (c) 2011 Pexego Sistemas Informáticos. All Rights Reserved
7# Alberto Luengo Cabanillas <alberto@pexego.es>
8# Copyright (c) 2014 Factor Libre SL. All Rights Reserved
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23##############################################################################
24
25from . import wizard
26from . import risk
27
28
029
=== added file 'partner_risk/__openerp__.py'
--- partner_risk/__openerp__.py 1970-01-01 00:00:00 +0000
+++ partner_risk/__openerp__.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,31 @@
1# -*- encoding: utf-8 -*-
2{
3 "name" : "Partner Risk Analysis",
4 "version" : "0.1",
5 "description" : """This module adds a new button in the partner form to analyze current state of a partner risk.
6It reports current information regarding amount of debt in invoices, orders, etc.
7
8It also modifies the workflow of sale orders by adding a new step when partner's risk is exceeded.
9
10--Module of nan-tic nan_partner_risk ported by Factor Libre to OpenERP 7
11""",
12 "author" : "Factor Libre S.L, NaN·tic",
13 "website" : "http://www.factorlibre.com",
14 "depends" : [
15 'base',
16 'account',
17 'sale_stock',
18 'account_payment',
19 ],
20 "category" : "Custom Modules",
21 "init_xml" : [],
22 "demo_xml" : [],
23 "update_xml" : [
24 'wizard/open_risk_window_view.xml',
25 'risk_view.xml',
26 'sale_view.xml',
27 'sale_workflow.xml'
28 ],
29 "active": False,
30 "installable": True
31}
032
=== added directory 'partner_risk/i18n'
=== added file 'partner_risk/i18n/ca.po'
--- partner_risk/i18n/ca.po 1970-01-01 00:00:00 +0000
+++ partner_risk/i18n/ca.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,197 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk
4#
5# Albert Cervera i Areny <albert@nan-tic.com>, 2009.
6msgid ""
7msgstr ""
8"Project-Id-Version: OpenERP Server 5.0.5-bzr\n"
9"Report-Msgid-Bugs-To: support@openerp.com\n"
10"POT-Creation-Date: 2011-04-19 14:12+0000\n"
11"PO-Revision-Date: 2012-03-06 23:49+0000\n"
12"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
13"<jesteve@zikzakmedia.com>\n"
14"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=UTF-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18"X-Launchpad-Export-Date: 2012-08-28 08:38+0000\n"
19"X-Generator: Launchpad (build 15864)\n"
20"Language: ca\n"
21
22#. module: nan_partner_risk
23#: code:addons/nan_partner_risk/risk.py:241
24#: field:open.risk.window,draft_invoices_amount:0
25#: field:res.partner,draft_invoices_amount:0
26#, python-format
27msgid "Draft Invoices"
28msgstr "Factures esborrany"
29
30#. module: nan_partner_risk
31#: code:addons/nan_partner_risk/risk.py:244
32#: field:open.risk.window,total_debt:0
33#: field:res.partner,total_debt:0
34#, python-format
35msgid "Total Debt"
36msgstr "Deute total"
37
38#. module: nan_partner_risk
39#: view:sale.order:0
40msgid "Approve Order"
41msgstr "Aprova la comanda"
42
43#. module: nan_partner_risk
44#: code:addons/nan_partner_risk/risk.py:240
45#: field:res.partner,pending_amount:0
46#, python-format
47msgid "Unexpired Pending Payments"
48msgstr "Efectes pendents no vençuts"
49
50#. module: nan_partner_risk
51#: model:ir.actions.wizard,name:nan_partner_risk.open_risk_wizard
52#: view:res.partner:0
53msgid "View Risk Information"
54msgstr "Veure la informació del risc"
55
56#. module: nan_partner_risk
57#: code:addons/nan_partner_risk/risk.py:246
58#: field:open.risk.window,total_risk_percent:0
59#: field:res.partner,total_risk_percent:0
60#, python-format
61msgid "Credit Usage (%)"
62msgstr "Ús del crèdit (%)"
63
64#. module: nan_partner_risk
65#: sql_constraint:sale.order:0
66msgid "Order Reference must be unique !"
67msgstr "La referència de la comanda ha de ser única!"
68
69#. module: nan_partner_risk
70#: model:ir.actions.act_window,name:nan_partner_risk.action_open_risk_window
71msgid "Show Partner Risk Information"
72msgstr "Mostra informació del risc comptable d'una empresa"
73
74#. module: nan_partner_risk
75#: view:sale.order:0
76msgid "Confirm Order"
77msgstr "Confirma la comanda"
78
79#. module: nan_partner_risk
80#: code:addons/nan_partner_risk/risk.py:245
81#: field:open.risk.window,available_risk:0
82#: field:res.partner,available_risk:0
83#, python-format
84msgid "Available Credit"
85msgstr "Crèdit disponible"
86
87#. module: nan_partner_risk
88#: field:open.risk.window,pending_amount:0
89msgid "Unexpired Unpaid Payments"
90msgstr "Efectes impagats no vençuts"
91
92#. module: nan_partner_risk
93#: view:sale.order:0
94msgid "Cancel Order"
95msgstr "Cancel·la la comanda"
96
97#. module: nan_partner_risk
98#: field:sale.order,amount_invoiced:0
99#: field:sale.order.line,amount_invoiced:0
100msgid "Invoiced Amount"
101msgstr "Import facturat"
102
103#. module: nan_partner_risk
104#: code:addons/nan_partner_risk/risk.py:239
105#: field:open.risk.window,unpayed_amount:0
106#: field:res.partner,unpayed_amount:0
107#, python-format
108msgid "Expired Unpaid Payments"
109msgstr "Efectes impagats vençuts"
110
111#. module: nan_partner_risk
112#: code:addons/nan_partner_risk/risk.py:97
113#, python-format
114msgid ""
115"Gives the state of the quotation or sale order. The exception state is "
116"automatically set when a cancel operation occurs in the invoice validation "
117"(Invoice Exception) or in the packing list process (Shipping Exception). The "
118"'Waiting Schedule' state is set when the invoice is confirmed but waiting "
119"for the scheduler to run on the date 'Date Ordered'."
120msgstr ""
121"Mostra l'estat del pressupost o comanda de venda. L'estat 'Excepció' es posa "
122"automàticament quan succeeix una operació de cancel·lació durant la "
123"validació de la factura (Excepció de Factura) o en el procés d'emetre "
124"l'albarà (Excepció d'albarà). L'estat 'Esperant planificació' es posa quan "
125"la factura està confirmada però esperant el planificador per llançar-la el "
126"dia 'Data comanda'."
127
128#. module: nan_partner_risk
129#: code:addons/nan_partner_risk/risk.py:242
130#: field:open.risk.window,circulating_amount:0
131#: field:res.partner,circulating_amount:0
132#, python-format
133msgid "Payments Sent to Bank"
134msgstr "Efectes en circulació"
135
136#. module: nan_partner_risk
137#: code:addons/nan_partner_risk/risk.py:65
138#, python-format
139msgid "Credit Limit Exceeded"
140msgstr "S'ha excedit el crèdit concedit"
141
142#. module: nan_partner_risk
143#: view:create.project.from.sale:0
144msgid "Partner Risk Information"
145msgstr "Informació risc comptable empresa"
146
147#. module: nan_partner_risk
148#: view:sale.order:0
149msgid "Waiting Risk Approval"
150msgstr "Esperant l'aprovació del risc"
151
152#. module: nan_partner_risk
153#: model:ir.model,name:nan_partner_risk.model_open_risk_window
154msgid "open.risk.window"
155msgstr "open.risk.window"
156
157#. module: nan_partner_risk
158#: code:addons/nan_partner_risk/risk.py:66
159#, python-format
160msgid ""
161"Warning: Credit Limit Exceeded.\n"
162"\n"
163"This partner has a credit limit of %(limit).2f and already has a debt of "
164"%(debt).2f."
165msgstr ""
166"Advertència: S'ha excedit el crèdit concedit.\n"
167"\n"
168"Aquesta empresa té un crèdit concedit màxim de %(limit).2f i ja té un deute "
169"de %(debt).2f."
170
171#. module: nan_partner_risk
172#: field:open.risk.window,credit_limit:0
173msgid "Credit Limit"
174msgstr "Crèdit concedit"
175
176#. module: nan_partner_risk
177#: code:addons/nan_partner_risk/risk.py:243
178#: field:open.risk.window,pending_orders_amount:0
179#: field:res.partner,pending_orders_amount:0
180#, python-format
181msgid "Uninvoiced Orders"
182msgstr "Comandes pendents de facturar"
183
184#. module: nan_partner_risk
185#: model:ir.model,name:nan_partner_risk.model_res_partner
186msgid "Partner"
187msgstr "Empresa"
188
189#. module: nan_partner_risk
190#: model:ir.model,name:nan_partner_risk.model_sale_order
191msgid "Sales Order"
192msgstr "Comanda de venda"
193
194#. module: nan_partner_risk
195#: model:ir.model,name:nan_partner_risk.model_sale_order_line
196msgid "Sales Order Line"
197msgstr "Línia comanda de venda"
0198
=== added file 'partner_risk/i18n/es.po'
--- partner_risk/i18n/es.po 1970-01-01 00:00:00 +0000
+++ partner_risk/i18n/es.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,193 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * partner_risk
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2014-02-19 09:56+0000\n"
10"PO-Revision-Date: 2014-02-19 09:56+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: partner_risk
19#: code:addons/partner_risk/risk.py:251
20#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_draft_invoices_amount
21#: model:ir.model.fields,field_description:partner_risk.field_res_partner_draft_invoices_amount
22#: field:open.risk.window,draft_invoices_amount:0
23#: field:res.partner,draft_invoices_amount:0
24#, python-format
25msgid "Draft Invoices"
26msgstr "Facturas en borrador"
27
28#. module: partner_risk
29#: code:addons/partner_risk/risk.py:254
30#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_total_debt
31#: model:ir.model.fields,field_description:partner_risk.field_res_partner_total_debt
32#: field:open.risk.window,total_debt:0
33#: field:res.partner,total_debt:0
34#, python-format
35msgid "Total Debt"
36msgstr "Deuda total"
37
38#. module: partner_risk
39#: view:sale.order:0
40msgid "Approve Order"
41msgstr "Aprobar el pedido"
42
43#. module: partner_risk
44#: code:addons/partner_risk/risk.py:250
45#: model:ir.model.fields,field_description:partner_risk.field_res_partner_pending_amount
46#: field:res.partner,pending_amount:0
47#, python-format
48msgid "Unexpired Pending Payments"
49msgstr "Efectos pendientes no vencidos"
50
51#. module: partner_risk
52#: model:ir.actions.wizard,name:partner_risk.open_risk_wizard
53#: view:res.partner:0
54msgid "View Risk Information"
55msgstr "Ver información del riesgo"
56
57#. module: partner_risk
58#: code:addons/partner_risk/risk.py:256
59#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_total_risk_percent
60#: model:ir.model.fields,field_description:partner_risk.field_res_partner_total_risk_percent
61#: field:open.risk.window,total_risk_percent:0
62#: field:res.partner,total_risk_percent:0
63#, python-format
64msgid "Credit Usage (%)"
65msgstr "Uso del crédito (%)"
66
67#. module: partner_risk
68#: model:ir.actions.act_window,name:partner_risk.action_open_risk_window
69msgid "Show Partner Risk Information"
70msgstr "Ver Información Riesgo Partner"
71
72#. module: partner_risk
73#: view:sale.order:0
74msgid "Confirm Order"
75msgstr "Confirmar pedido"
76
77#. module: partner_risk
78#: code:addons/partner_risk/risk.py:255
79#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_available_risk
80#: model:ir.model.fields,field_description:partner_risk.field_res_partner_available_risk
81#: field:open.risk.window,available_risk:0
82#: field:res.partner,available_risk:0
83#, python-format
84msgid "Available Credit"
85msgstr "Crédito disponible"
86
87#. module: partner_risk
88#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_pending_amount
89#: field:open.risk.window,pending_amount:0
90msgid "Unexpired Unpaid Payments"
91msgstr "Efectos impagados no vencidos"
92
93#. module: partner_risk
94#: model:ir.model,name:partner_risk.model_open_risk_window
95msgid "Partner's risk information"
96msgstr "Información Riesgo Partner"
97
98#. module: partner_risk
99#: view:sale.order:0
100msgid "Cancel Order"
101msgstr "Cancelar pedido"
102
103#. module: partner_risk
104#: model:ir.model.fields,field_description:partner_risk.field_sale_order_amount_invoiced
105#: model:ir.model.fields,field_description:partner_risk.field_sale_order_line_amount_invoiced
106#: field:sale.order,amount_invoiced:0
107#: field:sale.order.line,amount_invoiced:0
108msgid "Invoiced Amount"
109msgstr "Importe facturado"
110
111#. module: partner_risk
112#: code:addons/partner_risk/risk.py:249
113#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_unpayed_amount
114#: model:ir.model.fields,field_description:partner_risk.field_res_partner_unpayed_amount
115#: field:open.risk.window,unpayed_amount:0
116#: field:res.partner,unpayed_amount:0
117#, python-format
118msgid "Expired Unpaid Payments"
119msgstr "Efectos impagados vencidos"
120
121#. module: partner_risk
122#: code:addons/partner_risk/risk.py:252
123#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_circulating_amount
124#: model:ir.model.fields,field_description:partner_risk.field_res_partner_circulating_amount
125#: field:open.risk.window,circulating_amount:0
126#: field:res.partner,circulating_amount:0
127#, python-format
128msgid "Payments Sent to Bank"
129msgstr "Efectos en circulación"
130
131#. module: partner_risk
132#: model:res.groups,name:partner_risk.group_risk_manager
133msgid "Risk Manager"
134msgstr "Gestión Riesgo"
135
136#. module: partner_risk
137#: code:addons/partner_risk/risk.py:69
138#, python-format
139msgid "Credit Limit Exceeded"
140msgstr "Limite Credito Excedido"
141
142#. module: partner_risk
143#: view:open.risk.window:0
144msgid "Partner Risk Information"
145msgstr "Información Riesgo Partner"
146
147#. module: partner_risk
148#: selection:sale.order,state:0
149#: view:sale.order:0
150msgid "Waiting Risk Approval"
151msgstr "Esperando aprobación de riesgo"
152
153#. module: partner_risk
154#: code:addons/partner_risk/risk.py:70
155#, python-format
156msgid "Warning: Credit Limit Exceeded.\n"
157"\n"
158"This partner has a credit limit of %(limit).2f and already has a debt of %(debt).2f."
159msgstr "Advertencia: Límite credito excedido.\n"
160"\n"
161"Este partner tiene un crédito de %(limit).2f y ya tiene una deuda de %(debt).2f."
162
163#. module: partner_risk
164#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_credit_limit
165#: field:open.risk.window,credit_limit:0
166msgid "Credit Limit"
167msgstr "Límite de crédito"
168
169#. module: partner_risk
170#: code:addons/partner_risk/risk.py:253
171#: model:ir.model.fields,field_description:partner_risk.field_open_risk_window_pending_orders_amount
172#: model:ir.model.fields,field_description:partner_risk.field_res_partner_pending_orders_amount
173#: field:open.risk.window,pending_orders_amount:0
174#: field:res.partner,pending_orders_amount:0
175#, python-format
176msgid "Uninvoiced Orders"
177msgstr "Pedidos de venta sin facturar"
178
179#. module: partner_risk
180#: model:ir.model,name:partner_risk.model_res_partner
181msgid "Partner"
182msgstr "Empresa"
183
184#. module: partner_risk
185#: model:ir.model,name:partner_risk.model_sale_order
186msgid "Sales Order"
187msgstr "Pedido de venta"
188
189#. module: partner_risk
190#: model:ir.model,name:partner_risk.model_sale_order_line
191msgid "Sales Order Line"
192msgstr "Línea pedido de venta"
193
0194
=== added file 'partner_risk/i18n/gl.po'
--- partner_risk/i18n/gl.po 1970-01-01 00:00:00 +0000
+++ partner_risk/i18n/gl.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,194 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.2\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-04-19 14:12+0000\n"
10"PO-Revision-Date: 2011-10-06 09:09+0000\n"
11"Last-Translator: Alberto Luengo Cabanillas (Pexego) <alberto@pexego.es>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2012-08-28 08:38+0000\n"
17"X-Generator: Launchpad (build 15864)\n"
18
19#. module: nan_partner_risk
20#: code:addons/nan_partner_risk/risk.py:241
21#: field:open.risk.window,draft_invoices_amount:0
22#: field:res.partner,draft_invoices_amount:0
23#, python-format
24msgid "Draft Invoices"
25msgstr "Facturas en Borrador"
26
27#. module: nan_partner_risk
28#: code:addons/nan_partner_risk/risk.py:244
29#: field:open.risk.window,total_debt:0
30#: field:res.partner,total_debt:0
31#, python-format
32msgid "Total Debt"
33msgstr "Débeda Total"
34
35#. module: nan_partner_risk
36#: view:sale.order:0
37msgid "Approve Order"
38msgstr "Aprobalo pedido"
39
40#. module: nan_partner_risk
41#: code:addons/nan_partner_risk/risk.py:240
42#: field:res.partner,pending_amount:0
43#, python-format
44msgid "Unexpired Pending Payments"
45msgstr "Pagamentos Pendentes sen Expirar"
46
47#. module: nan_partner_risk
48#: model:ir.actions.wizard,name:nan_partner_risk.open_risk_wizard
49#: view:res.partner:0
50msgid "View Risk Information"
51msgstr "Ver información do risco"
52
53#. module: nan_partner_risk
54#: code:addons/nan_partner_risk/risk.py:246
55#: field:open.risk.window,total_risk_percent:0
56#: field:res.partner,total_risk_percent:0
57#, python-format
58msgid "Credit Usage (%)"
59msgstr "Uso do Crédito (%)"
60
61#. module: nan_partner_risk
62#: sql_constraint:sale.order:0
63msgid "Order Reference must be unique !"
64msgstr "¡A referencia del pedido debe ser única!"
65
66#. module: nan_partner_risk
67#: model:ir.actions.act_window,name:nan_partner_risk.action_open_risk_window
68msgid "Show Partner Risk Information"
69msgstr "Amosa información do risco contable dunha empresa"
70
71#. module: nan_partner_risk
72#: view:sale.order:0
73msgid "Confirm Order"
74msgstr "Confirmar pedido"
75
76#. module: nan_partner_risk
77#: code:addons/nan_partner_risk/risk.py:245
78#: field:open.risk.window,available_risk:0
79#: field:res.partner,available_risk:0
80#, python-format
81msgid "Available Credit"
82msgstr "Crédito Disponible"
83
84#. module: nan_partner_risk
85#: field:open.risk.window,pending_amount:0
86msgid "Unexpired Unpaid Payments"
87msgstr "Pagamentos non satisfeitos sen expirar"
88
89#. module: nan_partner_risk
90#: view:sale.order:0
91msgid "Cancel Order"
92msgstr "Cancelar pedido"
93
94#. module: nan_partner_risk
95#: field:sale.order,amount_invoiced:0
96#: field:sale.order.line,amount_invoiced:0
97msgid "Invoiced Amount"
98msgstr "Importe facturado"
99
100#. module: nan_partner_risk
101#: code:addons/nan_partner_risk/risk.py:239
102#: field:open.risk.window,unpayed_amount:0
103#: field:res.partner,unpayed_amount:0
104#, python-format
105msgid "Expired Unpaid Payments"
106msgstr "Pagos Non Satisfeitos Expirados"
107
108#. module: nan_partner_risk
109#: code:addons/nan_partner_risk/risk.py:97
110#, python-format
111msgid ""
112"Gives the state of the quotation or sale order. The exception state is "
113"automatically set when a cancel operation occurs in the invoice validation "
114"(Invoice Exception) or in the packing list process (Shipping Exception). The "
115"'Waiting Schedule' state is set when the invoice is confirmed but waiting "
116"for the scheduler to run on the date 'Date Ordered'."
117msgstr ""
118"Amosa o estado do presuposto ou orde de venta. O estado de excepción dase "
119"automáticamente cando ocurre unha operación de cancelación na validación da "
120"factura (Excepción de Factura) ou no proceso de emitilo albarán (Excepción "
121"de Albarán). O estado 'Agardando Planificación' dase cando a factura está "
122"confirmada pero agardando polo planificador para executarse na data 'Data de "
123"Pedido'."
124
125#. module: nan_partner_risk
126#: code:addons/nan_partner_risk/risk.py:242
127#: field:open.risk.window,circulating_amount:0
128#: field:res.partner,circulating_amount:0
129#, python-format
130msgid "Payments Sent to Bank"
131msgstr "Pagamentos enviados ó banco"
132
133#. module: nan_partner_risk
134#: code:addons/nan_partner_risk/risk.py:65
135#, python-format
136msgid "Credit Limit Exceeded"
137msgstr "Excedeuse o crédito concedido"
138
139#. module: nan_partner_risk
140#: view:create.project.from.sale:0
141msgid "Partner Risk Information"
142msgstr "Información Risco Contable Empresa"
143
144#. module: nan_partner_risk
145#: view:sale.order:0
146msgid "Waiting Risk Approval"
147msgstr "Agardando Aprobación de Risco"
148
149#. module: nan_partner_risk
150#: model:ir.model,name:nan_partner_risk.model_open_risk_window
151msgid "open.risk.window"
152msgstr "open.risk.window"
153
154#. module: nan_partner_risk
155#: code:addons/nan_partner_risk/risk.py:66
156#, python-format
157msgid ""
158"Warning: Credit Limit Exceeded.\n"
159"\n"
160"This partner has a credit limit of %(limit).2f and already has a debt of "
161"%(debt).2f."
162msgstr ""
163"Advertencia: Excedeuse o crédito concedido.\n"
164"\n"
165"Esta empresa ten un límite de crédito de %(limit).2f e xa ten unha débeda de "
166"%(debt).2f."
167
168#. module: nan_partner_risk
169#: field:open.risk.window,credit_limit:0
170msgid "Credit Limit"
171msgstr "Límite de Crédito"
172
173#. module: nan_partner_risk
174#: code:addons/nan_partner_risk/risk.py:243
175#: field:open.risk.window,pending_orders_amount:0
176#: field:res.partner,pending_orders_amount:0
177#, python-format
178msgid "Uninvoiced Orders"
179msgstr "Pedidos de venta sen facturar"
180
181#. module: nan_partner_risk
182#: model:ir.model,name:nan_partner_risk.model_res_partner
183msgid "Partner"
184msgstr "Empresa"
185
186#. module: nan_partner_risk
187#: model:ir.model,name:nan_partner_risk.model_sale_order
188msgid "Sales Order"
189msgstr "Pedido de venta"
190
191#. module: nan_partner_risk
192#: model:ir.model,name:nan_partner_risk.model_sale_order_line
193msgid "Sales Order Line"
194msgstr "Liña pedido de venta"
0195
=== added file 'partner_risk/i18n/nan_partner_risk.pot'
--- partner_risk/i18n/nan_partner_risk.pot 1970-01-01 00:00:00 +0000
+++ partner_risk/i18n/nan_partner_risk.pot 2014-03-04 09:42:58 +0000
@@ -0,0 +1,177 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.2\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-04-19 14:12+0000\n"
10"PO-Revision-Date: 2011-04-19 16:17+0100\n"
11"Last-Translator: Alberto <alberto@pexego.es>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17
18#. module: nan_partner_risk
19#: code:addons/nan_partner_risk/risk.py:241
20#: field:open.risk.window,draft_invoices_amount:0
21#: field:res.partner,draft_invoices_amount:0
22#, python-format
23msgid "Draft Invoices"
24msgstr ""
25
26#. module: nan_partner_risk
27#: code:addons/nan_partner_risk/risk.py:244
28#: field:open.risk.window,total_debt:0
29#: field:res.partner,total_debt:0
30#, python-format
31msgid "Total Debt"
32msgstr ""
33
34#. module: nan_partner_risk
35#: view:sale.order:0
36msgid "Approve Order"
37msgstr ""
38
39#. module: nan_partner_risk
40#: code:addons/nan_partner_risk/risk.py:240
41#: field:res.partner,pending_amount:0
42#, python-format
43msgid "Unexpired Pending Payments"
44msgstr ""
45
46#. module: nan_partner_risk
47#: model:ir.actions.wizard,name:nan_partner_risk.open_risk_wizard
48#: view:res.partner:0
49msgid "View Risk Information"
50msgstr ""
51
52#. module: nan_partner_risk
53#: code:addons/nan_partner_risk/risk.py:246
54#: field:open.risk.window,total_risk_percent:0
55#: field:res.partner,total_risk_percent:0
56#, python-format
57msgid "Credit Usage (%)"
58msgstr ""
59
60#. module: nan_partner_risk
61#: sql_constraint:sale.order:0
62msgid "Order Reference must be unique !"
63msgstr ""
64
65#. module: nan_partner_risk
66#: model:ir.actions.act_window,name:nan_partner_risk.action_open_risk_window
67msgid "Show Partner Risk Information"
68msgstr ""
69
70#. module: nan_partner_risk
71#: view:sale.order:0
72msgid "Confirm Order"
73msgstr ""
74
75#. module: nan_partner_risk
76#: code:addons/nan_partner_risk/risk.py:245
77#: field:open.risk.window,available_risk:0
78#: field:res.partner,available_risk:0
79#, python-format
80msgid "Available Credit"
81msgstr ""
82
83#. module: nan_partner_risk
84#: field:open.risk.window,pending_amount:0
85msgid "Unexpired Unpaid Payments"
86msgstr ""
87
88#. module: nan_partner_risk
89#: view:sale.order:0
90msgid "Cancel Order"
91msgstr ""
92
93#. module: nan_partner_risk
94#: field:sale.order,amount_invoiced:0
95#: field:sale.order.line,amount_invoiced:0
96msgid "Invoiced Amount"
97msgstr ""
98
99#. module: nan_partner_risk
100#: code:addons/nan_partner_risk/risk.py:239
101#: field:open.risk.window,unpayed_amount:0
102#: field:res.partner,unpayed_amount:0
103#, python-format
104msgid "Expired Unpaid Payments"
105msgstr ""
106
107#. module: nan_partner_risk
108#: code:addons/nan_partner_risk/risk.py:97
109#, python-format
110msgid "Gives the state of the quotation or sale order. The exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the packing list process (Shipping Exception). The 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the date 'Date Ordered'."
111msgstr ""
112
113#. module: nan_partner_risk
114#: code:addons/nan_partner_risk/risk.py:242
115#: field:open.risk.window,circulating_amount:0
116#: field:res.partner,circulating_amount:0
117#, python-format
118msgid "Payments Sent to Bank"
119msgstr ""
120
121#. module: nan_partner_risk
122#: code:addons/nan_partner_risk/risk.py:65
123#, python-format
124msgid "Credit Limit Exceeded"
125msgstr ""
126
127#. module: nan_partner_risk
128#: view:create.project.from.sale:0
129msgid "Partner Risk Information"
130msgstr ""
131
132#. module: nan_partner_risk
133#: view:sale.order:0
134msgid "Waiting Risk Approval"
135msgstr ""
136
137#. module: nan_partner_risk
138#: model:ir.model,name:nan_partner_risk.model_open_risk_window
139msgid "open.risk.window"
140msgstr ""
141
142#. module: nan_partner_risk
143#: code:addons/nan_partner_risk/risk.py:66
144#, python-format
145msgid ""
146"Warning: Credit Limit Exceeded.\n"
147"\n"
148"This partner has a credit limit of %(limit).2f and already has a debt of %(debt).2f."
149msgstr ""
150
151#. module: nan_partner_risk
152#: field:open.risk.window,credit_limit:0
153msgid "Credit Limit"
154msgstr ""
155
156#. module: nan_partner_risk
157#: code:addons/nan_partner_risk/risk.py:243
158#: field:open.risk.window,pending_orders_amount:0
159#: field:res.partner,pending_orders_amount:0
160#, python-format
161msgid "Uninvoiced Orders"
162msgstr ""
163
164#. module: nan_partner_risk
165#: model:ir.model,name:nan_partner_risk.model_res_partner
166msgid "Partner"
167msgstr ""
168
169#. module: nan_partner_risk
170#: model:ir.model,name:nan_partner_risk.model_sale_order
171msgid "Sales Order"
172msgstr ""
173
174#. module: nan_partner_risk
175#: model:ir.model,name:nan_partner_risk.model_sale_order_line
176msgid "Sales Order Line"
177msgstr ""
0178
=== added file 'partner_risk/risk.py'
--- partner_risk/risk.py 1970-01-01 00:00:00 +0000
+++ partner_risk/risk.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,260 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2009 Albert Cervera i Areny (http://www.nan-tic.com). All Rights Reserved
6# Copyright (c) 2011 Pexego Sistemas Informáticos. All Rights Reserved
7# Alberto Luengo Cabanillas <alberto@pexego.es>
8# Copyright (c) 2014 Factor Libre SL. All Rights Reserved
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23##############################################################################
24
25from openerp.osv import osv, fields
26from mx.DateTime import now
27from tools.translate import _
28
29class sale_order_line(osv.osv):
30 _name = 'sale.order.line'
31 _inherit = 'sale.order.line'
32
33 def _amount_invoiced(self, cr, uid, ids, field_name, arg, context):
34 result = {}
35 for line in self.browse(cr, uid, ids, context):
36 # Calculate invoiced amount with taxes included.
37 # Note that if a line is only partially invoiced we consider
38 # the invoiced amount 0.
39 # The problem is we can't easily know if the user changed amounts
40 # once the invoice was created
41 if line.invoiced:
42 result[line.id] = line.price_subtotal + self._tax_amount(cr, uid, line)
43 else:
44 result[line.id] = 0.0
45 return result
46
47 def _tax_amount(self, cr, uid, line):
48 val = 0.0
49 for c in self.pool.get('account.tax').compute_all(cr, uid, line.tax_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.product_uom_qty, line.order_id.partner_invoice_id.id, line.product_id, line.order_id.partner_id)['taxes']:
50 val += c['amount']
51 return val
52
53 _columns = {
54 'amount_invoiced': fields.function(_amount_invoiced, method=True, string='Invoiced Amount', type='float'),
55 }
56sale_order_line()
57
58class sale_order(osv.osv):
59 _inherit = 'sale.order'
60
61 # Inherited onchange function
62 def onchange_partner_id(self, cr, uid, ids, part, context=None):
63
64 result = super(sale_order,self).onchange_partner_id(cr, uid, ids, part, context)
65 if part:
66 partner = self.pool.get('res.partner').browse(cr, uid, part)
67 if partner.available_risk < 0.0:
68 result['warning'] = {
69 'title': _('Credit Limit Exceeded'),
70 'message': _('Warning: Credit Limit Exceeded.\n\nThis partner has a credit limit of %(limit).2f and already has a debt of %(debt).2f.') % {
71 'limit': partner.credit_limit,
72 'debt': partner.total_debt,
73 }
74 }
75 return result
76
77 def _amount_invoiced(self, cr, uid, ids, field_name, arg, context):
78 result = {}
79 for order in self.browse(cr, uid, ids, context):
80 if order.invoiced:
81 amount = order.amount_total
82 else:
83 amount = 0.0
84 for line in order.order_line:
85 amount += line.amount_invoiced
86 result[order.id] = amount
87 return result
88
89 _columns = {
90 'amount_invoiced': fields.function(_amount_invoiced, method=True, string='Invoiced Amount', type='float'),
91 'state': fields.selection([
92 ('draft', 'Draft Quotation'),
93 ('sent', 'Quotation Sent'),
94 ('cancel', 'Cancelled'),
95 ('waiting_date', 'Waiting Schedule'),
96 ('progress', 'Sales Order'),
97 ('manual', 'Sale to Invoice'),
98 ('shipping_except', 'Shipping Exception'),
99 ('invoice_except', 'Invoice Exception'),
100 ('done', 'Done'),
101 ('wait_risk', 'Waiting Risk Approval'),
102 ], 'Status', readonly=True,help="Gives the status of the quotation or sales order.\
103 \nThe exception status is automatically set when a cancel operation occurs \
104 in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception).\nThe 'Waiting Schedule' status is set when the invoice is confirmed\
105 but waiting for the scheduler to run on the order date.", select=True),
106 }
107sale_order()
108
109
110class partner(osv.osv):
111 _name = 'res.partner'
112 _inherit = 'res.partner'
113
114 def _unpayed_amount(self, cr, uid, ids, name, arg, context=None):
115 res = {}
116 today = now().strftime('%Y-%m-%d')
117 for partner in self.browse(cr, uid, ids, context):
118 accounts = []
119 if partner.property_account_receivable:
120 accounts.append( partner.property_account_receivable.id )
121 if partner.property_account_payable:
122 accounts.append( partner.property_account_payable.id )
123 line_ids = self.pool.get('account.move.line').search( cr, uid, [
124 ('partner_id','=',partner.id),
125 ('account_id', 'in', accounts),
126 ('reconcile_id','=',False),
127 ('date_maturity','<',today),
128 ], context=context)
129 # Those that have amount_to_pay == 0, will mean that they're circulating. The payment request has been sent
130 # to the bank but have not yet been reconciled (or the date_maturity has not been reached).
131 amount = 0.0
132 for line in self.pool.get('account.move.line').browse( cr, uid, line_ids, context ):
133 #amount += -line.amount_to_pay
134 amount += line.debit - line.credit
135 res[partner.id] = amount
136 return res
137
138 def _circulating_amount(self, cr, uid, ids, name, arg, context=None):
139 res = {}
140 today = now().strftime('%Y-%m-%d')
141 for partner in self.browse(cr, uid, ids, context):
142 accounts = []
143 if partner.property_account_receivable:
144 accounts.append( partner.property_account_receivable.id )
145 if partner.property_account_payable:
146 accounts.append( partner.property_account_payable.id )
147 line_ids = self.pool.get('account.move.line').search( cr, uid, [
148 ('partner_id','=',partner.id),
149 ('account_id', 'in', accounts),
150 ('reconcile_id','=',False),
151 '|', ('date_maturity','>=',today), ('date_maturity','=',False)
152 ], context=context)
153 # Those that have amount_to_pay == 0, will mean that they're circulating. The payment request has been sent
154 # to the bank but have not yet been reconciled (or the date_maturity has not been reached).
155 amount = 0.0
156 for line in self.pool.get('account.move.line').browse( cr, uid, line_ids, context ):
157 #amount += line.debit - line.credit
158 amount += line.debit - line.credit + line.amount_to_pay
159 res[partner.id] = amount
160 return res
161
162 def _pending_amount(self, cr, uid, ids, name, arg, context=None):
163 res = {}
164 today = now().strftime('%Y-%m-%d')
165 for partner in self.browse(cr, uid, ids, context):
166 accounts = []
167 if partner.property_account_receivable:
168 accounts.append( partner.property_account_receivable.id )
169 if partner.property_account_payable:
170 accounts.append( partner.property_account_payable.id )
171 line_ids = self.pool.get('account.move.line').search( cr, uid, [
172 ('partner_id','=',partner.id),
173 ('account_id', 'in', accounts),
174 ('reconcile_id','=',False),
175 '|', ('date_maturity','>=',today), ('date_maturity','=',False)
176 ], context=context)
177 # Those that have amount_to_pay == 0, will mean that they're circulating. The payment request has been sent
178 # to the bank but have not yet been reconciled (or the date_maturity has not been reached).
179 amount = 0.0
180 for line in self.pool.get('account.move.line').browse( cr, uid, line_ids, context ):
181 #amount += line.debit - line.credit
182 amount += -line.amount_to_pay
183 res[partner.id] = amount
184 return res
185
186 def _draft_invoices_amount(self, cr, uid, ids, name, arg, context=None):
187 res = {}
188 today = now().strftime('%Y-%m-%d')
189 for id in ids:
190 invids = self.pool.get('account.invoice').search( cr, uid, [
191 ('partner_id','=',id),
192 ('state','=','draft'),
193 '|', ('date_due','>=',today), ('date_due','=',False)
194 ], context=context )
195 val = 0.0
196 for invoice in self.pool.get('account.invoice').browse( cr, uid, invids, context ):
197 # Note that even if the invoice is in 'draft' state it can have an account.move because it
198 # may have been validated and brought back to draft. Here we'll only consider invoices with
199 # NO account.move as those will be added in other fields.
200 if invoice.move_id:
201 continue
202 if invoice.type in ('out_invoice','in_refund'):
203 val += invoice.amount_total
204 else:
205 val -= invoice.amount_total
206 res[id] = val
207 return res
208
209 def _pending_orders_amount(self, cr, uid, ids, name, arg, context=None):
210 res = {}
211 for id in ids:
212 sids = self.pool.get('sale.order').search( cr, uid, [
213 ('partner_id','=',id),
214 ('state','not in',['draft','cancel','wait_risk'])
215 ], context=context )
216 total = 0.0
217 for order in self.pool.get('sale.order').browse(cr, uid, sids, context):
218 total += order.amount_total - order.amount_invoiced
219 res[id] = total
220 return res
221
222 def _total_debt(self, cr, uid, ids, name, arg, context=None):
223 res = {}
224 for partner in self.browse( cr, uid, ids, context ):
225 pending_orders = partner.pending_orders_amount or 0.0
226 circulating = partner.circulating_amount or 0.0
227 unpayed = partner.unpayed_amount or 0.0
228 pending = partner.pending_amount or 0.0
229 draft_invoices = partner.draft_invoices_amount or 0.0
230 res[partner.id] = pending_orders + circulating + unpayed + pending + draft_invoices
231 return res
232
233 def _available_risk(self, cr, uid, ids, name, arg, context=None):
234 res = {}
235 for partner in self.browse( cr, uid, ids, context ):
236 res[partner.id] = partner.credit_limit - partner.total_debt
237 return res
238
239 def _total_risk_percent(self, cr, uid, ids, name, arg, context=None):
240 res = {}
241 for partner in self.browse( cr, uid, ids, context ):
242 if partner.credit_limit:
243 res[partner.id] = 100.0 * partner.total_debt / partner.credit_limit
244 else:
245 res[partner.id] = 100
246 return res
247
248 _columns = {
249 'unpayed_amount': fields.function(_unpayed_amount, method=True, string=_('Expired Unpaid Payments'), type='float'),
250 'pending_amount': fields.function(_pending_amount, method=True, string=_('Unexpired Pending Payments'), type='float'),
251 'draft_invoices_amount': fields.function(_draft_invoices_amount, method=True, string=_('Draft Invoices'), type='float'),
252 'circulating_amount': fields.function(_circulating_amount, method=True, string=_('Payments Sent to Bank'), type='float'),
253 'pending_orders_amount': fields.function(_pending_orders_amount, method=True, string=_('Uninvoiced Orders'), type='float'),
254 'total_debt': fields.function(_total_debt, method=True, string=_('Total Debt'), type='float'),
255 'available_risk': fields.function(_available_risk, method=True, string=_('Available Credit'), type='float'),
256 'total_risk_percent': fields.function(_total_risk_percent, method=True, string=_('Credit Usage (%)'), type='float')
257 }
258partner()
259
260# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0261
=== added file 'partner_risk/risk_view.xml'
--- partner_risk/risk_view.xml 1970-01-01 00:00:00 +0000
+++ partner_risk/risk_view.xml 2014-03-04 09:42:58 +0000
@@ -0,0 +1,26 @@
1<?xml version="1.0"?>
2<openerp>
3<data>
4
5 <record model="ir.actions.wizard" id="open_risk_wizard">
6 <field name="name">View Risk Information</field>
7 <field name="wiz_name">open_risk_window</field>
8 </record>
9
10 <!--
11 Add risk button in partner form.
12 -->
13 <record model="ir.ui.view" id="view_partner_form">
14 <field name="name">res.partner.form.risk</field>
15 <field name="model">res.partner</field>
16 <field name="type">form</field>
17 <field name="inherit_id" ref="base.view_partner_form"/>
18 <field name="arch" type="xml">
19 <field name="credit_limit" position="after">
20 <button string="View Risk Information" name="%(action_open_risk_window)d"
21 icon="gtk-ok" type="action" colspan="2"/>
22 </field>
23 </field>
24 </record>
25</data>
26</openerp>
027
=== added file 'partner_risk/sale_view.xml'
--- partner_risk/sale_view.xml 1970-01-01 00:00:00 +0000
+++ partner_risk/sale_view.xml 2014-03-04 09:42:58 +0000
@@ -0,0 +1,33 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data>
4 <!-- sale.view -->
5 <record id="sale_order_form_risk" model="ir.ui.view">
6 <field name="name">sale.order.form.risk</field>
7 <field name="model">sale.order</field>
8 <field name="type">form</field>
9 <field name="inherit_id" ref="sale.view_order_form" />
10 <field name="arch" type="xml">
11 <button name="action_button_confirm" position="replace">
12 <button name="draft_to_risk" string="Confirm Order" states="draft" class="oe_highlight"/>
13 <button name="risk_to_router" string="Approve Order" states="wait_risk" class="oe_highlight"/>
14 <button name="risk_to_cancel" string="Cancel Order" states="wait_risk" />
15 </button>
16 </field>
17 </record>
18
19 <!--AÑADO BUSQUEDA POR SO PENDIENTES DE ENVIAR-->
20 <record id="view_sales_order_add_wait_risk_filter" model="ir.ui.view">
21 <field name="name">sale.order.add_wait_risk_filter</field>
22 <field name="model">sale.order</field>
23 <field name="inherit_id" ref="sale.view_sales_order_filter"/>
24 <field name="type">search</field>
25 <field name="arch" type="xml">
26 <xpath expr="/search/separator[1]" position="after">
27 <filter icon="terp-dolar_ok!" string="Waiting Risk Approval" domain="[('state','=','wait_risk')]"/>
28 </xpath>
29 </field>
30 </record>
31</data>
32</openerp>
33
034
=== added file 'partner_risk/sale_workflow.xml'
--- partner_risk/sale_workflow.xml 1970-01-01 00:00:00 +0000
+++ partner_risk/sale_workflow.xml 2014-03-04 09:42:58 +0000
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data noupdate="1">
4 <record id="group_risk_manager" model="res.groups">
5 <field name="name">Risk Manager</field>
6 </record>
7
8 <!-- Activities -->
9 <record id="act_risk_router" model="workflow.activity">
10 <field name="wkf_id" ref="sale.wkf_sale"/>
11 <field name="name">risk_router</field>
12 </record>
13 <record id="act_wait_risk_approval" model="workflow.activity">
14 <field name="wkf_id" ref="sale.wkf_sale"/>
15 <field name="kind">function</field>
16 <field name="name">wait_risk</field>
17 <field name="action">write({'state':'wait_risk'})</field>
18 </record>
19
20 <!-- Transitions -->
21 <record id="trans_draft_to_risk_router" model="workflow.transition">
22 <field name="act_from" ref="sale.act_draft"/>
23 <field name="act_to" ref="act_risk_router"/>
24 <field name="signal">draft_to_risk</field>
25 </record>
26 <record id="trans_risk_router_to_router" model="workflow.transition">
27 <field name="act_from" ref="act_risk_router"/>
28 <field name="act_to" ref="sale.act_router"/>
29 <field name="condition">partner_id.available_risk - amount_total >= 0.0</field>
30 </record>
31 <record id="trans_risk_router_to_wait_risk_approval" model="workflow.transition">
32 <field name="act_from" ref="act_risk_router"/>
33 <field name="act_to" ref="act_wait_risk_approval"/>
34 <field name="condition">partner_id.available_risk - amount_total &lt; 0.0</field>
35 </record>
36 <record id="trans_wait_risk_to_router_signal" model="workflow.transition">
37 <field name="act_from" ref="act_wait_risk_approval"/>
38 <field name="act_to" ref="sale.act_router"/>
39 <field name="signal">risk_to_router</field>
40 <field name="group_id" ref="group_risk_manager"/>
41 </record>
42 <record id="trans_wait_risk_to_cancel" model="workflow.transition">
43 <field name="act_from" ref="act_wait_risk_approval"/>
44 <field name="act_to" ref="sale.act_cancel"/>
45 <field name="signal">risk_to_cancel</field>
46 </record>
47</data>
48</openerp>
49
050
=== added directory 'partner_risk/wizard'
=== added file 'partner_risk/wizard/__init__.py'
--- partner_risk/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ partner_risk/wizard/__init__.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,22 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2009 Albert Cervera i Areny (http://www.nan-tic.com). All Rights Reserved
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import open_risk_window
023
=== added file 'partner_risk/wizard/open_risk_window.py'
--- partner_risk/wizard/open_risk_window.py 1970-01-01 00:00:00 +0000
+++ partner_risk/wizard/open_risk_window.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,64 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2009 Albert Cervera i Areny (http://www.nan-tic.com). All Rights Reserved
6# Copyright (c) 2011 Pexego Sistemas Informáticos. All Rights Reserved
7# Alberto Luengo Cabanillas <alberto@pexego.es>
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21#
22##############################################################################
23
24
25""" Open Risk Window and show Partner relative information """
26
27from osv import osv, fields
28from tools.translate import _
29import pooler
30
31
32class open_risk_window(osv.osv_memory):
33 """ Open Risk Window and show Partner relative information """
34
35 _name = "open.risk.window"
36 _description = "Partner's risk information"
37
38 _columns = {
39 'unpayed_amount': fields.float('Expired Unpaid Payments', digits=(4,2), readonly="True"),
40 'pending_amount': fields.float('Unexpired Unpaid Payments', digits=(4,2), readonly="True"),
41 'draft_invoices_amount': fields.float('Draft Invoices', digits=(4,2), readonly="True"),
42 'circulating_amount': fields.float('Payments Sent to Bank', digits=(4,2), readonly="True"),
43 'pending_orders_amount': fields.float('Uninvoiced Orders', digits=(4,2), readonly="True"),
44 'total_debt': fields.float('Total Debt', digits=(4,2), readonly="True"),
45 'credit_limit': fields.float('Credit Limit', digits=(4,2), readonly="True"),
46 'available_risk': fields.float('Available Credit', digits=(4,2), readonly="True"),
47 'total_risk_percent': fields.float('Credit Usage (%)', digits=(4,2), readonly="True"),
48 }
49 _defaults = {
50 'unpayed_amount': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).unpayed_amount or 0.0,
51 'pending_amount': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).pending_amount or 0.0,
52 'draft_invoices_amount': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).draft_invoices_amount or 0.0,
53 'circulating_amount': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).circulating_amount or 0.0,
54 'pending_orders_amount': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).pending_orders_amount or 0.0,
55 'total_debt': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).total_debt or 0.0,
56 'credit_limit': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).credit_limit or 0.0,
57 'available_risk': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).available_risk or 0.0,
58 'total_risk_percent': lambda self, cr, uid, context: self.pool.get('res.partner').browse(cr,uid,context['active_id'],context).total_risk_percent or 0.0,
59 }
60
61
62open_risk_window()
63
64# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
065
=== added file 'partner_risk/wizard/open_risk_window_view.xml'
--- partner_risk/wizard/open_risk_window_view.xml 1970-01-01 00:00:00 +0000
+++ partner_risk/wizard/open_risk_window_view.xml 2014-03-04 09:42:58 +0000
@@ -0,0 +1,36 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4 <record id="open_risk_window_view" model="ir.ui.view">
5 <field name="name">open_risk_window_view</field>
6 <field name="model">open.risk.window</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">
9 <form string="Partner Risk Information">
10 <field name="unpayed_amount" colspan="4"/>
11 <field name="pending_amount" colspan="4"/>
12 <field name="draft_invoices_amount" colspan="4"/>
13 <field name="circulating_amount" colspan="4"/>
14 <field name="pending_orders_amount" colspan="4"/>
15 <separator colspan="4"/>
16 <field name="total_debt" colspan="4"/>
17 <label string="" colspan="4"/>
18 <field name="credit_limit" colspan="4"/>
19 <field name="available_risk" colspan="4"/>
20 <field name="total_risk_percent" widget="progressbar" colspan="4"/>
21 </form>
22 </field>
23 </record>
24
25 <record id="action_open_risk_window" model="ir.actions.act_window">
26 <field name="name">Show Partner Risk Information</field>
27 <field name="res_model">open.risk.window</field>
28 <field name="type">ir.actions.act_window</field>
29 <field name="view_type">form</field>
30 <field name="view_mode">tree,form</field>
31 <field name="view_id" ref="open_risk_window_view"/>
32 <field name="target">new</field>
33 </record>
34
35 </data>
36</openerp>
037
=== added directory 'partner_risk_insurance'
=== added file 'partner_risk_insurance/__init__.py'
--- partner_risk_insurance/__init__.py 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/__init__.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,24 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2009 Albert Cervera i Areny (http://www.nan-tic.com). All Rights Reserved
6# Copyright (c) 2014 Factor Libre SL. All Rights Reserved
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23import partner
24
025
=== added file 'partner_risk_insurance/__openerp__.py'
--- partner_risk_insurance/__openerp__.py 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/__openerp__.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,22 @@
1# -*- encoding: utf-8 -*-
2{
3 "name" : "Partner Risk Insurance",
4 "version" : "0.1",
5 "description" : """This module adds a new tab in the partner form to introduce risk insurance information.
6
7--Module of nan-tic nan_partner_insurance ported by Factor Libre to OpenERP 7
8""",
9 "author" : "Factor Libre S.L, NaN·tic",
10 "website" : "http://www.factorlibre.com",
11 "depends" : [
12 'base',
13 ],
14 "category" : "Custom Modules",
15 "init_xml" : [],
16 "demo_xml" : [],
17 "update_xml" : [
18 'partner_view.xml',
19 ],
20 "active": False,
21 "installable": True
22}
023
=== added directory 'partner_risk_insurance/i18n'
=== added file 'partner_risk_insurance/i18n/ca.po'
--- partner_risk_insurance/i18n/ca.po 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/i18n/ca.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,126 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk_insurance
4#
5# Albert Cervera i Areny <albert@nan-tic.com>, 2009.
6msgid ""
7msgstr ""
8"Project-Id-Version: OpenERP Server 5.0.6\n"
9"Report-Msgid-Bugs-To: support@openerp.com\n"
10"POT-Creation-Date: 2009-09-23 18:14+0000\n"
11"PO-Revision-Date: 2011-10-06 07:55+0000\n"
12"Last-Translator: Albert Cervera i Areny - http://www.NaN-tic.com <albert@nan-"
13"tic.com>\n"
14"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
15"MIME-Version: 1.0\n"
16"Content-Type: text/plain; charset=UTF-8\n"
17"Content-Transfer-Encoding: 8bit\n"
18"X-Launchpad-Export-Date: 2012-08-28 08:38+0000\n"
19"X-Generator: Launchpad (build 15864)\n"
20
21#. module: nan_partner_risk_insurance
22#: field:res.partner,risk_insurance_code_2:0
23msgid "Insurance Code 2"
24msgstr "Codi de l'assegurança 2"
25
26#. module: nan_partner_risk_insurance
27#: constraint:ir.ui.view:0
28msgid "Invalid XML for View Architecture!"
29msgstr "XML invàlid per a la definició de la vista!"
30
31#. module: nan_partner_risk_insurance
32#: help:res.partner,company_credit_limit:0
33msgid "Credit limit granted by the company."
34msgstr "Crèdit concedit per la companyia"
35
36#. module: nan_partner_risk_insurance
37#: field:res.partner,risk_insurance_code:0
38msgid "Insurance Code"
39msgstr "Codi de l'assegurança"
40
41#. module: nan_partner_risk_insurance
42#: field:res.partner,company_credit_limit:0
43msgid "Company's Credit Limit"
44msgstr "Crèdit concedit per la companyia"
45
46#. module: nan_partner_risk_insurance
47#: help:res.partner,risk_insurance_requested:0
48msgid ""
49"Mark this field if an insurance was requested for the credit of this partner."
50msgstr ""
51"Marqueu aquest camp si s'ha demanat una assegurança pel crèdit d'aquesta "
52"empresa."
53
54#. module: nan_partner_risk_insurance
55#: help:res.partner,risk_insurance_coverage_percent:0
56msgid "Percentage of the credit covered by the insurance."
57msgstr "Percentatge de cobertura del crèdit de l'assegurança."
58
59#. module: nan_partner_risk_insurance
60#: field:res.partner,risk_insurance_grant_date:0
61msgid "Insurance Grant Date"
62msgstr "Data de concessió de l'assegurança"
63
64#. module: nan_partner_risk_insurance
65#: field:res.partner,insurance_credit_limit:0
66msgid "Insurance's Credit Limit"
67msgstr "Crèdit concedit per l'assegurança"
68
69#. module: nan_partner_risk_insurance
70#: field:res.partner,risk_insurance_requested:0
71msgid "Insurance Requested"
72msgstr "Assegurança sol·licitada"
73
74#. module: nan_partner_risk_insurance
75#: help:res.partner,risk_insurance_grant_date:0
76msgid "Date when the insurance was granted by the insurance company."
77msgstr "Data en què es va concedir l'assegurança."
78
79#. module: nan_partner_risk_insurance
80#: help:res.partner,risk_insurance_code_2:0
81msgid ""
82"This fields is needed because some risk insurance companies require a "
83"supplementary code for each partner."
84msgstr ""
85"Codi suplementari de l'empresa assignat per la companyia asseguradora."
86
87#. module: nan_partner_risk_insurance
88#: view:res.partner:0
89msgid "Credit Insurance"
90msgstr "Assegurança de risc"
91
92#. module: nan_partner_risk_insurance
93#: help:res.partner,risk_insurance_code:0
94msgid ""
95"This fields is used to store the code the risk insurance company assigns to "
96"this partner."
97msgstr "Codi que la companyia asseguradora té assignat a aquesta empresa."
98
99#. module: nan_partner_risk_insurance
100#: view:res.partner:0
101msgid "Accounting"
102msgstr "Comptabilitat"
103
104#. module: nan_partner_risk_insurance
105#: help:res.partner,insurance_credit_limit:0
106msgid "Credit limit granted by the insurance company."
107msgstr "Crèdit concedit per la companyia asseguradora."
108
109#. module: nan_partner_risk_insurance
110#: field:res.partner,risk_insurance_coverage_percent:0
111msgid "Insurance's Credit Coverage"
112msgstr "Cobertura de risc de l'assegurança"
113
114#. module: nan_partner_risk_insurance
115#: model:ir.module.module,description:nan_partner_risk_insurance.module_meta_information
116msgid ""
117"This module adds a new tab in the partner form to introduce risk insurance "
118"information."
119msgstr ""
120"Aquest mòdul afegeix una nova pestanya al formulari d'empreses per introduir "
121"informació relativa a assegurances del risc."
122
123#. module: nan_partner_risk_insurance
124#: model:ir.module.module,shortdesc:nan_partner_risk_insurance.module_meta_information
125msgid "Partner Risk Insurance"
126msgstr "Assegurança del risc d'empreses"
0127
=== added file 'partner_risk_insurance/i18n/ca_ES.po'
--- partner_risk_insurance/i18n/ca_ES.po 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/i18n/ca_ES.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,117 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk_insurance
4#
5# Albert Cervera i Areny <albert@nan-tic.com>, 2009.
6msgid ""
7msgstr ""
8"Project-Id-Version: OpenERP Server 5.0.6\n"
9"Report-Msgid-Bugs-To: support@openerp.com\n"
10"POT-Creation-Date: 2009-09-23 18:14:48+0000\n"
11"PO-Revision-Date: 2009-09-23 20:31+0200\n"
12"Last-Translator: Albert Cervera i Areny <albert@nan-tic.com>\n"
13"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: \n"
17"Plural-Forms: \n"
18"X-Generator: Lokalize 1.0\n"
19
20#. module: nan_partner_risk_insurance
21#: field:res.partner,risk_insurance_code_2:0
22msgid "Insurance Code 2"
23msgstr "Codi de l'assegurança 2"
24
25#. module: nan_partner_risk_insurance
26#: constraint:ir.ui.view:0
27msgid "Invalid XML for View Architecture!"
28msgstr "XML invàlid per a la definició de la vista!"
29
30#. module: nan_partner_risk_insurance
31#: help:res.partner,company_credit_limit:0
32msgid "Credit limit granted by the company."
33msgstr "Crèdit concedit per la companyia"
34
35#. module: nan_partner_risk_insurance
36#: field:res.partner,risk_insurance_code:0
37msgid "Insurance Code"
38msgstr "Codi de l'assegurança"
39
40#. module: nan_partner_risk_insurance
41#: field:res.partner,company_credit_limit:0
42msgid "Company's Credit Limit"
43msgstr "Crèdit concedit per la companyia"
44
45#. module: nan_partner_risk_insurance
46#: help:res.partner,risk_insurance_requested:0
47msgid "Mark this field if an insurance was requested for the credit of this partner."
48msgstr "Marqueu aquest camp si s'ha demanat una assegurança pel crèdit d'aquesta empresa."
49
50#. module: nan_partner_risk_insurance
51#: help:res.partner,risk_insurance_coverage_percent:0
52msgid "Percentage of the credit covered by the insurance."
53msgstr "Percentatge de cobertura del crèdit de l'assegurança."
54
55#. module: nan_partner_risk_insurance
56#: field:res.partner,risk_insurance_grant_date:0
57msgid "Insurance Grant Date"
58msgstr "Data de concessió de l'assegurança"
59
60#. module: nan_partner_risk_insurance
61#: field:res.partner,insurance_credit_limit:0
62msgid "Insurance's Credit Limit"
63msgstr "Crèdit concedit per l'assegurança"
64
65#. module: nan_partner_risk_insurance
66#: field:res.partner,risk_insurance_requested:0
67msgid "Insurance Requested"
68msgstr "Assegurança sol·licitada"
69
70#. module: nan_partner_risk_insurance
71#: help:res.partner,risk_insurance_grant_date:0
72msgid "Date when the insurance was granted by the insurance company."
73msgstr "Data en què es va concedir l'assegurança."
74
75#. module: nan_partner_risk_insurance
76#: help:res.partner,risk_insurance_code_2:0
77msgid "This fields is needed because some risk insurance companies require a supplementary code for each partner."
78msgstr "Codi suplementari de l'empresa assignat per la companyia asseguradora."
79
80#. module: nan_partner_risk_insurance
81#: view:res.partner:0
82msgid "Credit Insurance"
83msgstr "Assegurança de risc"
84
85#. module: nan_partner_risk_insurance
86#: help:res.partner,risk_insurance_code:0
87msgid "This fields is used to store the code the risk insurance company assigns to this partner."
88msgstr "Codi que la companyia asseguradora té assignat a aquesta empresa."
89
90#. module: nan_partner_risk_insurance
91#: view:res.partner:0
92msgid "Accounting"
93msgstr "Comptabilitat"
94
95#. module: nan_partner_risk_insurance
96#: help:res.partner,insurance_credit_limit:0
97msgid "Credit limit granted by the insurance company."
98msgstr "Crèdit concedit per la companyia asseguradora."
99
100#. module: nan_partner_risk_insurance
101#: field:res.partner,risk_insurance_coverage_percent:0
102msgid "Insurance's Credit Coverage"
103msgstr "Cobertura de risc de l'assegurança"
104
105#. module: nan_partner_risk_insurance
106#: model:ir.module.module,description:nan_partner_risk_insurance.module_meta_information
107msgid "This module adds a new tab in the partner form to introduce risk insurance information."
108msgstr ""
109"Aquest mòdul afegeix una nova pestanya al formulari d'empreses per introduir informació relativa a assegurances "
110"del risc."
111
112#. module: nan_partner_risk_insurance
113#: model:ir.module.module,shortdesc:nan_partner_risk_insurance.module_meta_information
114msgid "Partner Risk Insurance"
115msgstr "Assegurança del risc d'empreses"
116
117
0118
=== added file 'partner_risk_insurance/i18n/es.po'
--- partner_risk_insurance/i18n/es.po 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/i18n/es.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,124 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk_insurance
4#
5# Albert Cervera i Areny <albert@nan-tic.com>, 2009.
6msgid ""
7msgstr ""
8"Project-Id-Version: OpenERP Server 5.0.6\n"
9"Report-Msgid-Bugs-To: support@openerp.com\n"
10"POT-Creation-Date: 2009-09-23 18:14+0000\n"
11"PO-Revision-Date: 2011-11-13 13:02+0000\n"
12"Last-Translator: Equipo OPENTIA (http://www.opentia.com) <Unknown>\n"
13"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2012-08-28 08:38+0000\n"
18"X-Generator: Launchpad (build 15864)\n"
19
20#. module: nan_partner_risk_insurance
21#: field:res.partner,risk_insurance_code_2:0
22msgid "Insurance Code 2"
23msgstr "Código del seguro 2"
24
25#. module: nan_partner_risk_insurance
26#: constraint:ir.ui.view:0
27msgid "Invalid XML for View Architecture!"
28msgstr "¡XML inválido para la definición de la vista!"
29
30#. module: nan_partner_risk_insurance
31#: help:res.partner,company_credit_limit:0
32msgid "Credit limit granted by the company."
33msgstr "Límite de crédito concedido por la compañía"
34
35#. module: nan_partner_risk_insurance
36#: field:res.partner,risk_insurance_code:0
37msgid "Insurance Code"
38msgstr "Código del seguro"
39
40#. module: nan_partner_risk_insurance
41#: field:res.partner,company_credit_limit:0
42msgid "Company's Credit Limit"
43msgstr "Límite de crédito de la compañía"
44
45#. module: nan_partner_risk_insurance
46#: help:res.partner,risk_insurance_requested:0
47msgid ""
48"Mark this field if an insurance was requested for the credit of this partner."
49msgstr ""
50"Marque este campo si se ha pedido un seguro para el crédito de esta empresa."
51
52#. module: nan_partner_risk_insurance
53#: help:res.partner,risk_insurance_coverage_percent:0
54msgid "Percentage of the credit covered by the insurance."
55msgstr "Porcentaje de crédito cubierto por el seguro."
56
57#. module: nan_partner_risk_insurance
58#: field:res.partner,risk_insurance_grant_date:0
59msgid "Insurance Grant Date"
60msgstr "Fecha de concesión del seguro"
61
62#. module: nan_partner_risk_insurance
63#: field:res.partner,insurance_credit_limit:0
64msgid "Insurance's Credit Limit"
65msgstr "Crédito concedido por el seguro"
66
67#. module: nan_partner_risk_insurance
68#: field:res.partner,risk_insurance_requested:0
69msgid "Insurance Requested"
70msgstr "Seguro solicitado"
71
72#. module: nan_partner_risk_insurance
73#: help:res.partner,risk_insurance_grant_date:0
74msgid "Date when the insurance was granted by the insurance company."
75msgstr "Fecha en que se concedió el seguro."
76
77#. module: nan_partner_risk_insurance
78#: help:res.partner,risk_insurance_code_2:0
79msgid ""
80"This fields is needed because some risk insurance companies require a "
81"supplementary code for each partner."
82msgstr ""
83"Código suplementario de la empresa asignado por la compañía aseguradora."
84
85#. module: nan_partner_risk_insurance
86#: view:res.partner:0
87msgid "Credit Insurance"
88msgstr "Seguro de riesgo"
89
90#. module: nan_partner_risk_insurance
91#: help:res.partner,risk_insurance_code:0
92msgid ""
93"This fields is used to store the code the risk insurance company assigns to "
94"this partner."
95msgstr "Código que la compañía aseguradora tiene asignado a esta empresa."
96
97#. module: nan_partner_risk_insurance
98#: view:res.partner:0
99msgid "Accounting"
100msgstr "Contabilidad"
101
102#. module: nan_partner_risk_insurance
103#: help:res.partner,insurance_credit_limit:0
104msgid "Credit limit granted by the insurance company."
105msgstr "Crédito concedido por la compañía aseguradora."
106
107#. module: nan_partner_risk_insurance
108#: field:res.partner,risk_insurance_coverage_percent:0
109msgid "Insurance's Credit Coverage"
110msgstr "Cobertura de riesgo del seguro"
111
112#. module: nan_partner_risk_insurance
113#: model:ir.module.module,description:nan_partner_risk_insurance.module_meta_information
114msgid ""
115"This module adds a new tab in the partner form to introduce risk insurance "
116"information."
117msgstr ""
118"Este módulo añade una nueva pestaña en el formulario de empresas para "
119"introducir datos del seguro del riesgo."
120
121#. module: nan_partner_risk_insurance
122#: model:ir.module.module,shortdesc:nan_partner_risk_insurance.module_meta_information
123msgid "Partner Risk Insurance"
124msgstr "Seguro del riesgo de empresas"
0125
=== added file 'partner_risk_insurance/i18n/es_ES.po'
--- partner_risk_insurance/i18n/es_ES.po 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/i18n/es_ES.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,116 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk_insurance
4#
5# Albert Cervera i Areny <albert@nan-tic.com>, 2009.
6msgid ""
7msgstr ""
8"Project-Id-Version: OpenERP Server 5.0.6\n"
9"Report-Msgid-Bugs-To: support@openerp.com\n"
10"POT-Creation-Date: 2009-09-23 18:14:48+0000\n"
11"PO-Revision-Date: 2009-09-23 20:33+0200\n"
12"Last-Translator: Albert Cervera i Areny <albert@nan-tic.com>\n"
13"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: \n"
17"Plural-Forms: \n"
18"X-Generator: Lokalize 1.0\n"
19
20#. module: nan_partner_risk_insurance
21#: field:res.partner,risk_insurance_code_2:0
22msgid "Insurance Code 2"
23msgstr "Código del seguro 2"
24
25#. module: nan_partner_risk_insurance
26#: constraint:ir.ui.view:0
27msgid "Invalid XML for View Architecture!"
28msgstr "¡XML inválido para la definición de la vista!"
29
30#. module: nan_partner_risk_insurance
31#: help:res.partner,company_credit_limit:0
32msgid "Credit limit granted by the company."
33msgstr "Crédito concedido por la companyía."
34
35#. module: nan_partner_risk_insurance
36#: field:res.partner,risk_insurance_code:0
37msgid "Insurance Code"
38msgstr "Código del seguro"
39
40#. module: nan_partner_risk_insurance
41#: field:res.partner,company_credit_limit:0
42msgid "Company's Credit Limit"
43msgstr "Crédito concedido por la companyía"
44
45#. module: nan_partner_risk_insurance
46#: help:res.partner,risk_insurance_requested:0
47msgid "Mark this field if an insurance was requested for the credit of this partner."
48msgstr "Marque este campo si se ha pedido un seguro para el crédito de esta empresa."
49
50#. module: nan_partner_risk_insurance
51#: help:res.partner,risk_insurance_coverage_percent:0
52msgid "Percentage of the credit covered by the insurance."
53msgstr "Porcentage de crédito cubierto por el seguro."
54
55#. module: nan_partner_risk_insurance
56#: field:res.partner,risk_insurance_grant_date:0
57msgid "Insurance Grant Date"
58msgstr "Fecha de concesión del seguro"
59
60#. module: nan_partner_risk_insurance
61#: field:res.partner,insurance_credit_limit:0
62msgid "Insurance's Credit Limit"
63msgstr "Crédito concedido por el seguro"
64
65#. module: nan_partner_risk_insurance
66#: field:res.partner,risk_insurance_requested:0
67msgid "Insurance Requested"
68msgstr "Seguro solicitado"
69
70#. module: nan_partner_risk_insurance
71#: help:res.partner,risk_insurance_grant_date:0
72msgid "Date when the insurance was granted by the insurance company."
73msgstr "Fecha en que se concedió el seguro."
74
75#. module: nan_partner_risk_insurance
76#: help:res.partner,risk_insurance_code_2:0
77msgid "This fields is needed because some risk insurance companies require a supplementary code for each partner."
78msgstr "Código suplementario de la empresa asignado por la compañía aseguradora."
79
80#. module: nan_partner_risk_insurance
81#: view:res.partner:0
82msgid "Credit Insurance"
83msgstr "Seguro de riesgo"
84
85#. module: nan_partner_risk_insurance
86#: help:res.partner,risk_insurance_code:0
87msgid "This fields is used to store the code the risk insurance company assigns to this partner."
88msgstr "Código que la compañía aseguradora tiene asignado a esta empresa."
89
90#. module: nan_partner_risk_insurance
91#: view:res.partner:0
92msgid "Accounting"
93msgstr "Contabilidad"
94
95#. module: nan_partner_risk_insurance
96#: help:res.partner,insurance_credit_limit:0
97msgid "Credit limit granted by the insurance company."
98msgstr "Crédito concedido por la compañía aseguradora."
99
100#. module: nan_partner_risk_insurance
101#: field:res.partner,risk_insurance_coverage_percent:0
102msgid "Insurance's Credit Coverage"
103msgstr "Cobertura de riesgo del seguro"
104
105#. module: nan_partner_risk_insurance
106#: model:ir.module.module,description:nan_partner_risk_insurance.module_meta_information
107msgid "This module adds a new tab in the partner form to introduce risk insurance information."
108msgstr ""
109"Este módulo añade una nueva pestaña en el formulario de empresas para introducir datos del seguro del riesgo."
110
111#. module: nan_partner_risk_insurance
112#: model:ir.module.module,shortdesc:nan_partner_risk_insurance.module_meta_information
113msgid "Partner Risk Insurance"
114msgstr "Seguro del riesgo de empresas"
115
116
0117
=== added file 'partner_risk_insurance/i18n/nan_partner_risk_insurance.pot'
--- partner_risk_insurance/i18n/nan_partner_risk_insurance.pot 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/i18n/nan_partner_risk_insurance.pot 2014-03-04 09:42:58 +0000
@@ -0,0 +1,112 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * nan_partner_risk_insurance
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.6\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-09-23 18:14:48+0000\n"
10"PO-Revision-Date: 2009-09-23 18:14:48+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: nan_partner_risk_insurance
19#: field:res.partner,risk_insurance_code_2:0
20msgid "Insurance Code 2"
21msgstr ""
22
23#. module: nan_partner_risk_insurance
24#: constraint:ir.ui.view:0
25msgid "Invalid XML for View Architecture!"
26msgstr ""
27
28#. module: nan_partner_risk_insurance
29#: help:res.partner,company_credit_limit:0
30msgid "Credit limit granted by the company."
31msgstr ""
32
33#. module: nan_partner_risk_insurance
34#: field:res.partner,risk_insurance_code:0
35msgid "Insurance Code"
36msgstr ""
37
38#. module: nan_partner_risk_insurance
39#: field:res.partner,company_credit_limit:0
40msgid "Company's Credit Limit"
41msgstr ""
42
43#. module: nan_partner_risk_insurance
44#: help:res.partner,risk_insurance_requested:0
45msgid "Mark this field if an insurance was requested for the credit of this partner."
46msgstr ""
47
48#. module: nan_partner_risk_insurance
49#: help:res.partner,risk_insurance_coverage_percent:0
50msgid "Percentage of the credit covered by the insurance."
51msgstr ""
52
53#. module: nan_partner_risk_insurance
54#: field:res.partner,risk_insurance_grant_date:0
55msgid "Insurance Grant Date"
56msgstr ""
57
58#. module: nan_partner_risk_insurance
59#: field:res.partner,insurance_credit_limit:0
60msgid "Insurance's Credit Limit"
61msgstr ""
62
63#. module: nan_partner_risk_insurance
64#: field:res.partner,risk_insurance_requested:0
65msgid "Insurance Requested"
66msgstr ""
67
68#. module: nan_partner_risk_insurance
69#: help:res.partner,risk_insurance_grant_date:0
70msgid "Date when the insurance was granted by the insurance company."
71msgstr ""
72
73#. module: nan_partner_risk_insurance
74#: help:res.partner,risk_insurance_code_2:0
75msgid "This fields is needed because some risk insurance companies require a supplementary code for each partner."
76msgstr ""
77
78#. module: nan_partner_risk_insurance
79#: view:res.partner:0
80msgid "Credit Insurance"
81msgstr ""
82
83#. module: nan_partner_risk_insurance
84#: help:res.partner,risk_insurance_code:0
85msgid "This fields is used to store the code the risk insurance company assigns to this partner."
86msgstr ""
87
88#. module: nan_partner_risk_insurance
89#: view:res.partner:0
90msgid "Accounting"
91msgstr ""
92
93#. module: nan_partner_risk_insurance
94#: help:res.partner,insurance_credit_limit:0
95msgid "Credit limit granted by the insurance company."
96msgstr ""
97
98#. module: nan_partner_risk_insurance
99#: field:res.partner,risk_insurance_coverage_percent:0
100msgid "Insurance's Credit Coverage"
101msgstr ""
102
103#. module: nan_partner_risk_insurance
104#: model:ir.module.module,description:nan_partner_risk_insurance.module_meta_information
105msgid "This module adds a new tab in the partner form to introduce risk insurance information."
106msgstr ""
107
108#. module: nan_partner_risk_insurance
109#: model:ir.module.module,shortdesc:nan_partner_risk_insurance.module_meta_information
110msgid "Partner Risk Insurance"
111msgstr ""
112
0113
=== added file 'partner_risk_insurance/i18n/pt.po'
--- partner_risk_insurance/i18n/pt.po 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/i18n/pt.po 2014-03-04 09:42:58 +0000
@@ -0,0 +1,127 @@
1# Portuguese translation for openobject-addons
2# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
3# This file is distributed under the same license as the openobject-addons package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openobject-addons\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2009-09-23 18:14+0000\n"
11"PO-Revision-Date: 2011-10-06 07:55+0000\n"
12"Last-Translator: Luniz <luniz52@hotmail.com>\n"
13"Language-Team: Portuguese <pt@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2012-08-28 08:38+0000\n"
18"X-Generator: Launchpad (build 15864)\n"
19
20#. module: nan_partner_risk_insurance
21#: field:res.partner,risk_insurance_code_2:0
22msgid "Insurance Code 2"
23msgstr "Código de Segurança 2"
24
25#. module: nan_partner_risk_insurance
26#: constraint:ir.ui.view:0
27msgid "Invalid XML for View Architecture!"
28msgstr "XML Inválido para a Arquitectura de Vista!"
29
30#. module: nan_partner_risk_insurance
31#: help:res.partner,company_credit_limit:0
32msgid "Credit limit granted by the company."
33msgstr "Limite de crédito concedido pela empresa."
34
35#. module: nan_partner_risk_insurance
36#: field:res.partner,risk_insurance_code:0
37msgid "Insurance Code"
38msgstr "Código de Seguros"
39
40#. module: nan_partner_risk_insurance
41#: field:res.partner,company_credit_limit:0
42msgid "Company's Credit Limit"
43msgstr "Limite de Crédito da Empresa"
44
45#. module: nan_partner_risk_insurance
46#: help:res.partner,risk_insurance_requested:0
47msgid ""
48"Mark this field if an insurance was requested for the credit of this partner."
49msgstr ""
50"Marque este campo se o seguro foi solicitado para o crédito deste terceiro."
51
52#. module: nan_partner_risk_insurance
53#: help:res.partner,risk_insurance_coverage_percent:0
54msgid "Percentage of the credit covered by the insurance."
55msgstr "Percentual do crédito coberto pelo seguro."
56
57#. module: nan_partner_risk_insurance
58#: field:res.partner,risk_insurance_grant_date:0
59msgid "Insurance Grant Date"
60msgstr "Data da Concessão do Seguro"
61
62#. module: nan_partner_risk_insurance
63#: field:res.partner,insurance_credit_limit:0
64msgid "Insurance's Credit Limit"
65msgstr "Limite do Seguro de Crédito"
66
67#. module: nan_partner_risk_insurance
68#: field:res.partner,risk_insurance_requested:0
69msgid "Insurance Requested"
70msgstr "Seguro Requerido"
71
72#. module: nan_partner_risk_insurance
73#: help:res.partner,risk_insurance_grant_date:0
74msgid "Date when the insurance was granted by the insurance company."
75msgstr "Data em que o seguro foi concedido pela companhia de seguros."
76
77#. module: nan_partner_risk_insurance
78#: help:res.partner,risk_insurance_code_2:0
79msgid ""
80"This fields is needed because some risk insurance companies require a "
81"supplementary code for each partner."
82msgstr ""
83"Este campo é necessário porque algumas companhias de seguros de riscos "
84"reuqer um código complementar para cada terceiro."
85
86#. module: nan_partner_risk_insurance
87#: view:res.partner:0
88msgid "Credit Insurance"
89msgstr "Seguro de Crédito"
90
91#. module: nan_partner_risk_insurance
92#: help:res.partner,risk_insurance_code:0
93msgid ""
94"This fields is used to store the code the risk insurance company assigns to "
95"this partner."
96msgstr ""
97"Este campo é utilizado para armazenar o código da companhia de seguros de "
98"risco atribui a este terceiro."
99
100#. module: nan_partner_risk_insurance
101#: view:res.partner:0
102msgid "Accounting"
103msgstr "Contabilidade"
104
105#. module: nan_partner_risk_insurance
106#: help:res.partner,insurance_credit_limit:0
107msgid "Credit limit granted by the insurance company."
108msgstr "Limite de crédito concedido pela companhia de seguros."
109
110#. module: nan_partner_risk_insurance
111#: field:res.partner,risk_insurance_coverage_percent:0
112msgid "Insurance's Credit Coverage"
113msgstr "Cobertura do Seguro de Crédito"
114
115#. module: nan_partner_risk_insurance
116#: model:ir.module.module,description:nan_partner_risk_insurance.module_meta_information
117msgid ""
118"This module adds a new tab in the partner form to introduce risk insurance "
119"information."
120msgstr ""
121"Este módulo adiciona um novo separador no formulário do terceiro para "
122"introduzir informações sobre o seguro de risco."
123
124#. module: nan_partner_risk_insurance
125#: model:ir.module.module,shortdesc:nan_partner_risk_insurance.module_meta_information
126msgid "Partner Risk Insurance"
127msgstr "Risco de Seguro de Terceiro"
0128
=== added file 'partner_risk_insurance/partner.py'
--- partner_risk_insurance/partner.py 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/partner.py 2014-03-04 09:42:58 +0000
@@ -0,0 +1,47 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2009 Albert Cervera i Areny (http://www.nan-tic.com). All Rights Reserved
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import osv, fields
23from mx.DateTime import now
24
25class res_partner(osv.osv):
26 _name = 'res.partner'
27 _inherit = 'res.partner'
28
29 def _credit_limit(self, cr, uid, ids, name, arg, context=None):
30 res = {}
31 for partner in self.browse( cr, uid, ids, context ):
32 res[partner.id] = partner.company_credit_limit + partner.insurance_credit_limit
33 return res
34
35 _columns = {
36 'credit_limit': fields.function(_credit_limit, method=True, store=True, string='Credit Limit', type='float'),
37 'company_credit_limit': fields.float("Company's Credit Limit", help='Credit limit granted by the company.'),
38 'insurance_credit_limit': fields.float("Insurance's Credit Limit", help='Credit limit granted by the insurance company.'),
39 'risk_insurance_coverage_percent': fields.float("Insurance's Credit Coverage", help='Percentage of the credit covered by the insurance.'),
40 'risk_insurance_requested': fields.boolean('Insurance Requested', help='Mark this field if an insurance was requested for the credit of this partner.'),
41 'risk_insurance_grant_date': fields.date('Insurance Grant Date', help='Date when the insurance was granted by the insurance company.'),
42 'risk_insurance_code': fields.char('Insurance Code', size=64, help='Code assigned to this partner by the risk insurance company.'),
43 'risk_insurance_code_2': fields.char('Insurance Code 2', size=64, help='Seconary code assigned to this partner by the risk insurance company.'),
44 }
45res_partner()
46
47# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
048
=== added file 'partner_risk_insurance/partner_view.xml'
--- partner_risk_insurance/partner_view.xml 1970-01-01 00:00:00 +0000
+++ partner_risk_insurance/partner_view.xml 2014-03-04 09:42:58 +0000
@@ -0,0 +1,38 @@
1<?xml version="1.0"?>
2<openerp>
3<data>
4 <!--
5 Add risk insurance tab in partner form.
6 -->
7 <record model="ir.ui.view" id="view_partner_form">
8 <field name="name">res.partner.form.risk_insurance</field>
9 <field name="model">res.partner</field>
10 <field name="type">form</field>
11 <field name="inherit_id" ref="base.view_partner_form"/>
12 <field name="arch" type="xml">
13 <notebook position="inside">
14 <page string="Credit Insurance">
15 <group>
16 <group>
17 <field name="company_credit_limit"/>
18 <field name="insurance_credit_limit"/>
19 </group>
20 <group>
21 <field name="risk_insurance_requested"/>
22 <field name="risk_insurance_grant_date"/>
23 </group>
24 <group>
25 <field name="risk_insurance_coverage_percent"/>
26 </group>
27 <group>
28 <field name="risk_insurance_code"/>
29 <field name="risk_insurance_code_2"/>
30 </group>
31 </group>
32
33 </page>
34 </notebook>
35 </field>
36 </record>
37</data>
38</openerp>

Subscribers

People subscribed via source and target branches