Merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-account_voucher_domain_dev_luis into lp:addons-vauxoo

Proposed by Luis Torres - http://www.vauxoo.com
Status: Needs review
Proposed branch: lp:~vauxoo/addons-vauxoo/addons-vauxoo-account_voucher_domain_dev_luis
Merge into: lp:addons-vauxoo
Diff against target: 142 lines (+127/-0)
3 files modified
account_voucher_domain/__init__.py (+26/-0)
account_voucher_domain/__openerp__.py (+45/-0)
account_voucher_domain/account_voucher.py (+56/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-account_voucher_domain_dev_luis
Reviewer Review Type Date Requested Status
Rodolfo Lopez (community) Disapprove
Moisés López - http://www.vauxoo.com Pending
Isaac López Zúñiga Pending
Review via email: mp+126352@code.launchpad.net

Description of the change

Se elimino de la funcion que agrega el domain de account_voucher esta parte, para que no se agregue

To post a comment you must log in.
Revision history for this message
Rodolfo Lopez (el-rodo-1) wrote :

Resulto mas favorable solo generar el parche para no generar el domain, en lugar de sobrescribir la función completa.
ya fue aplicado el patch.

review: Disapprove

Unmerged revisions

470. By Luis Torres - http://www.vauxoo.com

[ADD][account_voucher_domain]Delete to function fields_view_get domain the partner_id

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_voucher_domain'
2=== added file 'account_voucher_domain/__init__.py'
3--- account_voucher_domain/__init__.py 1970-01-01 00:00:00 +0000
4+++ account_voucher_domain/__init__.py 2012-09-25 23:35:24 +0000
5@@ -0,0 +1,26 @@
6+# -*- encoding: utf-8 -*-
7+###########################################################################
8+# Module Writen to OpenERP, Open Source Management Solution
9+#
10+# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
11+# All Rights Reserved.
12+# info@vauxoo.com
13+############################################################################
14+# Coded by: Luis Torres (luis_t@vauxoo.com)
15+############################################################################
16+#
17+# This program is free software: you can redistribute it and/or modify
18+# it under the terms of the GNU Affero General Public License as
19+# published by the Free Software Foundation, either version 3 of the
20+# License, or (at your option) any later version.
21+#
22+# This program is distributed in the hope that it will be useful,
23+# but WITHOUT ANY WARRANTY; without even the implied warranty of
24+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+# GNU Affero General Public License for more details.
26+#
27+# You should have received a copy of the GNU Affero General Public License
28+# along with this program. If not, see <http://www.gnu.org/licenses/>.
29+#
30+##############################################################################
31+import account_voucher
32
33=== added file 'account_voucher_domain/__openerp__.py'
34--- account_voucher_domain/__openerp__.py 1970-01-01 00:00:00 +0000
35+++ account_voucher_domain/__openerp__.py 2012-09-25 23:35:24 +0000
36@@ -0,0 +1,45 @@
37+# -*- encoding: utf-8 -*-
38+###########################################################################
39+# Module Writen to OpenERP, Open Source Management Solution
40+#
41+# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/
42+# All Rights Reserved.
43+# info Vauxoo (info@vauxoo.com)
44+############################################################################
45+# Coded by: Luis Torres (luis_t@vauxoo.com)
46+############################################################################
47+#
48+# This program is free software: you can redistribute it and/or modify
49+# it under the terms of the GNU Affero General Public License as
50+# published by the Free Software Foundation, either version 3 of the
51+# License, or (at your option) any later version.
52+#
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU Affero General Public License for more details.
57+#
58+# You should have received a copy of the GNU Affero General Public License
59+# along with this program. If not, see <http://www.gnu.org/licenses/>.
60+#
61+##############################################################################
62+
63+{
64+ "name" : "Domain Account Voucher",
65+ "version" : "1.0",
66+ "author" : "Vauxoo",
67+ "category" : "Generic Modules",
68+ "description" : """
69+ This module delete to domain 'supplier', '=', True in partner in account_invoice
70+ """,
71+ "website" : "http://www.vauxoo.com/",
72+ "license" : "AGPL-3",
73+ "depends" : ["base", 'account_voucher',
74+ ],
75+ "init_xml" : [],
76+ "demo_xml" : [],
77+ "update_xml" : [
78+ ],
79+ "installable" : True,
80+ "active" : False,
81+}
82
83=== added file 'account_voucher_domain/account_voucher.py'
84--- account_voucher_domain/account_voucher.py 1970-01-01 00:00:00 +0000
85+++ account_voucher_domain/account_voucher.py 2012-09-25 23:35:24 +0000
86@@ -0,0 +1,56 @@
87+# -*- encoding: utf-8 -*-
88+###########################################################################
89+# Module Writen to OpenERP, Open Source Management Solution
90+#
91+# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/
92+# All Rights Reserved.
93+# info Vauxoo (info@vauxoo.com)
94+############################################################################
95+# Coded by: Luis Torres (luis_t@vauxoo.com)
96+############################################################################
97+#
98+# This program is free software: you can redistribute it and/or modify
99+# it under the terms of the GNU Affero General Public License as
100+# published by the Free Software Foundation, either version 3 of the
101+# License, or (at your option) any later version.
102+#
103+# This program is distributed in the hope that it will be useful,
104+# but WITHOUT ANY WARRANTY; without even the implied warranty of
105+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106+# GNU Affero General Public License for more details.
107+#
108+# You should have received a copy of the GNU Affero General Public License
109+# along with this program. If not, see <http://www.gnu.org/licenses/>.
110+#
111+##############################################################################
112+from osv import osv, fields
113+from lxml import etree
114+
115+class account_voucher(osv.osv):
116+ _inherit='account.voucher'
117+
118+ def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
119+ mod_obj = self.pool.get('ir.model.data')
120+ if context is None: context = {}
121+
122+ if view_type == 'form':
123+ if not view_id and context.get('invoice_type'):
124+ if context.get('invoice_type') in ('out_invoice', 'out_refund'):
125+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
126+ else:
127+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form')
128+ result = result and result[1] or False
129+ view_id = result
130+ if not view_id and context.get('line_type'):
131+ if context.get('line_type') == 'customer':
132+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
133+ else:
134+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form')
135+ result = result and result[1] or False
136+ view_id = result
137+
138+ res = super(account_voucher, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
139+ doc = etree.XML(res['arch'])
140+
141+ res['arch'] = etree.tostring(doc)
142+ return res