Merge lp:~vauxoo/openerp-venezuela-localization/javier-req-voucher-payment into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
- javier-req-voucher-payment
- Merge into 6.0-trunk
Proposed by
Javier Duran
Status: | Merged |
---|---|
Merged at revision: | 412 |
Proposed branch: | lp:~vauxoo/openerp-venezuela-localization/javier-req-voucher-payment |
Merge into: | lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk |
Diff against target: |
1503 lines (+759/-176) 25 files modified
bank_management/__openerp__.py (+17/-6) bank_management/bank/bank_view.xml (+3/-1) bank_management/bank/data/mercantil_bank_data.xml (+1/-1) bank_management/bank/partner_view.xml (+16/-16) bank_management/bank_management_menu.xml (+1/-0) bank_management/check/__init__.py (+3/-0) bank_management/check/account.py (+44/-0) bank_management/check/account_view.xml (+19/-0) bank_management/check/account_voucher_payment.py (+203/-0) bank_management/check/account_voucher_payment_view.xml (+191/-0) bank_management/check/check_book_view.xml (+15/-15) bank_management/check/check_note.py (+1/-1) bank_management/check/check_report.xml (+9/-9) bank_management/check/demo/demo.xml (+14/-0) bank_management/check/report/__init__.py (+1/-1) bank_management/check/report/check.py (+7/-7) bank_management/check/res_company.py (+52/-0) bank_management/check/res_company_view.xml (+35/-0) bank_management/check/voucher_pay_support.py (+2/-2) bank_management/check/wizard/__init__.py (+1/-1) bank_management/check/wizard/chk_book_gral.xml (+24/-22) bank_management/check/wizard/voucher_pay_support_wizard_pay_order.py (+72/-73) bank_management/check/wizard/voucher_pay_support_wizard_pay_order.xml (+18/-18) bank_management/security/account_voucher_group.xml (+10/-0) bank_management/security/ir.model.access.csv (+0/-3) |
To merge this branch: | bzr merge lp:~vauxoo/openerp-venezuela-localization/javier-req-voucher-payment |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nhomar - Vauxoo | Approve | ||
Review via email: mp+78249@code.launchpad.net |
Commit message
[MERGE] Se agrega a la localización modulo bank_management
Description of the change
Se integra en un solo modulo(
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bank_management/__openerp__.py' |
2 | --- bank_management/__openerp__.py 2011-09-25 23:55:38 +0000 |
3 | +++ bank_management/__openerp__.py 2011-10-05 12:59:12 +0000 |
4 | @@ -38,7 +38,17 @@ |
5 | "website" : "http://vauxoo.com", |
6 | "category": 'Generic Modules/Accounting', |
7 | "description": """ |
8 | - Proporciona los formatos para los cheques venezolanos |
9 | + - Management of check book, check note |
10 | + - Print format of venezuelan check note |
11 | + - Traceability of check note throught paid support |
12 | + - Account voucher payment |
13 | +--------------------------------------------------------- |
14 | + 1.- Create bank account |
15 | + 2.- Create check book request |
16 | + 3.- Load check note |
17 | + 4.- Make supplier invoice |
18 | + 5.- Create one supplier payment |
19 | + 6.- Create support (click button) |
20 | """, |
21 | 'init_xml': [], |
22 | "depends" : ["base", "account", "account_voucher"], |
23 | @@ -48,20 +58,20 @@ |
24 | 'bank/bank_view.xml', |
25 | 'bank/partner_view.xml', |
26 | 'check/check_report.xml', |
27 | + 'check/res_company_view.xml', |
28 | 'check/check_book_view.xml', |
29 | 'check/check_note_view.xml', |
30 | 'check/check_book_request_sequence.xml', |
31 | 'check/wizard/cancel_wizard.xml', |
32 | -# 'check/wizard/voucher_pay_support_wizard_pay_order.xml', |
33 | + 'check/wizard/voucher_pay_support_wizard_pay_order.xml', |
34 | 'check/wizard/chk_book_gral.xml', |
35 | -# 'check/generate_lines_payment_wizard.xml', |
36 | 'check/check_book_request_view.xml', |
37 | - 'check/data/res.bank.xml', |
38 | 'check/voucher_pay_support_view.xml', |
39 | -# 'check/menu_vouche_view.xml', |
40 | -# 'check/pay_order_view.xml', |
41 | + 'check/account_voucher_payment_view.xml', |
42 | + 'check/account_view.xml', |
43 | 'check/account_voucher_journal_view.xml', |
44 | 'security/ir.model.access.csv', |
45 | + 'security/account_voucher_group.xml', |
46 | 'bank/data/banesco_data.xml', |
47 | 'bank/data/bicentenario_data.xml', |
48 | 'bank/data/caribe_bank_data.xml', |
49 | @@ -70,6 +80,7 @@ |
50 | 'bank/data/industrial_data.xml', |
51 | 'bank/data/mercantil_bank_data.xml', |
52 | 'bank/data/venezuela_bank_data.xml', |
53 | + 'check/demo/demo.xml', |
54 | ], |
55 | 'demo_xml': [], |
56 | 'test': [], |
57 | |
58 | === modified file 'bank_management/bank/bank_view.xml' |
59 | --- bank_management/bank/bank_view.xml 2011-07-08 06:56:25 +0000 |
60 | +++ bank_management/bank/bank_view.xml 2011-10-05 12:59:12 +0000 |
61 | @@ -19,9 +19,11 @@ |
62 | <newline/> |
63 | <separator string="Format Check" colspan="4"/> |
64 | <field name="format_h" colspan="4" nolabel="1"/> |
65 | - </xpath> |
66 | + </xpath> |
67 | </field> |
68 | </record> |
69 | |
70 | + <menuitem id="base.menu_action_res_bank_form" parent="menu_configuration_bank"/> |
71 | + |
72 | </data> |
73 | </openerp> |
74 | |
75 | === modified file 'bank_management/bank/data/mercantil_bank_data.xml' |
76 | --- bank_management/bank/data/mercantil_bank_data.xml 2011-07-08 06:56:25 +0000 |
77 | +++ bank_management/bank/data/mercantil_bank_data.xml 2011-10-05 12:59:12 +0000 |
78 | @@ -5,7 +5,7 @@ |
79 | res_bank |
80 | --> |
81 | |
82 | - <data noupdate="0"> |
83 | + <data noupdate="1"> |
84 | <record id="res_bank_mercantil" model="res.bank"> |
85 | <field eval=""""Mercantil"""" name="name"/> |
86 | <field eval="500.0" name="max_lim"/> |
87 | |
88 | === modified file 'bank_management/bank/partner_view.xml' |
89 | --- bank_management/bank/partner_view.xml 2011-08-26 16:05:00 +0000 |
90 | +++ bank_management/bank/partner_view.xml 2011-10-05 12:59:12 +0000 |
91 | @@ -17,10 +17,10 @@ |
92 | <separator string="Account Properties" colspan="4"/> |
93 | <field name="bank_account_id"/> |
94 | <field name="trans_account_id"/> |
95 | - <field name="journal_id"/> |
96 | - <field name="transitory_money"/> |
97 | + <field name="journal_id"/> |
98 | + <field name="transitory_money"/> |
99 | <field name="virtual_balance"/> |
100 | - <field name="balance"/> |
101 | + <field name="balance"/> |
102 | </xpath> |
103 | </field> |
104 | </record> |
105 | @@ -36,9 +36,9 @@ |
106 | <field name="bank_account_id"/> |
107 | <field name="journal_id"/> |
108 | <field name="trans_account_id"/> |
109 | - <field name="transitory_money"/> |
110 | + <field name="transitory_money"/> |
111 | <field name="virtual_balance"/> |
112 | - <field name="balance"/> |
113 | + <field name="balance"/> |
114 | </xpath> |
115 | </field> |
116 | </record> |
117 | @@ -55,7 +55,7 @@ |
118 | <field name="acc_number"/> |
119 | <field name="partner_id"/> |
120 | <field name="owner_name"/> |
121 | - <field name="journal_id"/> |
122 | + <field name="journal_id"/> |
123 | </group> |
124 | <newline/> |
125 | <group expand="0" string="Group By..."> |
126 | @@ -66,7 +66,7 @@ |
127 | </group> |
128 | </search> |
129 | </field> |
130 | - </record> |
131 | + </record> |
132 | |
133 | <record id="view_res_partner_bank_form" model="ir.ui.view"> |
134 | <field name="name">res.partner.bank.account.form</field> |
135 | @@ -86,12 +86,12 @@ |
136 | <separator colspan="4" string="Account Properties"/> |
137 | <field name="bank_account_id"/> |
138 | <field name="trans_account_id"/> |
139 | - <field name="journal_id"/> |
140 | - <field name="transitory_money"/> |
141 | + <field name="journal_id"/> |
142 | + <field name="transitory_money"/> |
143 | <field name="virtual_balance"/> |
144 | - <field name="balance"/> |
145 | + <field name="balance"/> |
146 | <separator colspan="4" string="Bank Account Owner"/> |
147 | - <field colspan="4" name="owner_name"/> |
148 | + <field colspan="4" name="owner_name"/> |
149 | <field colspan="4" name="street"/> |
150 | <field name="city"/> |
151 | <field name="zip"/> |
152 | @@ -114,22 +114,22 @@ |
153 | <field name="bank_account_id"/> |
154 | <field name="journal_id"/> |
155 | <field name="trans_account_id"/> |
156 | - <field name="transitory_money"/> |
157 | + <field name="transitory_money"/> |
158 | <field name="virtual_balance"/> |
159 | - <field name="balance"/> |
160 | + <field name="balance"/> |
161 | </tree> |
162 | </field> |
163 | </record> |
164 | |
165 | |
166 | <record model="ir.actions.act_window" id="action_res_partner_bank"> |
167 | - <field name="name">Bank Account</field> |
168 | + <field name="name">Bank Accounts</field> |
169 | <field name="res_model">res.partner.bank</field> |
170 | <field name="type">ir.actions.act_window</field> |
171 | <field name="view_type">form</field> |
172 | <field name="view_mode">tree,form</field> |
173 | <field name="search_view_id" ref="view_res_partner_bank_filter"/> |
174 | - <field name="help">With Bank Account you can create and manage Bank Account.</field> |
175 | + <field name="help">With Bank Account you can create and manage Bank Account.</field> |
176 | </record> |
177 | <record model="ir.actions.act_window.view" id="act_wv_partner_bank_tree"> |
178 | <field name="sequence" eval="10"/> |
179 | @@ -146,7 +146,7 @@ |
180 | |
181 | <menuitem |
182 | id="menu_action_res_partner_bank" |
183 | - parent="base.menu_config_address_book" |
184 | + parent="menu_configuration_bank" |
185 | action="action_res_partner_bank" |
186 | sequence="5"/> |
187 | |
188 | |
189 | === modified file 'bank_management/bank_management_menu.xml' |
190 | --- bank_management/bank_management_menu.xml 2011-08-22 18:44:47 +0000 |
191 | +++ bank_management/bank_management_menu.xml 2011-10-05 12:59:12 +0000 |
192 | @@ -5,6 +5,7 @@ |
193 | <!-- <menuitem id="menu_bank" name="Bank" sequence="99" parent="menu_bank_management"/>--> |
194 | <!-- <menuitem id="menu_check" name="Check" sequence="99" parent="menu_bank_management"/>--> |
195 | <menuitem id="id_check_management" name="Check Management" sequence="99" parent="account.menu_finance_bank_and_cash"/> |
196 | + <menuitem id="menu_configuration_bank" name="Bank" parent="account.menu_finance_configuration" sequence="40"/> |
197 | |
198 | |
199 | </data> |
200 | |
201 | === modified file 'bank_management/check/__init__.py' |
202 | --- bank_management/check/__init__.py 2011-08-25 17:52:32 +0000 |
203 | +++ bank_management/check/__init__.py 2011-10-05 12:59:12 +0000 |
204 | @@ -27,11 +27,14 @@ |
205 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
206 | ################################################################################ |
207 | |
208 | +import res_company |
209 | import check_book |
210 | import check_note |
211 | import check_book_wizard |
212 | import check_book_request |
213 | import voucher_pay_support |
214 | +import account_voucher_payment |
215 | +import account |
216 | import report |
217 | import wizard |
218 | |
219 | |
220 | === added file 'bank_management/check/account.py' |
221 | --- bank_management/check/account.py 1970-01-01 00:00:00 +0000 |
222 | +++ bank_management/check/account.py 2011-10-05 12:59:12 +0000 |
223 | @@ -0,0 +1,44 @@ |
224 | +#!/usr/bin/python |
225 | +# -*- encoding: utf-8 -*- |
226 | +########################################################################### |
227 | +# Module Writen to OpenERP, Open Source Management Solution |
228 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
229 | +# All Rights Reserved |
230 | +###############Credits###################################################### |
231 | +# Coded by: Humberto Arocha <humberto@vauxoo.com> |
232 | +# Maria Gabriela Quilarque <gabriela@openerp.com.ve> |
233 | +# Planified by: Nhomar Hernandez |
234 | +# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve |
235 | +# Audited by: Humberto Arocha humberto@vauxoo.com |
236 | +############################################################################# |
237 | +# This program is free software: you can redistribute it and/or modify |
238 | +# it under the terms of the GNU General Public License as published by |
239 | +# the Free Software Foundation, either version 3 of the License, or |
240 | +# (at your option) any later version. |
241 | +# |
242 | +# This program is distributed in the hope that it will be useful, |
243 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
244 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
245 | +# GNU General Public License for more details. |
246 | +# |
247 | +# You should have received a copy of the GNU General Public License |
248 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
249 | +############################################################################## |
250 | +from osv import osv |
251 | +from osv import fields |
252 | +from tools.translate import _ |
253 | +from tools import config |
254 | +import time |
255 | +import datetime |
256 | +import decimal_precision as dp |
257 | + |
258 | + |
259 | +class account_journal(osv.osv): |
260 | + |
261 | + _inherit= "account.journal" |
262 | + |
263 | + _columns={ |
264 | + 'default_payment_credit_account_id' : fields.many2one('account.account','Write-Off Credit Account'), |
265 | + 'default_payment_debit_account_id' : fields.many2one('account.account','Write-Off Debit account'), |
266 | + } |
267 | +account_journal() |
268 | |
269 | === added file 'bank_management/check/account_view.xml' |
270 | --- bank_management/check/account_view.xml 1970-01-01 00:00:00 +0000 |
271 | +++ bank_management/check/account_view.xml 2011-10-05 12:59:12 +0000 |
272 | @@ -0,0 +1,19 @@ |
273 | +<?xml version="1.0"?> |
274 | +<openerp> |
275 | + <data> |
276 | + |
277 | + <record model="ir.ui.view" id="view_account_journal_account_default_form"> |
278 | + <field name="name">account.journal.account.deafult.form</field> |
279 | + <field name="model">account.journal</field> |
280 | + <field name="type">form</field> |
281 | + <field name="inherit_id" ref="account.view_account_journal_form"/> |
282 | + <field name="arch" type="xml"> |
283 | + <group colspan="2" col="2"> |
284 | + <separator string="Write-Of Default Account" colspan="4"/> |
285 | + <field name="default_payment_debit_account_id" attrs="{'required':[('type','=', 'cash')]}"/> |
286 | + <field name="default_payment_credit_account_id" attrs="{'required':[('type','=','cash')]}" /> |
287 | + </group> |
288 | + </field> |
289 | + </record> |
290 | + </data> |
291 | +</openerp> |
292 | |
293 | === added file 'bank_management/check/account_voucher_payment.py' |
294 | --- bank_management/check/account_voucher_payment.py 1970-01-01 00:00:00 +0000 |
295 | +++ bank_management/check/account_voucher_payment.py 2011-10-05 12:59:12 +0000 |
296 | @@ -0,0 +1,203 @@ |
297 | +#!/usr/bin/python |
298 | +# -*- encoding: utf-8 -*- |
299 | +########################################################################### |
300 | +# Module Writen to OpenERP, Open Source Management Solution |
301 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
302 | +# All Rights Reserved |
303 | +###############Credits###################################################### |
304 | +# Coded by: Humberto Arocha <humberto@vauxoo.com> |
305 | +# Maria Gabriela Quilarque <gabriela@openerp.com.ve> |
306 | +# Planified by: Nhomar Hernandez |
307 | +# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve |
308 | +# Audited by: Humberto Arocha humberto@vauxoo.com |
309 | +############################################################################# |
310 | +# This program is free software: you can redistribute it and/or modify |
311 | +# it under the terms of the GNU General Public License as published by |
312 | +# the Free Software Foundation, either version 3 of the License, or |
313 | +# (at your option) any later version. |
314 | +# |
315 | +# This program is distributed in the hope that it will be useful, |
316 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
317 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
318 | +# GNU General Public License for more details. |
319 | +# |
320 | +# You should have received a copy of the GNU General Public License |
321 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
322 | +############################################################################## |
323 | +from osv import osv |
324 | +from osv import fields |
325 | +from tools.translate import _ |
326 | +from tools import config |
327 | +import time |
328 | +import datetime |
329 | +import decimal_precision as dp |
330 | + |
331 | + |
332 | +class account_voucher_line(osv.osv): |
333 | + _inherit= "account.voucher.line" |
334 | + |
335 | + |
336 | + def _amount_residual(self, cr, uid, ids, name, args, context=None): |
337 | + currency_pool = self.pool.get('res.currency') |
338 | + for line in self.browse(cr, uid, ids, context=context): |
339 | + ctx = context.copy() |
340 | + ctx.update({'date': line.voucher_id.date}) |
341 | + res = {} |
342 | + company_currency = line.voucher_id.journal_id.company_id.currency_id.id |
343 | + voucher_currency = line.voucher_id.currency_id.id |
344 | + move_line = line.move_line_id or False |
345 | + |
346 | + if not move_line: |
347 | + res[line.id] = 0.0 |
348 | + |
349 | + if move_line: |
350 | + res[line.id] = currency_pool.compute(cr, uid, move_line.currency_id and move_line.currency_id.id or company_currency, voucher_currency, abs(move_line.amount_residual_currency), context=ctx) - line.amount |
351 | + |
352 | + return res |
353 | + |
354 | + _columns={ |
355 | + 'invoice_id' : fields.many2one('account.invoice','Invoice'), |
356 | + 'partner_id' : fields.many2one('res.partner','Partner'), |
357 | + 'amount_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Amount', type='float', store=True), |
358 | + } |
359 | + |
360 | + def onchange_partner_id(self, cr, uid, ids, partner_id, context=None): |
361 | + partner_obj = self.pool.get('res.partner') |
362 | + partner_brw = partner_obj.browse(cr,uid,partner_id,context) |
363 | + |
364 | + account_id = partner_brw.property_account_payable.id |
365 | + account_balance = partner_brw.property_account_payable.balance |
366 | + |
367 | + res = {'value' : {'account_id':account_id,'amount':abs(account_balance),}} |
368 | + return res |
369 | + |
370 | +# def onchange_invoice_id(self, cr, uid, ids, inv_id, context=None): |
371 | +# invoice_obj = self.pool.get('account.invoice') |
372 | +# invoice_brw = invoice_obj.browse(cr,uid,inv_id,context) |
373 | +# inv_residual = invoice_brw.residual |
374 | +# aml = self.move_line_id_payment_get(cr, uid, [inv_id]) |
375 | +# res = {'value' : {'amount':inv_residual,'move_line_id':aml[0]}} |
376 | +# return res |
377 | + |
378 | +account_voucher_line() |
379 | + |
380 | + |
381 | +class account_voucher(osv.osv): |
382 | + _inherit='account.voucher' |
383 | + |
384 | + _columns={ |
385 | + 'one_partner':fields.boolean('One Supplier or Customer ?', required=False, help="Check this box if there only one supplier or customer for this voucher"), |
386 | + } |
387 | + |
388 | + def onchange_journal_id(self, cr, uid, ids, journal_id, type,context=None): |
389 | + |
390 | + account_journal_obj = self.pool.get('account.journal') |
391 | + account_brw=account_journal_obj.browse(cr,uid,journal_id,context) |
392 | + account_id = account_brw.default_debit_account_id.id |
393 | + |
394 | + if type=='payment': |
395 | + account_id = account_brw.default_credit_account_id.id |
396 | + |
397 | + res = {'value' : {'account_id':account_id}} |
398 | + return res |
399 | + |
400 | + def onchange_payment_options(self,cr,uid,ids,payment_option,context=None): |
401 | + |
402 | + account_pay_brw = self.browse(cr, uid, ids, context=None) |
403 | + account_journal_obj = self.pool.get('account.journal') |
404 | + amount=0 |
405 | + amount_total=0 |
406 | + writeoff_acc_id=0 |
407 | + if payment_option== 'with_writeoff': |
408 | + for acc_voucher in account_pay_brw: |
409 | + for line in acc_voucher.line_ids: |
410 | + amount_total= line.amount + amount_total |
411 | + amount = acc_voucher.amount - amount_total |
412 | + writeoff_acc_id=account_journal_obj.browse(cr,uid,acc_voucher.journal_id.id,context).default_payment_credit_account_id.id |
413 | + if amount >= 0: |
414 | + writeoff_acc_id=account_journal_obj.browse(cr,uid,acc_voucher.journal_id.id,context).default_payment_debit_account_id.id |
415 | + |
416 | + res = {'value' : {'writeoff_acc_id':writeoff_acc_id}} |
417 | + return res |
418 | + |
419 | + |
420 | + def validate_amount(self,cr,uid,ids,context=None): |
421 | + |
422 | + account_pay_brw = self.browse(cr, uid, ids, context=None) |
423 | + amount_total=0 |
424 | + |
425 | + for acc_voucher in account_pay_brw: |
426 | + if acc_voucher.payment_option== 'without_writeoff': |
427 | + for line in acc_voucher.line_ids: |
428 | + amount_total= line.amount + amount_total |
429 | + if not amount_total == acc_voucher.amount: |
430 | + raise osv.except_osv(_('Bad Total !'),_("Please verify the Amount of Payment !\n The Paid Amount no match the computed total")) |
431 | + |
432 | + return True |
433 | + |
434 | +# def proforma_voucher(self, cr, uid, ids, context=None): |
435 | +# #~ self.action_move_line_create(cr, uid, ids, context=context) |
436 | +# self.validate_amount(cr,uid,ids,context=context) |
437 | +# return True |
438 | + |
439 | + |
440 | + |
441 | + |
442 | + def add_data(self, cr, uid, ids, parm, datas, context): |
443 | + move_line_pool = self.pool.get('account.move.line') |
444 | + aml_lst = [] |
445 | + aml_cr_lst = [] |
446 | + aml_dr_lst = [] |
447 | + data = datas.copy() |
448 | + if data and data[data.keys()[0]].get('line_ids',False): |
449 | + for aml in data[data.keys()[0]]['line_ids']: |
450 | + if aml.get('move_line_id',False): |
451 | + aml_brw = move_line_pool.browse(cr, uid, aml['move_line_id'], context=context) |
452 | + residual_amount = aml['amount_unreconciled'] - aml['amount'] |
453 | + aml.update({'invoice_id':aml_brw.invoice.id, 'partner_id':parm['partner_id'], 'amount_residual':residual_amount}) |
454 | + aml_lst.append(aml) |
455 | + if aml['type'] == 'cr': |
456 | + aml_cr_lst.append(aml) |
457 | + else: |
458 | + aml_dr_lst.append(aml) |
459 | + |
460 | + data[data.keys()[0]].update({'line_ids':aml_lst,'line_cr_ids':aml_cr_lst,'line_dr_ids':aml_dr_lst}) |
461 | + #print 'data: despues: ',data |
462 | + return data |
463 | + |
464 | + def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): |
465 | + data = super(account_voucher, self).onchange_partner_id(cr, uid, ids, partner_id, |
466 | + journal_id, price, currency_id, ttype, date, context) |
467 | + param = { |
468 | + 'partner_id':partner_id, |
469 | + 'journal_id':journal_id, |
470 | + 'price':price, |
471 | + 'currency_id':currency_id, |
472 | + 'ttype':ttype, |
473 | + 'date':date |
474 | + } |
475 | + res = self.add_data(cr, uid, ids, param, data, context) |
476 | + |
477 | + return res |
478 | + |
479 | + |
480 | + def voucher_move_line_get_item(self, cr, uid, voucher, line, move_id, company_currency, current_currency, context): |
481 | + partner_id = voucher.partner_id.id |
482 | + if context.get('one_partner',False): |
483 | + partner_id = line.partner_id.id |
484 | + return { |
485 | + 'journal_id': voucher.journal_id.id, |
486 | + 'period_id': voucher.period_id.id, |
487 | + 'name': line.name and line.name or '/', |
488 | + 'account_id': line.account_id.id, |
489 | + 'move_id': move_id, |
490 | + 'partner_id': partner_id, |
491 | + 'currency_id': company_currency <> current_currency and current_currency or False, |
492 | + 'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False, |
493 | + 'quantity': 1, |
494 | + 'credit': 0.0, |
495 | + 'debit': 0.0, |
496 | + 'date': voucher.date |
497 | + } |
498 | + |
499 | +account_voucher() |
500 | |
501 | === added file 'bank_management/check/account_voucher_payment_view.xml' |
502 | --- bank_management/check/account_voucher_payment_view.xml 1970-01-01 00:00:00 +0000 |
503 | +++ bank_management/check/account_voucher_payment_view.xml 2011-10-05 12:59:12 +0000 |
504 | @@ -0,0 +1,191 @@ |
505 | +<?xml version="1.0"?> |
506 | +<openerp> |
507 | + <data> |
508 | + |
509 | + <record id="view_voucher_filter_vendor_pay_XYZ" model="ir.ui.view"> |
510 | + <field name="name">account.voucher.purchase.pay.select</field> |
511 | + <field name="model">account.voucher</field> |
512 | + <field name="type">search</field> |
513 | + <field name="arch" type="xml"> |
514 | + <search string="Search Vouchers"> |
515 | + <group col='8' colspan='4'> |
516 | + <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/> |
517 | + <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/> |
518 | + <separator orientation="vertical"/> |
519 | + <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/> |
520 | + <separator orientation="vertical"/> |
521 | + <field name="date"/> |
522 | + <field name="number"/> |
523 | + </group> |
524 | + <newline/> |
525 | + <group col='8' colspan='4'> |
526 | + <field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/> |
527 | + <field name="period_id" groups="base.group_extended"/> |
528 | + </group> |
529 | + <newline/> |
530 | + <group expand="0" string="Extended Filters..." col='8' colspan='4'> |
531 | + <field name="reference"/> |
532 | + <field name="name"/> |
533 | + <field name="narration"/> |
534 | + <field name="amount"/> |
535 | + </group> |
536 | + <newline/> |
537 | + <group expand="0" string="Group By..." colspan="4" col="10"> |
538 | + <filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/> |
539 | + <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/> |
540 | + <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id','visible':True}"/> |
541 | + <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/> |
542 | + </group> |
543 | + </search> |
544 | + </field> |
545 | + </record> |
546 | + |
547 | + <record model="ir.ui.view" id="view_vendor_payment_form_XYZ"> |
548 | + <field name="name">account.voucher.payment.form</field> |
549 | + <field name="model">account.voucher</field> |
550 | + <field name="type">form</field> |
551 | + <field name="arch" type="xml"> |
552 | + <form string="Bill Payment"> |
553 | + <group col="6" colspan="4"> |
554 | + <field name="partner_id" domain="[('supplier','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'invoice_currency':currency_id}" string="Supplier"/> |
555 | + <field name="amount" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)"/> |
556 | + <field name="journal_id" |
557 | + domain="[('type','in',['bank', 'cash'])]" |
558 | + widget="selection" select="1" |
559 | + on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" |
560 | + string="Payment Method"/> |
561 | + <field name="date" select="1" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date, context)"/> |
562 | + <field name="reference" select="1" string="Payment Ref"/> |
563 | + <field name="name" colspan="2"/> |
564 | + <field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/> |
565 | + <field name="account_id" |
566 | + widget="selection" |
567 | + invisible="True"/> |
568 | + <field name="pre_line" invisible="1"/> |
569 | + <field name="type" invisible="True"/> |
570 | + <field name="one_partner" invisible="True"/> |
571 | + </group> |
572 | + <notebook colspan="4"> |
573 | + <page string="Payment Information"> |
574 | + <field name="line_dr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140"> |
575 | + <tree string="Supplier Invoices and Outstanding transactions" editable="bottom"> |
576 | + <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}" |
577 | + on_change="onchange_move_line_id(move_line_id)" |
578 | + domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]" |
579 | + /> |
580 | + <field name="partner_id"/> |
581 | + <field name="invoice_id" widget='many2one' domain="[('partner_id','=',parent.partner_id)]"/> |
582 | + <field name="account_id" groups="base.group_extended" domain="[('type','=','payable')]"/> |
583 | + <field name="date_original" readonly="1"/> |
584 | + <field name="date_due" readonly="1"/> |
585 | + <field name="amount_original" readonly="1"/> |
586 | + <field name="amount_unreconciled" sum="Open Balance" readonly="1"/> |
587 | + <field name="amount" sum="Payment"/> |
588 | + <field name="amount_residual" sum="Residual"/> |
589 | + </tree> |
590 | + </field> |
591 | + <field name="line_cr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}"> |
592 | + <tree string="Credits" editable="bottom"> |
593 | + <field name="move_line_id"/> |
594 | + <field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/> |
595 | + <field name="date_original"/> |
596 | + <field name="amount_original"/> |
597 | + <field name="amount" sum="Payment"/> |
598 | + </tree> |
599 | + </field> |
600 | + <group col="2" colspan="3"> |
601 | + <separator string="Internal Notes" colspan="2"/> |
602 | + <field name="narration" colspan="2" nolabel="1"/> |
603 | + </group> |
604 | + <group col="2" colspan="1"> |
605 | + <group col="2" colspan="1"> |
606 | + <separator string="Payment Options" colspan="2"/> |
607 | + <field name="payment_option" required="1"/> |
608 | + <field name="writeoff_amount" |
609 | + attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/> |
610 | + <field name="writeoff_acc_id" |
611 | + attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}" |
612 | + domain="[('type','=','other')]"/> |
613 | + <field name="comment" |
614 | + attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/> |
615 | + <field name="analytic_id" |
616 | + attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" |
617 | + groups="analytic.group_analytic_accounting"/> |
618 | + </group> |
619 | + <separator string="Other Information" colspan="2"/> |
620 | + <group col="4" colspan="1"> |
621 | + <field name="currency_id" invisible="True"/> |
622 | + <field name="number"/> |
623 | + </group> |
624 | + </group> |
625 | + </page> |
626 | + <page string="Journal Items" groups="base.group_extended" attrs="{'invisible': [('state','!=','posted')]}"> |
627 | + <group col="6" colspan="4"> |
628 | + <field name="period_id"/> |
629 | + <field name="audit"/> |
630 | + </group> |
631 | + <field name="move_ids" colspan="4" nolabel="1" readonly="1"> |
632 | + <tree string="Journal Items"> |
633 | + <field name="move_id"/> |
634 | + <field name="ref"/> |
635 | + <field name="date"/> |
636 | + <field name="statement_id"/> |
637 | + <field name="partner_id"/> |
638 | + <field name="account_id"/> |
639 | + <field name="name"/> |
640 | + <field name="debit"/> |
641 | + <field name="credit"/> |
642 | + <field name="state"/> |
643 | + <field name="reconcile_id"/> |
644 | + <field name="amount_currency"/> |
645 | + <field name="currency_id"/> |
646 | + </tree> |
647 | + </field> |
648 | + </page> |
649 | + </notebook> |
650 | + <group col="10" colspan="4"> |
651 | + <field name="state"/> |
652 | + <button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/> |
653 | + <button name="cancel_voucher" string="Unreconcile" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/> |
654 | + <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/> |
655 | +<!-- <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>--> |
656 | + <!-- boton del wizard --> |
657 | + <button name="%(wiz_pay_support)d" type='action' string='Create Support' icon="gtk-execute" states="draft"/> |
658 | + </group> |
659 | + </form> |
660 | + </field> |
661 | + </record> |
662 | + |
663 | + |
664 | + <record id="action_vendor_payment_XYZ" model="ir.actions.act_window"> |
665 | + <field name="name">One Supplier Payment</field> |
666 | + <field name="res_model">account.voucher</field> |
667 | + <field name="view_type">form</field> |
668 | + <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('one_partner','=',True)]</field> |
669 | + <field name="context">{'type':'payment','one_partner':True}</field> |
670 | + <field name="view_id" eval="False"/> |
671 | + <field name="search_view_id" ref="view_voucher_filter_vendor_pay_XYZ"/> |
672 | + <field name="target">current</field> |
673 | + <field name="help">The supplier payment form allows you to track the payment you do to your suppliers. When you select a supplier, the payment method and an amount for the payment, OpenERP will propose to reconcile your payment with the open supplier invoices or bills.</field> |
674 | + </record> |
675 | + <record id="action_vendor_payment_tree_XYZ" model="ir.actions.act_window.view"> |
676 | + <field eval="1" name="sequence"/> |
677 | + <field name="view_mode">tree</field> |
678 | + <field name="act_window_id" ref="action_vendor_payment_XYZ"/> |
679 | + </record> |
680 | + <record id="action_vendor_payment_form_XYZ" model="ir.actions.act_window.view"> |
681 | + <field eval="2" name="sequence"/> |
682 | + <field name="view_mode">form</field> |
683 | + <field name="view_id" ref="view_vendor_payment_form_XYZ"/> |
684 | + <field name="act_window_id" ref="action_vendor_payment_XYZ"/> |
685 | + </record> |
686 | + |
687 | + <menuitem action="action_vendor_payment_XYZ" id="account_voucher.menu_action_vendor_payment_XYZ" icon="STOCK_JUSTIFY_FILL" |
688 | + sequence="12" parent="account.menu_finance_payables"/> |
689 | + |
690 | + |
691 | + |
692 | + |
693 | + |
694 | + </data> |
695 | +</openerp> |
696 | |
697 | === modified file 'bank_management/check/check_book_view.xml' |
698 | --- bank_management/check/check_book_view.xml 2011-09-05 15:59:05 +0000 |
699 | +++ bank_management/check/check_book_view.xml 2011-10-05 12:59:12 +0000 |
700 | @@ -14,19 +14,20 @@ |
701 | <field name="arch" type="xml"> |
702 | <search string="Search Check Book"> |
703 | <group col="10" colspan="4"> |
704 | - <filter name="request" icon="terp-gtk-media-pause" string="Request" domain="[('state','=','request')]" help="Request check book"/> |
705 | + <filter name="request" icon="terp-gtk-media-pause" string="Request" domain="[('state','=','request')]" help="Request check book"/> |
706 | <filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft check book"/> |
707 | <filter name="review" icon="terp-camera_test" string="Review" domain="[('state','=','review')]" help="Review check book"/> |
708 | <filter name="cancel" icon="terp-dialog-close" string="Cancel" domain="[('state','=','cancel')]" help="Cancel check book"/> |
709 | - <filter name="active" icon="terp-check" string="Active" domain="[('state','=','active')]" help="Active check book"/> |
710 | + <filter name="active" icon="terp-check" string="Active" domain="[('state','=','active')]" help="Active check book"/> |
711 | + <filter name="done" icon="terp-locked" string="Done" domain="[('state','=','done')]" help="Active check book"/> |
712 | + <filter name="hibernate" icon="terp-gtk-media-pause" string="Hibernate" domain="[('state','=','hibernate')]" help="Hibernate check book"/> |
713 | <separator orientation="vertical"/> |
714 | - <field name="name"/> |
715 | - <field name="cancel_check"/> |
716 | + <field name="name"/> |
717 | + <field name="cancel_check"/> |
718 | <field name="accounting_bank_id"/> |
719 | <field name="bank_id"/> |
720 | <field name="qty_check_selection"/> |
721 | <field name="state"/> |
722 | - |
723 | </group> |
724 | <newline/> |
725 | <group expand="0" string="Group By..."> |
726 | @@ -39,7 +40,7 @@ |
727 | </field> |
728 | </record> |
729 | |
730 | - |
731 | + |
732 | <record id="view_check_book_form" model="ir.ui.view"> |
733 | <field name="name">check.book.form</field> |
734 | <field name="model">check.book</field> |
735 | @@ -58,7 +59,7 @@ |
736 | <field name="qty_check_selection"/> |
737 | <field name="fixed_prefix"/> |
738 | </group> |
739 | - <group attrs="{'invisible':[('fixed_prefix','=',False)]}" colspan="2" col='6'> |
740 | + <group attrs="{'invisible':[('fixed_prefix','=',False)]}" colspan="2" col='6'> |
741 | <field name="prefix"/> |
742 | <hpaned/> |
743 | <hpaned/> |
744 | @@ -70,8 +71,8 @@ |
745 | <field name="check_note_ids" nolabel="1"> |
746 | <tree string="Checks" editable='top' > |
747 | <field name="number" attrs="{'required':[('state','!=','draft')],'readonly':[('state','!=','draft')]}"/> |
748 | + <field name="prefix" attrs="{'required':[('state','!=','draft')],'readonly':[('state','!=','draft')]}"/> |
749 | <field name="suffix" attrs="{'required':[('state','!=','draft')],'readonly':[('state','!=','draft')]}"/> |
750 | - <field name="prefix" attrs="{'required':[('state','!=','draft')],'readonly':[('state','!=','draft')]}"/> |
751 | <field name="state"/> |
752 | </tree> |
753 | |
754 | @@ -89,7 +90,7 @@ |
755 | <field name="check_book_request_id"/> |
756 | <field name="cancel_check"/> |
757 | </group> |
758 | - <group attrs="{'invisible':[('cancel_check','!=','otros')]}" colspan="5" col='6'> |
759 | + <group attrs="{'invisible':[('cancel_check','!=','otros')]}" colspan="5" col='6'> |
760 | <field name="notes"/> |
761 | </group> |
762 | <group colspan="2" col='6'> |
763 | @@ -120,12 +121,11 @@ |
764 | <field name="model">check.book</field> |
765 | <field name="type">tree</field> |
766 | <field name="arch" type="xml"> |
767 | - <tree string="Chequeras" colors="green:state=='draft';red:qty_active<10 ;blue:state=='hibernate';gray:state=='done' or state=='cancel'"> |
768 | -<!-- <tree string="Chequeras" colors="green:state=='draft';red:qty_active<10 ;blue:state=='hibernate';gray:state=='done' or state=='cancel' ;purple:state=='active' and qty_active>9 ">--> |
769 | - <field name="name"/> |
770 | + <tree string="Check Books" colors="green:state=='draft';red:qty_active<10 ;blue:state=='hibernate';gray:state=='done' or state=='cancel'"> |
771 | + <field name="name"/> |
772 | <field name="accounting_bank_id"/> |
773 | <field name="bank_id"/> |
774 | - <field name="from_suffix"/> |
775 | + <field name="from_suffix"/> |
776 | <field name="to_suffix"/> |
777 | <field name="fixed_prefix"/> |
778 | <field name="prefix"/> |
779 | @@ -145,8 +145,8 @@ |
780 | <field name="res_model">check.book</field> |
781 | <field name="view_type">form</field> |
782 | <field name="view_mode">tree,form</field> |
783 | - <field name="search_view_id" ref="view_check_book_filter"/> |
784 | - <field name="help">With Check Book you can create and manage Check Book.</field> |
785 | + <field name="search_view_id" ref="view_check_book_filter"/> |
786 | + <field name="help">With Check Book you can create and manage Check Book.</field> |
787 | </record> |
788 | <menuitem |
789 | action="action_check_book" |
790 | |
791 | === modified file 'bank_management/check/check_note.py' |
792 | --- bank_management/check/check_note.py 2011-09-25 23:55:38 +0000 |
793 | +++ bank_management/check/check_note.py 2011-10-05 12:59:12 +0000 |
794 | @@ -124,7 +124,7 @@ |
795 | if isinstance(ids, (int, long)): |
796 | ids = [ids] |
797 | reads = self.read(cr, uid, ids, ['number'], context) |
798 | - return [(x['number']) for x in reads] |
799 | + return [(x['id'],x['number']) for x in reads] |
800 | |
801 | def copy(self, cr, uid, id, default=None, context=None): |
802 | raise osv.except_osv(_('Warning !'), _('You can not duplicate this document!!!')) |
803 | |
804 | === modified file 'bank_management/check/check_report.xml' |
805 | --- bank_management/check/check_report.xml 2011-09-05 17:51:53 +0000 |
806 | +++ bank_management/check/check_report.xml 2011-10-05 12:59:12 +0000 |
807 | @@ -49,15 +49,15 @@ |
808 | header = "False" |
809 | attachment="('DET %s %s' %(object.bank_id.name ,object.check_note_id.number))" |
810 | menu="False"/> |
811 | -<!-- <report--> |
812 | -<!-- id="voucher_pay_support_report"--> |
813 | -<!-- menu="False"--> |
814 | -<!-- model="voucher.pay.support.wizard"--> |
815 | -<!-- name="check_print"--> |
816 | -<!-- rml="addons/account_voucher_pay_order/report/check.rml"--> |
817 | -<!-- string="Print Check"--> |
818 | -<!-- auto="False"--> |
819 | -<!-- header="False"/>--> |
820 | + <report |
821 | + id="check_fmt_report" |
822 | + menu="False" |
823 | + model="voucher.pay.support.wizard" |
824 | + name="check_print" |
825 | + rml="bank_management/check/report/check.rml" |
826 | + string="Print Check" |
827 | + auto="False" |
828 | + header="False"/> |
829 | |
830 | </data> |
831 | </openerp> |
832 | |
833 | === added directory 'bank_management/check/demo' |
834 | === added file 'bank_management/check/demo/demo.xml' |
835 | --- bank_management/check/demo/demo.xml 1970-01-01 00:00:00 +0000 |
836 | +++ bank_management/check/demo/demo.xml 2011-10-05 12:59:12 +0000 |
837 | @@ -0,0 +1,14 @@ |
838 | +<?xml version="1.0" ?> |
839 | +<openerp> |
840 | + <data noupdate="1"> |
841 | + <record id="res_partner_bank_0" model="res.partner.bank"> |
842 | + <field model="account.account" name="trans_account_id" search="[('name', '=', u'Bank Current Account')]"/> |
843 | + <field model="account.journal" name="journal_id" search="[('name', '=', u'Bank Journal ')]"/> |
844 | + <field name="state">bank</field> |
845 | + <field name="partner_id" ref="base.main_partner"/> |
846 | + <field model="account.account" name="bank_account_id" search="[('name', '=', u'Bank Current Account')]"/> |
847 | + <field name="bank" ref="res_bank_mercantil"/> |
848 | + <field name="acc_number">1057542233</field> |
849 | + </record> |
850 | + </data> |
851 | +</openerp> |
852 | |
853 | === modified file 'bank_management/check/report/__init__.py' |
854 | --- bank_management/check/report/__init__.py 2011-09-05 19:40:42 +0000 |
855 | +++ bank_management/check/report/__init__.py 2011-10-05 12:59:12 +0000 |
856 | @@ -32,4 +32,4 @@ |
857 | import reporte_check_book_request |
858 | import report_voucher |
859 | import report_voucher_amount |
860 | -#import check |
861 | +import check |
862 | |
863 | === renamed file 'bank_management/check/report/tmp/check.py' => 'bank_management/check/report/check.py' |
864 | --- bank_management/check/report/tmp/check.py 2011-09-25 23:55:38 +0000 |
865 | +++ bank_management/check/report/check.py 2011-10-05 12:59:12 +0000 |
866 | @@ -42,10 +42,10 @@ |
867 | self.contecito = context |
868 | self.localcontext.update({ |
869 | 'time': time, |
870 | - 'obt_texto':self.obt_texto , |
871 | - 'get_beneficiario':self.get_beneficiario , |
872 | - 'get_monto':self.get_monto , |
873 | - 'get_fecha': self.get_fecha , |
874 | + 'obt_texto':self.obt_texto, |
875 | + 'get_beneficiario':self.get_beneficiario, |
876 | + 'get_monto':self.get_monto, |
877 | + 'get_fecha': self.get_fecha, |
878 | }) |
879 | |
880 | def obt_texto(self): |
881 | @@ -119,8 +119,8 @@ |
882 | report_sxw_ext.report_sxw( #nuevo |
883 | #report_sxw.report_sxw( #original |
884 | 'report.check_print', |
885 | - 'voucher.pay.support.wizard' , |
886 | - 'addons/account_voucher_pay_order/report/check.rml' , |
887 | - parser=report_check_voucher_pay , |
888 | + 'voucher.pay.support.wizard', |
889 | + 'addons/bank_management/check/report/check.rml', |
890 | + parser=report_check_voucher_pay, |
891 | header = False |
892 | ) |
893 | |
894 | === renamed file 'bank_management/check/report/tmp/check.rml' => 'bank_management/check/report/check.rml' |
895 | === added file 'bank_management/check/res_company.py' |
896 | --- bank_management/check/res_company.py 1970-01-01 00:00:00 +0000 |
897 | +++ bank_management/check/res_company.py 2011-10-05 12:59:12 +0000 |
898 | @@ -0,0 +1,52 @@ |
899 | +#!/usr/bin/python |
900 | +# -*- encoding: utf-8 -*- |
901 | +########################################################################### |
902 | +# Module Writen to OpenERP, Open Source Management Solution |
903 | +# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). |
904 | +# All Rights Reserved |
905 | +###############Credits###################################################### |
906 | +# Coded by: Humberto Arocha <humberto@openerp.com.ve> |
907 | +# Angelica Barrios <angélicaisabelb@gmail.com> |
908 | +# María Gabriela Quilarque <gabrielaquilarque97@gmail.com> |
909 | +# Javier Duran <javier.duran@netquatro.com> |
910 | +# Planified by: Nhomar Hernandez |
911 | +# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve |
912 | +# Audited by: Humberto Arocha humberto@openerp.com.ve |
913 | +############################################################################# |
914 | +# This program is free software: you can redistribute it and/or modify |
915 | +# it under the terms of the GNU General Public License as published by |
916 | +# the Free Software Foundation, either version 3 of the License, or |
917 | +# (at your option) any later version. |
918 | +# |
919 | +# This program is distributed in the hope that it will be useful, |
920 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
921 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
922 | +# GNU General Public License for more details. |
923 | +# |
924 | +# You should have received a copy of the GNU General Public License |
925 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
926 | +############################################################################## |
927 | + |
928 | + |
929 | +from osv import osv |
930 | +from osv import fields |
931 | +from tools.translate import _ |
932 | +from tools import config |
933 | + |
934 | + |
935 | +class res_company(osv.osv): |
936 | + _inherit = "res.company" |
937 | + |
938 | + _columns = { |
939 | + 'expiry':fields.integer('Dias de Caducidad', readonly=False, required=True), |
940 | + 'transitory': fields.boolean('Cuenta Transitoria', help="Manejo de Cuentas Transitorias"), |
941 | + } |
942 | + _defaults = { |
943 | + 'expiry': lambda *a: 30, |
944 | + } |
945 | +res_company() |
946 | + |
947 | + |
948 | + |
949 | + |
950 | + |
951 | |
952 | === added file 'bank_management/check/res_company_view.xml' |
953 | --- bank_management/check/res_company_view.xml 1970-01-01 00:00:00 +0000 |
954 | +++ bank_management/check/res_company_view.xml 2011-10-05 12:59:12 +0000 |
955 | @@ -0,0 +1,35 @@ |
956 | +<?xml version="1.0" ?> |
957 | +<openerp> |
958 | + <data> |
959 | + |
960 | + <record id="il_company" model="ir.ui.view"> |
961 | + <field name="name">il_company</field> |
962 | + <field name="model">res.company</field> |
963 | + <field name="type">form</field> |
964 | + <field name="inherit_id" ref="base.view_company_form"/> |
965 | + <field name="arch" type="xml"> |
966 | + <page string="Configuration" position="inside"> |
967 | + <separator string="Expiry Date" colspan="4"/> |
968 | + <field name="expiry"/> |
969 | + <newline/> |
970 | + </page> |
971 | + </field> |
972 | + </record> |
973 | + |
974 | + <record id="il_company2" model="ir.ui.view"> |
975 | + <field name="name">il_company2</field> |
976 | + <field name="model">res.company</field> |
977 | + <field name="type">form</field> |
978 | + <field name="inherit_id" ref="base.view_company_form"/> |
979 | + <field name="arch" type="xml"> |
980 | + <page string="Configuration" position="inside"> |
981 | + <separator string="Transitory Account" colspan="4"/> |
982 | + <field name="transitory"/> |
983 | + <newline/> |
984 | + </page> |
985 | + </field> |
986 | + </record> |
987 | + |
988 | + |
989 | + </data> |
990 | +</openerp> |
991 | |
992 | === modified file 'bank_management/check/voucher_pay_support.py' |
993 | --- bank_management/check/voucher_pay_support.py 2011-09-25 23:55:38 +0000 |
994 | +++ bank_management/check/voucher_pay_support.py 2011-10-05 12:59:12 +0000 |
995 | @@ -138,7 +138,7 @@ |
996 | self.write(cr,uid,i.id,{'state' : 'open', 'name':i.name }) |
997 | else: |
998 | raise osv.except_osv(_('Alert !'), _('Enter the acknowledgment')) |
999 | - |
1000 | + return True |
1001 | |
1002 | def get_realizado(self, cr, uid, ids, context={}): |
1003 | soporte = self.browse(cr,uid,ids) |
1004 | @@ -155,7 +155,7 @@ |
1005 | self.create_voucher(cr, uid, ids,i, context) |
1006 | else: |
1007 | raise osv.except_osv(_('Alert !'), _('You must enter Account Bank Transitional: %s')%(i.accounting_bank_id.bank_id.name)) |
1008 | - |
1009 | + return True |
1010 | |
1011 | |
1012 | def create_voucher(self, cr, uid, ids, soporte, context=None): |
1013 | |
1014 | === modified file 'bank_management/check/wizard/__init__.py' |
1015 | --- bank_management/check/wizard/__init__.py 2011-09-25 23:55:38 +0000 |
1016 | +++ bank_management/check/wizard/__init__.py 2011-10-05 12:59:12 +0000 |
1017 | @@ -29,5 +29,5 @@ |
1018 | |
1019 | #import voucher_pay_support_wizard |
1020 | import cancel_voucher_pay_support |
1021 | -#import voucher_pay_support_wizard_pay_order |
1022 | +import voucher_pay_support_wizard_pay_order |
1023 | import chk_book_gral |
1024 | |
1025 | === modified file 'bank_management/check/wizard/chk_book_gral.xml' |
1026 | --- bank_management/check/wizard/chk_book_gral.xml 2011-09-01 01:24:16 +0000 |
1027 | +++ bank_management/check/wizard/chk_book_gral.xml 2011-10-05 12:59:12 +0000 |
1028 | @@ -6,33 +6,35 @@ |
1029 | <field name="model">gral.check.book</field> |
1030 | <field name="type">form</field> |
1031 | <field name="arch" type="xml"> |
1032 | - <form string="Reporte General de Chequeras" > |
1033 | - <group colspan="4" col='4'> |
1034 | - <field name="check_book_id" nolabel="1"/> |
1035 | - </group> |
1036 | - <group colspan="4"> |
1037 | - <separator string="Periodo" colspan="4"/> |
1038 | - <field name="state_check_note"/> |
1039 | - <newline/> |
1040 | - <group attrs="{'invisible':[('state_check_note','=','sin_filtro')]}" colspan="4"> |
1041 | - <field name="tiempo"/> |
1042 | + <form string="General Report Checkbooks" > |
1043 | + <group height="300" width="500" colspan="4" col='4'> |
1044 | + <group colspan="4" col='4'> |
1045 | + <field name="check_book_id" nolabel="1"/> |
1046 | + </group> |
1047 | + <group colspan="4"> |
1048 | + <separator string="Period" colspan="4"/> |
1049 | + <field name="state_check_note"/> |
1050 | <newline/> |
1051 | - <group attrs="{'invisible':[('tiempo','=','sin_filtro')]}" colspan="4"> |
1052 | - <group attrs="{'invisible':[('tiempo','=','mes')]}" colspan="4"> |
1053 | - <separator string=" Filtrado por Fecha" colspan="4"/> |
1054 | - <field name="desde"/> |
1055 | - <field name="hasta"/> |
1056 | - </group> |
1057 | - <group attrs="{'invisible':[('tiempo','=','fecha')]}" colspan="4"> |
1058 | - <separator string="Filtrado por Periodos" colspan="4"/> |
1059 | - <field name="mes" colspan="4" nolabel="1"/> |
1060 | + <group attrs="{'invisible':[('state_check_note','=','sin_filtro')]}" colspan="4"> |
1061 | + <field name="tiempo"/> |
1062 | + <newline/> |
1063 | + <group attrs="{'invisible':[('tiempo','=','sin_filtro')]}" colspan="4"> |
1064 | + <group attrs="{'invisible':[('tiempo','=','mes')]}" colspan="4"> |
1065 | + <separator string=" Filter by Date" colspan="4"/> |
1066 | + <field name="desde"/> |
1067 | + <field name="hasta"/> |
1068 | + </group> |
1069 | + <group attrs="{'invisible':[('tiempo','=','fecha')]}" colspan="4"> |
1070 | + <separator string="Filter by Period" colspan="4"/> |
1071 | + <field name="mes" colspan="4" nolabel="1"/> |
1072 | + </group> |
1073 | </group> |
1074 | </group> |
1075 | </group> |
1076 | + <group colspan="2" col="4"> |
1077 | + <button name="check_report" string="Check Book Report" type="object" icon="gtk-print"/> |
1078 | + </group> |
1079 | </group> |
1080 | - <group colspan="2" col="4"> |
1081 | - <button name="check_report" string="Check Book Report" type="object" icon="gtk-print"/> |
1082 | - </group> |
1083 | </form> |
1084 | </field> |
1085 | </record> |
1086 | |
1087 | === renamed file 'bank_management/check/wizard/tmp/voucher_pay_support_wizard_pay_order.py' => 'bank_management/check/wizard/voucher_pay_support_wizard_pay_order.py' |
1088 | --- bank_management/check/wizard/tmp/voucher_pay_support_wizard_pay_order.py 2011-09-25 23:55:38 +0000 |
1089 | +++ bank_management/check/wizard/voucher_pay_support_wizard_pay_order.py 2011-10-05 12:59:12 +0000 |
1090 | @@ -36,46 +36,46 @@ |
1091 | _name = "voucher.pay.support.wizard" |
1092 | _columns = { |
1093 | 'name':fields.char('Nombre', 64), |
1094 | - 'accounting_bank_id':fields.many2one('res.bank','Cuenta Bancaria', readonly=False , required=True), |
1095 | - 'check_note_id': fields.many2one('check.note', 'Non. Cheque', required=True, readonly=True, domain="[('accounting_bank_id','=',accounting_bank_id)]"), |
1096 | - 'bank_id':fields.related('check_note_id','bank_id',type='many2one',relation='res.bank.entity',string='Banco', store=True, readonly=True), |
1097 | - 'min_lim':fields.related('bank_id','min_lim',type='integer',relation='res.bank.entity',string='Limite minimo (Bs.)',readonly=True,store=False), |
1098 | - 'max_lim':fields.related('bank_id','max_lim',type='integer',relation='res.bank.entity',string='Limite maximo (Bs.)',readonly=True,store=False), |
1099 | + 'accounting_bank_id':fields.many2one('res.partner.bank','Bank Account', readonly=False , required=True), |
1100 | + 'check_note_id': fields.many2one('check.note', 'Check No', required=True, readonly=False, domain="[('accounting_bank_id','=',accounting_bank_id)]"), |
1101 | + 'bank_id':fields.related('check_note_id','bank_id',type='many2one',relation='res.bank',string='Bank', store=True, readonly=False), |
1102 | + 'min_lim':fields.related('bank_id','min_lim',type='integer',relation='res.bank',string='Min. Limit (Bs.)',readonly=False,store=False), |
1103 | + 'max_lim':fields.related('bank_id','max_lim',type='integer',relation='res.bank',string='Max Limit (Bs.)',readonly=False,store=False), |
1104 | 'company_id': fields.many2one('res.company', 'Company', required=True), |
1105 | - 'expiry':fields.related('company_id','expiry', type='integer',relation='res.company',string='Dias de Caducidad',readonly=True,store=True), |
1106 | - 'payee_id':fields.many2one('res.partner.address','Beneficiario',required=False, readonly=True), |
1107 | - 'partner_id':fields.many2one('res.partner','Contrapartida',required=True, readonly=True), |
1108 | + 'expiry':fields.related('company_id','expiry', type='integer',relation='res.company',string='expiration days',readonly=False,store=True), |
1109 | + 'payee_id':fields.many2one('res.partner.address','Beneficiary',required=False, readonly=False), |
1110 | + 'partner_id':fields.many2one('res.partner','Contrapartida',required=True, readonly=False), |
1111 | 'state': fields.selection([ |
1112 | ('draft','Draft'), |
1113 | ('open','Open'), |
1114 | ('done','Done'), |
1115 | ('cancel','Cancel'), |
1116 | - ],'Estado', select=True, readonly=True, help="Estado del Cheque Voucher"), |
1117 | + ],'Estado', select=True, readonly=True, help="Chech note state"), |
1118 | 'wire':fields.char('Transferencia',size=26), |
1119 | 'type': fields.selection([ |
1120 | - ('check','Cheque'), |
1121 | - ('wire','Transferencia'), |
1122 | + ('check','Check'), |
1123 | + ('wire','Transfer'), |
1124 | ],'Type', required=True, select=True), |
1125 | - 'bool_good': fields.boolean('Si se imprimio'), |
1126 | - 'bool_bad': fields.boolean('No se imprimio'), |
1127 | - 'bool_sure': fields.boolean('¿Estas Seguro?'), |
1128 | - 'notes':fields.char('Motivo',size=256, required=False, readonly=False ), |
1129 | + 'bool_good': fields.boolean('Printed'), |
1130 | + 'bool_bad': fields.boolean('No Printed'), |
1131 | + 'bool_sure': fields.boolean('Are you sure?'), |
1132 | + 'notes':fields.char('Reason',size=256, required=False, readonly=False ), |
1133 | 'cancel_check_note': fields.selection([ |
1134 | - ('print','Error de Impresion') , |
1135 | - ('perdida','Perdida o extravio') , |
1136 | - ('dan_fis','Dano fisico') , |
1137 | - ('pago','Pago no realizado') , |
1138 | - ('devuelto','Cheque Devuelto') , |
1139 | - ('caduco','Caduco') , |
1140 | - ('otros','Otros') , |
1141 | - ],'Motivo de Cancelacion', select=True), |
1142 | - 'amount':fields.float('Total a Pagar', readonly=True), |
1143 | - 'date':fields.date('Date', readonly=True), |
1144 | + ('print','Error de Impresion'), |
1145 | + ('perdida','Loss or misplacement'), |
1146 | + ('dan_fis','Physical damage'), |
1147 | + ('pago','Payment is not made'), |
1148 | + ('devuelto','Returned check'), |
1149 | + ('caduco','Expired'), |
1150 | + ('otros','Others'), |
1151 | + ],'Reason for Cancellation', select=True), |
1152 | + 'amount':fields.float('Payment Amount', readonly=False), |
1153 | + 'date':fields.date('Date', readonly=False), |
1154 | } |
1155 | |
1156 | def accion_tipo(self, cr, uid, ids, context=None): |
1157 | - this = self.browse(cr, uid, ids[0]) |
1158 | - tipo=this.type |
1159 | + obj = self.browse(cr, uid, ids[0]) |
1160 | + tipo=obj.type |
1161 | obj_model = self.pool.get('ir.model.data') |
1162 | if tipo=="check": |
1163 | model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_voucher_pay_support_wizard_check')]) |
1164 | @@ -95,11 +95,12 @@ |
1165 | |
1166 | |
1167 | def action_cheque(self, cr, uid, ids, context=None): |
1168 | - this = self.browse(cr, uid, ids[0]) |
1169 | + obj = self.browse(cr, uid, ids[0]) |
1170 | obj_model = self.pool.get('ir.model.data') |
1171 | - check_book = self.pool.get('check.book') |
1172 | - check_note = self.pool.get('check.note') |
1173 | - che_b= check_book.search(cr, uid, [('accounting_bank_id','=',this.accounting_bank_id.id), ('state','=',"active")], limit = 1) |
1174 | + check_book = self.pool.get('check.book') |
1175 | + check_note = self.pool.get('check.note') |
1176 | + che_b= check_book.search(cr, uid, [('accounting_bank_id','=',obj.accounting_bank_id.id), ('state','=',"active")], limit = 1) |
1177 | + |
1178 | if che_b: |
1179 | che_n= check_note.search(cr, uid, [('check_book_id','=',che_b[0]), ('state','=',"active")], limit = 1) |
1180 | else: |
1181 | @@ -107,8 +108,8 @@ |
1182 | id=context["active_id"] |
1183 | a_v=self.pool.get('account.voucher') |
1184 | obj_account_v=a_v.browse(cr, uid, id, context=None) |
1185 | - context.update({'accounting_bank_id': this.accounting_bank_id.id}) |
1186 | - context.update({'bank_id': this.accounting_bank_id.bank_id.id}) |
1187 | + context.update({'accounting_bank_id': obj.accounting_bank_id.id}) |
1188 | + context.update({'bank_id': obj.accounting_bank_id.bank.id}) |
1189 | context.update({'check_note_id': che_n[0]}) |
1190 | context.update({'payee_id': obj_account_v.payee_id.id}) |
1191 | context.update({'partner_id': obj_account_v.partner_id.id}) |
1192 | @@ -127,13 +128,13 @@ |
1193 | 'target': 'new', |
1194 | 'context': context, |
1195 | 'domain': str([ |
1196 | - ('accounting_bank_id', '=', this.accounting_bank_id.id) , |
1197 | - ('bank_id', '=', this.accounting_bank_id.bank_id.id) , |
1198 | - ('check_note_id', '=', che_n[0]) , |
1199 | - ('partner_id', '=', obj_account_v.partner_id.id) , |
1200 | - ('payee_id', '=', obj_account_v.payee_id.id) , |
1201 | - ('amount', '=', obj_account_v.amount) , |
1202 | - ('date', '=', obj_account_v.date)]) |
1203 | + ('accounting_bank_id', '=', obj.accounting_bank_id.id), |
1204 | + ('bank_id', '=', obj.accounting_bank_id.bank.id), |
1205 | + ('check_note_id', '=', che_n[0]), |
1206 | + ('partner_id', '=', obj_account_v.partner_id.id), |
1207 | + ('payee_id', '=', obj_account_v.payee_id.id), |
1208 | + ('amount', '=', obj_account_v.amount), |
1209 | + ('date', '=', obj_account_v.date)]) |
1210 | } |
1211 | |
1212 | def pop_check_printer(self, cr, uid, ids, context=None): |
1213 | @@ -151,29 +152,28 @@ |
1214 | } |
1215 | |
1216 | def pop_check(self, cr, uid, ids, context=None): |
1217 | - this = self.browse(cr, uid, ids[0]) |
1218 | + obj = self.browse(cr, uid, ids[0]) |
1219 | created_account_voucher = [] |
1220 | - if this.bool_sure: #si selecciono la opcion estas seguro? |
1221 | - if this.bool_bad: #si el cheque esta malo |
1222 | + if obj.bool_sure: #si selecciono la opcion estas seguro? |
1223 | + if obj.bool_bad: #si el cheque esta malo |
1224 | vista="view_voucher_pay_support_wizard_escribir_nota" #muestra la interface para escribir la razon en la nota |
1225 | else: #si el cheque esta bien |
1226 | - if this.bool_bad==False and this.bool_good == False: #no selecciono ninguna opcion |
1227 | + if obj.bool_bad==False and obj.bool_good == False: #no selecciono ninguna opcion |
1228 | raise osv.except_osv(_('Atencion !'), _('Ingrese al menos una opcion!!!')) |
1229 | check_note = self.pool.get('check.note') |
1230 | payee_id = self.pool.get('res.partner.address') |
1231 | - accounting_bank_id = self.pool.get('res.bank') |
1232 | - bank_id = self.pool.get('res.bank.entity') |
1233 | + accounting_bank_id = self.pool.get('res.partner.bank') |
1234 | + bank_id = self.pool.get('res.bank') |
1235 | contrapartida = self.pool.get('res.partner') |
1236 | compania = self.pool.get('res.company') |
1237 | account_voucher = self.pool.get('account.voucher') |
1238 | - |
1239 | |
1240 | obj_check_note=check_note.browse(cr, uid, context["check_note_id"], context=None) |
1241 | - try: |
1242 | + payee=False |
1243 | + if context.get('payee_id',False): |
1244 | obj_payee_id=payee_id.browse(cr, uid, context["payee_id"], context=None) |
1245 | payee=obj_payee_id.id |
1246 | - except: |
1247 | - payee=False |
1248 | + |
1249 | obj_accounting_bank_id=accounting_bank_id.browse(cr, uid, context["accounting_bank_id"], context=None) |
1250 | obj_bank_id= bank_id.browse(cr, uid, context["bank_id"], context=None) |
1251 | obj_contrapartida=contrapartida.browse(cr, uid, context["partner_id"], context=None) |
1252 | @@ -184,18 +184,17 @@ |
1253 | #Se crea el documento (CREATE) voucher.pay.support con los datos "Soporte de Pago" |
1254 | voucher_pay=self.pool.get('voucher.pay.support') |
1255 | voucher_pay_id=voucher_pay.create(cr, uid,{ |
1256 | - 'check_note_id':obj_check_note.id , |
1257 | - 'company_id': obj_compania.id , |
1258 | - 'partner_id': obj_contrapartida.id , |
1259 | - 'type': 'check' , |
1260 | - 'amount': context["amount"] , |
1261 | - 'date': context["date"] , |
1262 | - 'payee_id':payee , |
1263 | - 'accounting_bank_id':obj_accounting_bank_id.id , |
1264 | - |
1265 | - },context=None) |
1266 | + 'check_note_id':obj_check_note.id, |
1267 | + 'company_id': obj_compania.id, |
1268 | + 'partner_id': obj_contrapartida.id, |
1269 | + 'type': 'check', |
1270 | + 'amount': context["amount"], |
1271 | + 'date': context["date"], |
1272 | + 'payee_id':payee, |
1273 | + 'accounting_bank_id':obj_accounting_bank_id.id, |
1274 | + },context=None) |
1275 | ids2=[] |
1276 | - ids2.append(context["account_voucher_id"]) |
1277 | + ids2.append(context["account_voucher_id"]) |
1278 | #Se guarda el account_voucher |
1279 | obj_account_voucher.write({'voucher_pay_support_id':voucher_pay_id}) |
1280 | #Se escribe el diario y la cuenta contable en el modelo accout_voucher |
1281 | @@ -208,22 +207,22 @@ |
1282 | if cuenta_transitoria: |
1283 | obj_account_voucher.write({'account_id':obj_accounting_bank_id.trans_account_id.id, 'journal_id': obj_accounting_bank_id.journal_id.id }) |
1284 | else: |
1285 | - raise osv.except_osv(_('Atencion !'), _('Debe de Ingresar la Cuenta Transitoria para el Banco: %s')%(obj_accounting_bank_id.bank_id.name)) |
1286 | + raise osv.except_osv(_('Atencion !'), _('Debe de Ingresar la Cuenta Transitoria para el Banco: %s')%(obj_accounting_bank_id.bank.name)) |
1287 | |
1288 | #Se hace un write de check_note el campo account_voucher_id |
1289 | - obj_check_note.write({'account_voucher_id':obj_account_voucher.id}) |
1290 | + obj_check_note.write({'account_voucher_id':obj_account_voucher.id}) |
1291 | #Se dispara el proceso de contabilizacion de voucher, asientos contables |
1292 | - account_voucher.proforma_voucher(cr, uid, ids2) |
1293 | + account_voucher.proforma_voucher(cr, uid, ids2, context=context) |
1294 | #Se redirecciona laventana al tree |
1295 | mod_obj = self.pool.get('ir.model.data') |
1296 | act_obj = self.pool.get('ir.actions.act_window') |
1297 | xml_id = 'action_pay_order_wizard_soporte' |
1298 | - result = mod_obj._get_id(cr, uid, 'voucher_pay_support', xml_id) |
1299 | + result = mod_obj._get_id(cr, uid, 'bank_management', xml_id) |
1300 | id = mod_obj.read(cr, uid, result, ['res_id'])['res_id'] |
1301 | result = act_obj.read(cr, uid, id) |
1302 | created_account_voucher.append(voucher_pay_id) |
1303 | result['res_id'] = created_account_voucher |
1304 | - return result |
1305 | + return result |
1306 | else: #si no selecciono la opcion estas seguro? |
1307 | vista="view_voucher_pay_support_wizard_preguntar" |
1308 | obj_model = self.pool.get('ir.model.data') |
1309 | @@ -237,11 +236,11 @@ |
1310 | 'type': 'ir.actions.act_window', |
1311 | 'target': 'new', |
1312 | 'context': context, |
1313 | - } |
1314 | + } |
1315 | |
1316 | def fin_check(self, cr, uid, ids, context=None): |
1317 | - this = self.browse(cr, uid, ids[0]) |
1318 | - nota=this.notes |
1319 | + obj = self.browse(cr, uid, ids[0]) |
1320 | + nota=obj.notes |
1321 | check_note = self.pool.get('check.note') |
1322 | accounting_bank_id = self.pool.get('res.bank') |
1323 | bank_id = self.pool.get('res.bank.entity') |
1324 | @@ -251,15 +250,15 @@ |
1325 | obj_bank_id= bank_id.browse(cr, uid, context["bank_id"], context=None) |
1326 | obj_account_voucher=account_voucher.browse(cr, uid, context["account_voucher_id"], context=None) |
1327 | bandera=True |
1328 | - this = self.browse(cr, uid, ids[0]) |
1329 | - tipo=this.cancel_check_note |
1330 | - nota=this.notes |
1331 | + obj = self.browse(cr, uid, ids[0]) |
1332 | + tipo=obj.cancel_check_note |
1333 | + nota=obj.notes |
1334 | if tipo=='otros' and nota==False: |
1335 | bandera=False |
1336 | if tipo==False and nota==False: |
1337 | bandera=False |
1338 | if bandera==False: |
1339 | - ventana="view_voucher_pay_support_wizard_escribir_nota" |
1340 | + ventana="view_voucher_pay_support_wizard_escribir_nota" |
1341 | else:#si todo lo ingreso bien |
1342 | #Se cambia (WRITE) el estado del cheque a Cancel |
1343 | obj_check_note.write({'cancel_check_note':tipo, 'notes':nota}) |
1344 | |
1345 | === renamed file 'bank_management/check/wizard/tmp/voucher_pay_support_wizard_pay_order.xml' => 'bank_management/check/wizard/voucher_pay_support_wizard_pay_order.xml' |
1346 | --- bank_management/check/wizard/tmp/voucher_pay_support_wizard_pay_order.xml 2011-09-05 17:51:53 +0000 |
1347 | +++ bank_management/check/wizard/voucher_pay_support_wizard_pay_order.xml 2011-10-05 12:59:12 +0000 |
1348 | @@ -6,9 +6,9 @@ |
1349 | <field name="model">voucher.pay.support.wizard</field> |
1350 | <field name="type">form</field> |
1351 | <field name="arch" type="xml"> |
1352 | - <form string="Generar Orden de Pago" > |
1353 | + <form string="Make Payment Order" > |
1354 | <group colspan="4" col="4"> |
1355 | - <separator string="Seleccionar el Tipo de Pago" colspan="4"/> |
1356 | + <separator string="Select Payment Type" colspan="4"/> |
1357 | <hpaned/> |
1358 | <field name="type"/> |
1359 | <hpaned/> |
1360 | @@ -19,7 +19,7 @@ |
1361 | <hpaned/> |
1362 | <button icon="gtk-cancel" special="cancel" string="_Cancel"/> |
1363 | <hpaned/> |
1364 | - <button icon="gtk-ok" name="accion_tipo" string="Siguiente" type="object"/> |
1365 | + <button icon="gtk-ok" name="accion_tipo" string="Next" type="object"/> |
1366 | <hpaned/> |
1367 | </group> |
1368 | </form> |
1369 | @@ -27,7 +27,7 @@ |
1370 | </record> |
1371 | |
1372 | <record id="wiz_pay_support" model="ir.actions.act_window"> |
1373 | - <field name="name">Generar Orden de Pago</field> |
1374 | + <field name="name">Make Payment Order</field> |
1375 | <field name="res_model">voucher.pay.support.wizard</field> |
1376 | <field name="src_model">voucher.pay.support.wizard</field> |
1377 | <field name="view_type">form</field> |
1378 | @@ -45,7 +45,7 @@ |
1379 | <field name="arch" type="xml"> |
1380 | <form string="Cheque"> |
1381 | <group colspan="4" col="4"> |
1382 | - <separator string="Seleccione la Cuenta Bancaria" colspan="4"/> |
1383 | + <separator string="Select Bank Account" colspan="4"/> |
1384 | <hpaned/> |
1385 | <field name="accounting_bank_id"/> |
1386 | <hpaned/> |
1387 | @@ -56,7 +56,7 @@ |
1388 | <hpaned/> |
1389 | <button icon="gtk-cancel" special="cancel" string="_Cancel"/> |
1390 | <hpaned/> |
1391 | - <button icon="gtk-ok" name="action_cheque" string="Siguiente" type="object"/> |
1392 | + <button icon="gtk-ok" name="action_cheque" string="Next" type="object"/> |
1393 | <hpaned/> |
1394 | </group> |
1395 | </form> |
1396 | @@ -69,9 +69,9 @@ |
1397 | <field name="model">voucher.pay.support.wizard</field> |
1398 | <field name="type">form</field> |
1399 | <field name="arch" type="xml"> |
1400 | - <form string="Transferencia"> |
1401 | + <form string="Transfer"> |
1402 | <group colspan="4" col="4"> |
1403 | - <separator string="Estamos tomando medidas..." colspan="4"/> |
1404 | + <separator string="In progress..." colspan="4"/> |
1405 | </group> |
1406 | <group colspan="2" col="3"> |
1407 | <button icon="gtk-cancel" special="cancel" string="_Cancel"/> |
1408 | @@ -86,9 +86,9 @@ |
1409 | <field name="model">voucher.pay.support.wizard</field> |
1410 | <field name="type">form</field> |
1411 | <field name="arch" type="xml"> |
1412 | - <form string="Geneneracion de Cheque"> |
1413 | - <group colspan="4" col="4" string="Cheque"> |
1414 | - <field name="accounting_bank_id" readonly="1" required="0" /> |
1415 | + <form string="check generation"> |
1416 | + <group colspan="4" col="4" string="Check Note"> |
1417 | + <field name="accounting_bank_id" readonly="0" required="0" /> |
1418 | <field name="bank_id" required="0"/> |
1419 | <field name="partner_id" required="0"/> |
1420 | <field name="payee_id" required="0"/> |
1421 | @@ -99,7 +99,7 @@ |
1422 | <hpaned/> |
1423 | <group colspan="2" col="3"> |
1424 | <hpaned/> |
1425 | - <button name="%(voucher_pay_support_report)d" string='Imprimir Cheque' type="action" icon='gtk-print' /> |
1426 | + <button name="%(check_fmt_report)d" string='Print Check' type="action" icon='gtk-print' /> |
1427 | <hpaned/> |
1428 | </group> |
1429 | <hpaned/> |
1430 | @@ -107,7 +107,7 @@ |
1431 | <group colspan="2" col="7"> |
1432 | <button icon="gtk-cancel" special="cancel" string="_Cancel"/> |
1433 | <hpaned/> |
1434 | - <button icon='gtk-ok' name="pop_check_printer" string="Confirmar Impresion" type="object"/> |
1435 | + <button icon='gtk-ok' name="pop_check_printer" string="print confirmation" type="object"/> |
1436 | </group> |
1437 | </form> |
1438 | </field> |
1439 | @@ -120,9 +120,9 @@ |
1440 | <field name="model">voucher.pay.support.wizard</field> |
1441 | <field name="type">form</field> |
1442 | <field name="arch" type="xml"> |
1443 | - <form string="¿El cheque se ha impreso correctamente?"> |
1444 | + <form string="The check is printed correctly?"> |
1445 | <group colspan="4" col="4"> |
1446 | - <separator string="¿El cheque se ha impreso correctamente?" colspan="4"/> |
1447 | + <separator string="The check is printed correctly?" colspan="4"/> |
1448 | <group colspan="4" col="4"> |
1449 | <group colspan="3" col="3" attrs="{'invisible':[('bool_bad','=','True')]}" > |
1450 | <group attrs="{'invisible':[('bool_good','=','False')]}" > |
1451 | @@ -147,7 +147,7 @@ |
1452 | <hpaned/> |
1453 | <hpaned/> |
1454 | <hpaned/> |
1455 | - <button icon="gtk-ok" name="pop_check" string="Aceptar" type="object"/> |
1456 | + <button icon="gtk-ok" name="pop_check" string="Agree" type="object"/> |
1457 | <newline/> |
1458 | <hpaned/> |
1459 | <hpaned/> |
1460 | @@ -169,7 +169,7 @@ |
1461 | <field name="arch" type="xml"> |
1462 | <form string="Nota"> |
1463 | <group colspan="4" col="4"> |
1464 | - <separator string="Justificación de Anulacion" colspan="4"/> |
1465 | + <separator string="Grounds for Annulment" colspan="4"/> |
1466 | <group colspan="4" col="6"> |
1467 | <field name="cancel_check_note"/> |
1468 | <hpaned/> |
1469 | @@ -183,7 +183,7 @@ |
1470 | <hpaned/> |
1471 | <button icon="gtk-cancel" special="cancel" string="_Cancel"/> |
1472 | <hpaned/> |
1473 | - <button icon="gtk-ok" name="fin_check" string="Procesar" type="object"/> |
1474 | + <button icon="gtk-ok" name="fin_check" string="Process" type="object"/> |
1475 | <hpaned/> |
1476 | </group> |
1477 | </form> |
1478 | |
1479 | === added file 'bank_management/security/account_voucher_group.xml' |
1480 | --- bank_management/security/account_voucher_group.xml 1970-01-01 00:00:00 +0000 |
1481 | +++ bank_management/security/account_voucher_group.xml 2011-10-05 12:59:12 +0000 |
1482 | @@ -0,0 +1,10 @@ |
1483 | +<?xml version="1.0" encoding="utf-8"?> |
1484 | +<openerp> |
1485 | +<data noupdate="1"> |
1486 | + |
1487 | + <record id="group_account_payment_no_functional" model="res.groups"> |
1488 | + <field name="name">Account Payment / NO FUNCTIONAL</field> |
1489 | + </record> |
1490 | + |
1491 | +</data> |
1492 | +</openerp> |
1493 | |
1494 | === modified file 'bank_management/security/ir.model.access.csv' |
1495 | --- bank_management/security/ir.model.access.csv 2011-08-23 01:43:12 +0000 |
1496 | +++ bank_management/security/ir.model.access.csv 2011-10-05 12:59:12 +0000 |
1497 | @@ -28,7 +28,4 @@ |
1498 | "access_account_voucher_pay_support3","voucher.pay.support","model_voucher_pay_support","account.group_account_manager",1,1,1,1 |
1499 | |
1500 | |
1501 | -"access_account_voucher_pay_support_wizard","voucher.pay.support.wizard","model_voucher_pay_support_wizard","account.group_account_invoice",1,0,0,0 |
1502 | -"access_account_voucher_pay_support_wizard2","voucher.pay.support.wizard","model_voucher_pay_support_wizard","account.group_account_user",1,1,1,0 |
1503 | -"access_account_voucher_pay_support_wizard3","voucher.pay.support.wizardt","model_voucher_pay_support_wizard","account.group_account_manager",1,1,1,1 |
1504 |
All fine, remember put comments in english