Merge lp:~domsense/account-payment/adding_account_vat_on_payment_7 into lp:~account-payment-team/account-payment/7.0
- adding_account_vat_on_payment_7
- Merge into 7.0
Status: | Needs review |
---|---|
Proposed branch: | lp:~domsense/account-payment/adding_account_vat_on_payment_7 |
Merge into: | lp:~account-payment-team/account-payment/7.0 |
Diff against target: |
816 lines (+770/-0) 9 files modified
account_vat_on_payment/AUTHORS.txt (+1/-0) account_vat_on_payment/__init__.py (+25/-0) account_vat_on_payment/__openerp__.py (+60/-0) account_vat_on_payment/account.py (+433/-0) account_vat_on_payment/account_view.xml (+104/-0) account_vat_on_payment/company.py (+42/-0) account_vat_on_payment/company_view.xml (+21/-0) account_vat_on_payment/partner.py (+36/-0) account_vat_on_payment/partner_view.xml (+48/-0) |
To merge this branch: | bzr merge lp:~domsense/account-payment/adding_account_vat_on_payment_7 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lorenzo Battistini (community) | Disapprove | ||
Omar (Pexego) | code review, no test | Approve | |
Review via email: mp+196914@code.launchpad.net |
Commit message
Description of the change
See 'account_
To activate the VAT on payment behaviour, this module adds a checkbox on
invoice form: 'Vat on payment'
Moreover, three things have to be configured:
- On account object, Related account used for real registrations on a VAT on
payment basis
- On journal object, Related journal used for shadow registrations on a VAT on
payment basis
- On tax code object, Related tax code used for real registrations on a VAT on
payment basis
Requirements:
https:/
Howto:
http://
I propose this now so we can discuss about the usefulness of this module.
I set it 'work in progress' also because YAML tests are missing.
Lorenzo Battistini (elbati) wrote : | # |
2013/11/27 Davide Corio <email address hidden>
> there's a blocking typo here:
>
>
> http://
>
> s/vat_on_
>
>
Oops.
Fixed.
Thanks!
Omar (Pexego) (omar7r) wrote : | # |
Could you take the time to bring this to the 7.0 community addons coding conventions. This includes:
* not using the shortcut imports (things in the openerp namespace need to be imported from openerp)
* using the from . import xxx for relative imports (typically in __init__.py files)
* using orm.Model and orm.TransientModel as base class rather than osv.osv and osv.osv_memory
* etc.
Thanks
Nicola Malcontenti - Agile BG (hurrin1c0) wrote : | # |
Hi Omar,
Thanks for the segnalation,
we have done all the modify requested.
Greetings.
-N.
Lorenzo Battistini (elbati) wrote : | # |
Omar (Pexego) (omar7r) wrote : | # |
Thanks, LGTM
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
This project is now hosted on https:/
Lorenzo Battistini (elbati) wrote : | # |
Unmerged revisions
- 115. By Lorenzo Battistini
-
[FIX] when selecting partner without fiscal position, do not overwrite invoice field
- 114. By Lorenzo Battistini
-
[FIX] [7.0] account_
vat_on_ payment - impossible to compute VAT based on invoice total in case of write-off - 113. By Lorenzo Battistini
-
[FIX] missing fields
- 112. By Hurrinico
-
[FIX] PEP8 fixing
- 111. By Lorenzo Battistini
-
[IMP] handling fiscal positions
- 110. By Lorenzo Battistini
-
[FIX] typo
- 109. By Lorenzo Battistini
-
[fix] URL
- 108. By Lorenzo Battistini
-
[imp] other PEP8
- 107. By Lorenzo Battistini
-
[imp] other PEP8
- 106. By Lorenzo Battistini
-
[IMP] some PEP8
Preview Diff
1 | === added directory 'account_vat_on_payment' | |||
2 | === added file 'account_vat_on_payment/AUTHORS.txt' | |||
3 | --- account_vat_on_payment/AUTHORS.txt 1970-01-01 00:00:00 +0000 | |||
4 | +++ account_vat_on_payment/AUTHORS.txt 2014-06-03 16:12:49 +0000 | |||
5 | @@ -0,0 +1,1 @@ | |||
6 | 1 | Lorenzo Battistini <lorenzo.battistini@agilebg.com> | ||
7 | 0 | 2 | ||
8 | === added file 'account_vat_on_payment/__init__.py' | |||
9 | --- account_vat_on_payment/__init__.py 1970-01-01 00:00:00 +0000 | |||
10 | +++ account_vat_on_payment/__init__.py 2014-06-03 16:12:49 +0000 | |||
11 | @@ -0,0 +1,25 @@ | |||
12 | 1 | # -*- coding: utf-8 -*- | ||
13 | 2 | ############################################################################## | ||
14 | 3 | # | ||
15 | 4 | # OpenERP, Open Source Management Solution | ||
16 | 5 | # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). | ||
17 | 6 | # Copyright (C) 2012-2013 Agile Business Group sagl | ||
18 | 7 | # (<http://www.agilebg.com>) | ||
19 | 8 | # | ||
20 | 9 | # This program is free software: you can redistribute it and/or modify | ||
21 | 10 | # it under the terms of the GNU Affero General Public License as | ||
22 | 11 | # published by the Free Software Foundation, either version 3 of the | ||
23 | 12 | # License, or (at your option) any later version. | ||
24 | 13 | # | ||
25 | 14 | # This program is distributed in the hope that it will be useful, | ||
26 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
27 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
28 | 17 | # GNU Affero General Public License for more details. | ||
29 | 18 | # | ||
30 | 19 | # You should have received a copy of the GNU Affero General Public License | ||
31 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
32 | 21 | # | ||
33 | 22 | ##############################################################################E | ||
34 | 23 | from . import account | ||
35 | 24 | from . import company | ||
36 | 25 | from . import partner | ||
37 | 0 | 26 | ||
38 | === added file 'account_vat_on_payment/__openerp__.py' | |||
39 | --- account_vat_on_payment/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
40 | +++ account_vat_on_payment/__openerp__.py 2014-06-03 16:12:49 +0000 | |||
41 | @@ -0,0 +1,60 @@ | |||
42 | 1 | # -*- coding: utf-8 -*- | ||
43 | 2 | ############################################################################## | ||
44 | 3 | # | ||
45 | 4 | # OpenERP, Open Source Management Solution | ||
46 | 5 | # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). | ||
47 | 6 | # Copyright (C) 2012-2013 Agile Business Group sagl | ||
48 | 7 | # (<http://www.agilebg.com>) | ||
49 | 8 | # | ||
50 | 9 | # This program is free software: you can redistribute it and/or modify | ||
51 | 10 | # it under the terms of the GNU Affero General Public License as | ||
52 | 11 | # published by the Free Software Foundation, either version 3 of the | ||
53 | 12 | # License, or (at your option) any later version. | ||
54 | 13 | # | ||
55 | 14 | # This program is distributed in the hope that it will be useful, | ||
56 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
57 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
58 | 17 | # GNU Affero General Public License for more details. | ||
59 | 18 | # | ||
60 | 19 | # You should have received a copy of the GNU Affero General Public License | ||
61 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
62 | 21 | # | ||
63 | 22 | ############################################################################## | ||
64 | 23 | |||
65 | 24 | |||
66 | 25 | { | ||
67 | 26 | "name": "VAT on payment", | ||
68 | 27 | "version": "2.0", | ||
69 | 28 | 'category': 'Generic Modules/Accounting', | ||
70 | 29 | "depends": ["account_voucher_cash_basis"], | ||
71 | 30 | "author": "Agile Business Group", | ||
72 | 31 | "description": """ | ||
73 | 32 | See 'account_voucher_cash_basis' description. | ||
74 | 33 | |||
75 | 34 | To activate the VAT on payment behaviour, this module adds a checkbox on | ||
76 | 35 | invoice form: 'Vat on payment' | ||
77 | 36 | |||
78 | 37 | Moreover, three things have to be configured: | ||
79 | 38 | - On account object, Related account used for real registrations on a VAT on | ||
80 | 39 | payment basis | ||
81 | 40 | - On journal object, Related journal used for shadow registrations on a VAT on | ||
82 | 41 | payment basis | ||
83 | 42 | - On tax code object, Related tax code used for real registrations on a VAT on | ||
84 | 43 | payment basis | ||
85 | 44 | |||
86 | 45 | Requirements: | ||
87 | 46 | https://docs.google.com/spreadsheet/ccc?key=0Aodwq17jxF4edDJaZ2dOQkVEN0hodEtfRmpVdlg2Vnc#gid=0 | ||
88 | 47 | Howto: | ||
89 | 48 | http://planet.agilebg.com/en/2012/10/vat-on-payment-treatment-with-openerp/ | ||
90 | 49 | """, | ||
91 | 50 | 'website': 'http://www.agilebg.com', | ||
92 | 51 | 'init_xml': [], | ||
93 | 52 | 'update_xml': [ | ||
94 | 53 | 'account_view.xml', | ||
95 | 54 | 'company_view.xml', | ||
96 | 55 | 'partner_view.xml', | ||
97 | 56 | ], | ||
98 | 57 | 'demo_xml': [], # TODO YAML tests | ||
99 | 58 | 'installable': True, | ||
100 | 59 | 'active': False, | ||
101 | 60 | } | ||
102 | 0 | 61 | ||
103 | === added file 'account_vat_on_payment/account.py' | |||
104 | --- account_vat_on_payment/account.py 1970-01-01 00:00:00 +0000 | |||
105 | +++ account_vat_on_payment/account.py 2014-06-03 16:12:49 +0000 | |||
106 | @@ -0,0 +1,433 @@ | |||
107 | 1 | # -*- coding: utf-8 -*- | ||
108 | 2 | ############################################################################## | ||
109 | 3 | # | ||
110 | 4 | # OpenERP, Open Source Management Solution | ||
111 | 5 | # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). | ||
112 | 6 | # Copyright (C) 2012-2013 Agile Business Group sagl | ||
113 | 7 | # (<http://www.agilebg.com>) | ||
114 | 8 | # | ||
115 | 9 | # This program is free software: you can redistribute it and/or modify | ||
116 | 10 | # it under the terms of the GNU Affero General Public License as | ||
117 | 11 | # published by the Free Software Foundation, either version 3 of the | ||
118 | 12 | # License, or (at your option) any later version. | ||
119 | 13 | # | ||
120 | 14 | # This program is distributed in the hope that it will be useful, | ||
121 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
122 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
123 | 17 | # GNU Affero General Public License for more details. | ||
124 | 18 | # | ||
125 | 19 | # You should have received a copy of the GNU Affero General Public License | ||
126 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
127 | 21 | # | ||
128 | 22 | ############################################################################## | ||
129 | 23 | |||
130 | 24 | from openerp.osv import orm, fields | ||
131 | 25 | from tools.translate import _ | ||
132 | 26 | |||
133 | 27 | |||
134 | 28 | class account_voucher(orm.Model): | ||
135 | 29 | _inherit = "account.voucher" | ||
136 | 30 | |||
137 | 31 | _columns = { | ||
138 | 32 | 'shadow_move_id': fields.many2one( | ||
139 | 33 | 'account.move', 'Shadow Entry', readonly=True), | ||
140 | 34 | } | ||
141 | 35 | |||
142 | 36 | def is_vat_on_payment(self, voucher): | ||
143 | 37 | vat_on_p = 0 | ||
144 | 38 | valid_lines = 0 | ||
145 | 39 | if voucher.type in ('payment', 'receipt'): | ||
146 | 40 | for line in voucher.line_ids: | ||
147 | 41 | if line.amount: | ||
148 | 42 | valid_lines += 1 | ||
149 | 43 | if ( | ||
150 | 44 | line.move_line_id and line.move_line_id.invoice | ||
151 | 45 | and line.move_line_id.invoice.vat_on_payment | ||
152 | 46 | ): | ||
153 | 47 | vat_on_p += 1 | ||
154 | 48 | if vat_on_p and vat_on_p != valid_lines: | ||
155 | 49 | raise osv.except_osv( | ||
156 | 50 | _('Error'), | ||
157 | 51 | _("""Can't handle VAT on payment if not every invoice | ||
158 | 52 | is on a VAT on payment treatment""")) | ||
159 | 53 | return vat_on_p | ||
160 | 54 | |||
161 | 55 | def action_move_line_create(self, cr, uid, ids, context=None): | ||
162 | 56 | if context is None: | ||
163 | 57 | context = {} | ||
164 | 58 | inv_pool = self.pool.get('account.invoice') | ||
165 | 59 | journal_pool = self.pool.get('account.journal') | ||
166 | 60 | move_line_pool = self.pool.get('account.move.line') | ||
167 | 61 | move_pool = self.pool.get('account.move') | ||
168 | 62 | currency_obj = self.pool.get('res.currency') | ||
169 | 63 | res = False | ||
170 | 64 | for voucher in self.browse(cr, uid, ids, context): | ||
171 | 65 | entry_posted = voucher.journal_id.entry_posted | ||
172 | 66 | # disable the 'skip draft state' option because "mixed" entry | ||
173 | 67 | # (shadow + real) won't pass validation. Anyway every entry will be | ||
174 | 68 | # posted later (if 'entry_posted' is enabled) | ||
175 | 69 | if entry_posted: | ||
176 | 70 | journal_pool.write( | ||
177 | 71 | cr, uid, voucher.journal_id.id, {'entry_posted': False}) | ||
178 | 72 | res = super(account_voucher, self).action_move_line_create( | ||
179 | 73 | cr, uid, [voucher.id], context) | ||
180 | 74 | # because 'move_id' has been updated by 'action_move_line_create' | ||
181 | 75 | voucher.refresh() | ||
182 | 76 | if entry_posted: | ||
183 | 77 | journal_pool.write( | ||
184 | 78 | cr, uid, voucher.journal_id.id, {'entry_posted': True}) | ||
185 | 79 | if self.is_vat_on_payment(voucher): | ||
186 | 80 | if not voucher.journal_id.vat_on_payment_related_journal_id: | ||
187 | 81 | raise osv.except_osv( | ||
188 | 82 | _('Error'), | ||
189 | 83 | _("""We are on a VAT on payment treatment | ||
190 | 84 | but journal %s does not have a related shadow | ||
191 | 85 | journal""") | ||
192 | 86 | % voucher.journal_id.name) | ||
193 | 87 | lines_to_create = [] | ||
194 | 88 | amounts_by_invoice = super( | ||
195 | 89 | account_voucher, self | ||
196 | 90 | ).allocated_amounts_grouped_by_invoice( | ||
197 | 91 | cr, uid, voucher, context) | ||
198 | 92 | for inv_id in amounts_by_invoice: | ||
199 | 93 | invoice = inv_pool.browse(cr, uid, inv_id, context) | ||
200 | 94 | for inv_move_line in invoice.move_id.line_id: | ||
201 | 95 | if ( | ||
202 | 96 | inv_move_line.account_id.type != 'receivable' | ||
203 | 97 | and inv_move_line.account_id.type != 'payable' | ||
204 | 98 | ): | ||
205 | 99 | # compute the VAT or base line proportionally to | ||
206 | 100 | # the paid amount | ||
207 | 101 | if ( | ||
208 | 102 | voucher.exclude_write_off | ||
209 | 103 | and voucher.payment_option == 'with_writeoff' | ||
210 | 104 | ): | ||
211 | 105 | # avoid including write-off if set in voucher. | ||
212 | 106 | # That means: use the invoice's total | ||
213 | 107 | # (as we are in 'full reconcile' case) | ||
214 | 108 | allocated_amount = amounts_by_invoice[ | ||
215 | 109 | invoice.id | ||
216 | 110 | ]['allocated'] | ||
217 | 111 | else: | ||
218 | 112 | allocated_amount = ( | ||
219 | 113 | amounts_by_invoice[invoice.id]['allocated'] | ||
220 | 114 | + | ||
221 | 115 | amounts_by_invoice[invoice.id]['write-off'] | ||
222 | 116 | ) | ||
223 | 117 | new_line_amount = currency_obj.round( | ||
224 | 118 | cr, uid, voucher.company_id.currency_id, | ||
225 | 119 | ( | ||
226 | 120 | allocated_amount | ||
227 | 121 | / | ||
228 | 122 | amounts_by_invoice[invoice.id]['total'] | ||
229 | 123 | ) | ||
230 | 124 | * | ||
231 | 125 | (inv_move_line.credit or inv_move_line.debit) | ||
232 | 126 | ) | ||
233 | 127 | new_line_amount_curr = False | ||
234 | 128 | if ( | ||
235 | 129 | amounts_by_invoice[invoice.id].get( | ||
236 | 130 | 'allocated_currency') | ||
237 | 131 | and amounts_by_invoice[invoice.id].get( | ||
238 | 132 | 'foreign_currency_id') | ||
239 | 133 | ): | ||
240 | 134 | for_curr = currency_obj.browse( | ||
241 | 135 | cr, uid, | ||
242 | 136 | amounts_by_invoice[invoice.id][ | ||
243 | 137 | 'foreign_currency_id'], | ||
244 | 138 | context=context) | ||
245 | 139 | if ( | ||
246 | 140 | voucher.exclude_write_off | ||
247 | 141 | and | ||
248 | 142 | voucher.payment_option == 'with_writeoff' | ||
249 | 143 | ): | ||
250 | 144 | # again | ||
251 | 145 | # avoid including write-off if set in | ||
252 | 146 | # voucher. | ||
253 | 147 | allocated_amount = amounts_by_invoice[ | ||
254 | 148 | invoice.id]['allocated_currency'] | ||
255 | 149 | else: | ||
256 | 150 | allocated_amount = ( | ||
257 | 151 | amounts_by_invoice[invoice.id][ | ||
258 | 152 | 'allocated_currency'] | ||
259 | 153 | + | ||
260 | 154 | amounts_by_invoice[invoice.id][ | ||
261 | 155 | 'currency-write-off'] | ||
262 | 156 | ) | ||
263 | 157 | new_line_amount_curr = currency_obj.round( | ||
264 | 158 | cr, uid, for_curr, | ||
265 | 159 | ( | ||
266 | 160 | allocated_amount | ||
267 | 161 | / | ||
268 | 162 | amounts_by_invoice[ | ||
269 | 163 | invoice.id | ||
270 | 164 | ]['total_currency'] | ||
271 | 165 | ) | ||
272 | 166 | * | ||
273 | 167 | (inv_move_line.amount_currency) | ||
274 | 168 | ) | ||
275 | 169 | |||
276 | 170 | if not inv_move_line.real_account_id: | ||
277 | 171 | raise osv.except_osv( | ||
278 | 172 | _('Error'), | ||
279 | 173 | _("""We are on a VAT on payment treatment | ||
280 | 174 | but move line %s does not have a related | ||
281 | 175 | real account""") | ||
282 | 176 | % inv_move_line.name) | ||
283 | 177 | |||
284 | 178 | # prepare the real move line | ||
285 | 179 | vals = { | ||
286 | 180 | 'name': inv_move_line.name, | ||
287 | 181 | 'account_id': inv_move_line.real_account_id.id, | ||
288 | 182 | 'credit': ( | ||
289 | 183 | inv_move_line.credit | ||
290 | 184 | and new_line_amount or 0.0), | ||
291 | 185 | 'debit': ( | ||
292 | 186 | inv_move_line.debit | ||
293 | 187 | and new_line_amount or 0.0), | ||
294 | 188 | 'type': 'real', | ||
295 | 189 | 'partner_id': ( | ||
296 | 190 | inv_move_line.partner_id | ||
297 | 191 | and inv_move_line.partner_id.id or False) | ||
298 | 192 | } | ||
299 | 193 | if new_line_amount_curr: | ||
300 | 194 | vals['amount_currency'] = new_line_amount_curr | ||
301 | 195 | vals['currency_id'] = for_curr.id | ||
302 | 196 | if inv_move_line.tax_code_id: | ||
303 | 197 | if not inv_move_line.real_tax_code_id: | ||
304 | 198 | raise osv.except_osv( | ||
305 | 199 | _('Error'), | ||
306 | 200 | _("""We are on a VAT on payment | ||
307 | 201 | treatment but move line %s does not | ||
308 | 202 | have a related real tax code""") | ||
309 | 203 | % inv_move_line.name | ||
310 | 204 | ) | ||
311 | 205 | vals[ | ||
312 | 206 | 'tax_code_id' | ||
313 | 207 | ] = inv_move_line.real_tax_code_id.id | ||
314 | 208 | if inv_move_line.tax_amount < 0: | ||
315 | 209 | vals['tax_amount'] = -new_line_amount | ||
316 | 210 | else: | ||
317 | 211 | vals['tax_amount'] = new_line_amount | ||
318 | 212 | lines_to_create.append(vals) | ||
319 | 213 | |||
320 | 214 | # prepare the shadow move line | ||
321 | 215 | vals = { | ||
322 | 216 | 'name': inv_move_line.name, | ||
323 | 217 | 'account_id': inv_move_line.account_id.id, | ||
324 | 218 | 'credit': ( | ||
325 | 219 | inv_move_line.debit | ||
326 | 220 | and new_line_amount or 0.0), | ||
327 | 221 | 'debit': ( | ||
328 | 222 | inv_move_line.credit | ||
329 | 223 | and new_line_amount or 0.0), | ||
330 | 224 | 'type': 'shadow', | ||
331 | 225 | 'partner_id': ( | ||
332 | 226 | inv_move_line.partner_id | ||
333 | 227 | and inv_move_line.partner_id.id or False) | ||
334 | 228 | } | ||
335 | 229 | if inv_move_line.tax_code_id: | ||
336 | 230 | vals[ | ||
337 | 231 | 'tax_code_id' | ||
338 | 232 | ] = inv_move_line.tax_code_id.id | ||
339 | 233 | if inv_move_line.tax_amount < 0: | ||
340 | 234 | vals['tax_amount'] = new_line_amount | ||
341 | 235 | else: | ||
342 | 236 | vals['tax_amount'] = -new_line_amount | ||
343 | 237 | lines_to_create.append(vals) | ||
344 | 238 | |||
345 | 239 | context['journal_id'] = ( | ||
346 | 240 | voucher.journal_id.vat_on_payment_related_journal_id.id) | ||
347 | 241 | context['period_id'] = voucher.move_id.period_id.id | ||
348 | 242 | shadow_move_id = move_pool.create(cr, uid, { | ||
349 | 243 | 'journal_id': ( | ||
350 | 244 | voucher.journal_id.vat_on_payment_related_journal_id.id | ||
351 | 245 | ), | ||
352 | 246 | 'period_id': voucher.move_id.period_id.id, | ||
353 | 247 | 'date': voucher.move_id.date, | ||
354 | 248 | }, context) | ||
355 | 249 | |||
356 | 250 | # move the payment move lines to shadow entry | ||
357 | 251 | for line in voucher.move_ids: | ||
358 | 252 | if line.account_id.type != 'liquidity': | ||
359 | 253 | # If the line is related to write-off and user doesn't | ||
360 | 254 | # want to compute the tax including write-off, | ||
361 | 255 | # write-off move line must stay on the real move | ||
362 | 256 | if not ( | ||
363 | 257 | voucher.exclude_write_off | ||
364 | 258 | and voucher.payment_option == 'with_writeoff' | ||
365 | 259 | and line.account_id.id | ||
366 | 260 | == voucher.writeoff_acc_id.id | ||
367 | 261 | ): | ||
368 | 262 | line.write({ | ||
369 | 263 | 'move_id': shadow_move_id, | ||
370 | 264 | }, update_check=False) | ||
371 | 265 | # this will allow user to see the real entry from | ||
372 | 266 | # invoice payment tab | ||
373 | 267 | if ( | ||
374 | 268 | line.account_id.type == 'receivable' | ||
375 | 269 | or line.account_id.type == 'payable' | ||
376 | 270 | ): | ||
377 | 271 | line.write({ | ||
378 | 272 | 'real_payment_move_id': voucher.move_id.id, | ||
379 | 273 | }) | ||
380 | 274 | |||
381 | 275 | for line_to_create in lines_to_create: | ||
382 | 276 | if line_to_create['type'] == 'real': | ||
383 | 277 | line_to_create['move_id'] = voucher.move_id.id | ||
384 | 278 | elif line_to_create['type'] == 'shadow': | ||
385 | 279 | line_to_create['move_id'] = shadow_move_id | ||
386 | 280 | del line_to_create['type'] | ||
387 | 281 | |||
388 | 282 | move_line_pool.create(cr, uid, line_to_create, context) | ||
389 | 283 | |||
390 | 284 | voucher.write({'shadow_move_id': shadow_move_id}) | ||
391 | 285 | |||
392 | 286 | super(account_voucher, self).balance_move( | ||
393 | 287 | cr, uid, shadow_move_id, context) | ||
394 | 288 | super(account_voucher, self).balance_move( | ||
395 | 289 | cr, uid, voucher.move_id.id, context) | ||
396 | 290 | |||
397 | 291 | return res | ||
398 | 292 | |||
399 | 293 | def cancel_voucher(self, cr, uid, ids, context=None): | ||
400 | 294 | res = super(account_voucher, self).cancel_voucher( | ||
401 | 295 | cr, uid, ids, context) | ||
402 | 296 | reconcile_pool = self.pool.get('account.move.reconcile') | ||
403 | 297 | move_pool = self.pool.get('account.move') | ||
404 | 298 | for voucher in self.browse(cr, uid, ids, context=context): | ||
405 | 299 | recs = [] | ||
406 | 300 | if voucher.shadow_move_id: | ||
407 | 301 | for line in voucher.shadow_move_id.line_id: | ||
408 | 302 | if line.reconcile_id: | ||
409 | 303 | recs += [line.reconcile_id.id] | ||
410 | 304 | if line.reconcile_partial_id: | ||
411 | 305 | recs += [line.reconcile_partial_id.id] | ||
412 | 306 | |||
413 | 307 | reconcile_pool.unlink(cr, uid, recs) | ||
414 | 308 | |||
415 | 309 | if voucher.shadow_move_id: | ||
416 | 310 | move_pool.button_cancel( | ||
417 | 311 | cr, uid, [voucher.shadow_move_id.id]) | ||
418 | 312 | move_pool.unlink(cr, uid, [voucher.shadow_move_id.id]) | ||
419 | 313 | return res | ||
420 | 314 | |||
421 | 315 | |||
422 | 316 | class account_invoice(orm.Model): | ||
423 | 317 | |||
424 | 318 | def _get_vat_on_payment(self, cr, uid, context=None): | ||
425 | 319 | return self.pool.get('res.users').browse( | ||
426 | 320 | cr, uid, uid, context).company_id.vat_on_payment | ||
427 | 321 | |||
428 | 322 | def finalize_invoice_move_lines(self, cr, uid, invoice_browse, move_lines): | ||
429 | 323 | """ | ||
430 | 324 | Use shadow accounts for journal entry to be generated, according to | ||
431 | 325 | account and tax code related records | ||
432 | 326 | """ | ||
433 | 327 | move_lines = super(account_invoice, self).finalize_invoice_move_lines( | ||
434 | 328 | cr, uid, invoice_browse, move_lines) | ||
435 | 329 | acc_pool = self.pool.get('account.account') | ||
436 | 330 | tax_code_pool = self.pool.get('account.tax.code') | ||
437 | 331 | new_move_lines = [] | ||
438 | 332 | for line_tup in move_lines: | ||
439 | 333 | if invoice_browse.vat_on_payment: | ||
440 | 334 | if line_tup[2].get('account_id', False): | ||
441 | 335 | account = acc_pool.browse( | ||
442 | 336 | cr, uid, line_tup[2]['account_id']) | ||
443 | 337 | if ( | ||
444 | 338 | account.type != 'receivable' | ||
445 | 339 | and account.type != 'payable' | ||
446 | 340 | ): | ||
447 | 341 | if not account.vat_on_payment_related_account_id: | ||
448 | 342 | raise osv.except_osv( | ||
449 | 343 | _('Error'), | ||
450 | 344 | _('''The invoice is \'VAT on payment\' but | ||
451 | 345 | account %s does not have a related shadow | ||
452 | 346 | account''') | ||
453 | 347 | % account.name) | ||
454 | 348 | line_tup[2]['real_account_id'] = line_tup[ | ||
455 | 349 | 2]['account_id'] | ||
456 | 350 | line_tup[2]['account_id'] = ( | ||
457 | 351 | account.vat_on_payment_related_account_id.id) | ||
458 | 352 | if line_tup[2].get('tax_code_id', False): | ||
459 | 353 | tax_code = tax_code_pool.browse( | ||
460 | 354 | cr, uid, line_tup[2]['tax_code_id']) | ||
461 | 355 | if not tax_code.vat_on_payment_related_tax_code_id: | ||
462 | 356 | raise osv.except_osv( | ||
463 | 357 | _('Error'), | ||
464 | 358 | _('''The invoice is \'VAT on payment\' but | ||
465 | 359 | tax code %s does not have a related shadow | ||
466 | 360 | tax code''') | ||
467 | 361 | % tax_code.name) | ||
468 | 362 | line_tup[2]['real_tax_code_id'] = line_tup[ | ||
469 | 363 | 2]['tax_code_id'] | ||
470 | 364 | line_tup[2]['tax_code_id'] = ( | ||
471 | 365 | tax_code.vat_on_payment_related_tax_code_id.id) | ||
472 | 366 | new_move_lines.append(line_tup) | ||
473 | 367 | return new_move_lines | ||
474 | 368 | |||
475 | 369 | def onchange_partner_id( | ||
476 | 370 | self, cr, uid, ids, type, partner_id, date_invoice=False, | ||
477 | 371 | payment_term=False, partner_bank_id=False, company_id=False): | ||
478 | 372 | res = super(account_invoice, self).onchange_partner_id( | ||
479 | 373 | cr, uid, ids, type, partner_id, date_invoice, payment_term, | ||
480 | 374 | partner_bank_id, company_id) | ||
481 | 375 | # default value for VAT on Payment is changed every time the | ||
482 | 376 | # customer/supplier is changed | ||
483 | 377 | partner_obj = self.pool.get("res.partner") | ||
484 | 378 | if partner_id: | ||
485 | 379 | p = partner_obj.browse(cr, uid, partner_id) | ||
486 | 380 | if p.property_account_position: | ||
487 | 381 | res['value'][ | ||
488 | 382 | 'vat_on_payment' | ||
489 | 383 | ] = p.property_account_position.default_has_vat_on_payment | ||
490 | 384 | return res | ||
491 | 385 | |||
492 | 386 | _inherit = "account.invoice" | ||
493 | 387 | _columns = { | ||
494 | 388 | 'vat_on_payment': fields.boolean('Vat on payment'), | ||
495 | 389 | } | ||
496 | 390 | _defaults = { | ||
497 | 391 | 'vat_on_payment': _get_vat_on_payment, | ||
498 | 392 | } | ||
499 | 393 | |||
500 | 394 | |||
501 | 395 | class account_move_line(orm.Model): | ||
502 | 396 | _inherit = "account.move.line" | ||
503 | 397 | _columns = { | ||
504 | 398 | 'real_payment_move_id': fields.many2one( | ||
505 | 399 | 'account.move', 'Real payment entry'), | ||
506 | 400 | 'real_account_id': fields.many2one('account.account', 'Real account'), | ||
507 | 401 | 'real_tax_code_id': fields.many2one( | ||
508 | 402 | 'account.tax.code', 'Real tax code'), | ||
509 | 403 | } | ||
510 | 404 | |||
511 | 405 | |||
512 | 406 | class account_account(orm.Model): | ||
513 | 407 | _inherit = "account.account" | ||
514 | 408 | _columns = { | ||
515 | 409 | 'vat_on_payment_related_account_id': fields.many2one( | ||
516 | 410 | 'account.account', 'Shadow Account for VAT on payment', | ||
517 | 411 | help='''Related account used for real registrations on a | ||
518 | 412 | VAT on payment basis. Set the shadow account here'''), | ||
519 | 413 | } | ||
520 | 414 | |||
521 | 415 | |||
522 | 416 | class account_tax_code(orm.Model): | ||
523 | 417 | _inherit = "account.tax.code" | ||
524 | 418 | _columns = { | ||
525 | 419 | 'vat_on_payment_related_tax_code_id': fields.many2one( | ||
526 | 420 | 'account.tax.code', 'Shadow Tax code for VAT on payment', | ||
527 | 421 | help='''Related tax code used for real registrations on a | ||
528 | 422 | VAT on payment basis. Set the shadow tax code here'''), | ||
529 | 423 | } | ||
530 | 424 | |||
531 | 425 | |||
532 | 426 | class account_journal(orm.Model): | ||
533 | 427 | _inherit = "account.journal" | ||
534 | 428 | _columns = { | ||
535 | 429 | 'vat_on_payment_related_journal_id': fields.many2one( | ||
536 | 430 | 'account.journal', 'Shadow Journal for VAT on payment', | ||
537 | 431 | help='''Related journal used for shadow registrations on a | ||
538 | 432 | VAT on payment basis. Set the shadow journal here'''), | ||
539 | 433 | } | ||
540 | 0 | 434 | ||
541 | === added file 'account_vat_on_payment/account_view.xml' | |||
542 | --- account_vat_on_payment/account_view.xml 1970-01-01 00:00:00 +0000 | |||
543 | +++ account_vat_on_payment/account_view.xml 2014-06-03 16:12:49 +0000 | |||
544 | @@ -0,0 +1,104 @@ | |||
545 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
546 | 2 | <openerp> | ||
547 | 3 | <data> | ||
548 | 4 | |||
549 | 5 | <!-- account --> | ||
550 | 6 | |||
551 | 7 | <record id="view_account_form" model="ir.ui.view"> | ||
552 | 8 | <field name="name">account.account.form</field> | ||
553 | 9 | <field name="model">account.account</field> | ||
554 | 10 | <field name="inherit_id" ref="account.view_account_form"/> | ||
555 | 11 | <field name="arch" type="xml"> | ||
556 | 12 | <field position="after" name="child_consol_ids"> | ||
557 | 13 | <field name="vat_on_payment_related_account_id"/> | ||
558 | 14 | </field> | ||
559 | 15 | </field> | ||
560 | 16 | </record> | ||
561 | 17 | |||
562 | 18 | <!-- tax code --> | ||
563 | 19 | |||
564 | 20 | <record id="view_tax_code_form" model="ir.ui.view"> | ||
565 | 21 | <field name="name">account.tax.code.form</field> | ||
566 | 22 | <field name="model">account.tax.code</field> | ||
567 | 23 | <field name="inherit_id" ref="account.view_tax_code_form"/> | ||
568 | 24 | <field name="arch" type="xml"> | ||
569 | 25 | <field position="after" name="company_id"> | ||
570 | 26 | <field name="vat_on_payment_related_tax_code_id"/> | ||
571 | 27 | </field> | ||
572 | 28 | </field> | ||
573 | 29 | </record> | ||
574 | 30 | |||
575 | 31 | <!-- journal --> | ||
576 | 32 | |||
577 | 33 | <record id="view_account_journal_form" model="ir.ui.view"> | ||
578 | 34 | <field name="name">account.journal.form</field> | ||
579 | 35 | <field name="model">account.journal</field> | ||
580 | 36 | <field name="inherit_id" ref="account.view_account_journal_form"/> | ||
581 | 37 | <field name="arch" type="xml"> | ||
582 | 38 | <field name="group_invoice_lines" position="after"> | ||
583 | 39 | <field name="vat_on_payment_related_journal_id"/> | ||
584 | 40 | </field> | ||
585 | 41 | </field> | ||
586 | 42 | </record> | ||
587 | 43 | |||
588 | 44 | <!-- invoice --> | ||
589 | 45 | |||
590 | 46 | <record id="invoice_form" model="ir.ui.view"> | ||
591 | 47 | <field name="name">account.invoice.form</field> | ||
592 | 48 | <field name="model">account.invoice</field> | ||
593 | 49 | <field name="inherit_id" ref="account.invoice_form"/> | ||
594 | 50 | <field name="arch" type="xml"> | ||
595 | 51 | <field name="payment_term" position="after"> | ||
596 | 52 | <field name="vat_on_payment"/> | ||
597 | 53 | </field> | ||
598 | 54 | </field> | ||
599 | 55 | </record> | ||
600 | 56 | <record id="invoice_supplier_form" model="ir.ui.view"> | ||
601 | 57 | <field name="name">account.invoice.supplier.form</field> | ||
602 | 58 | <field name="model">account.invoice</field> | ||
603 | 59 | <field name="inherit_id" ref="account.invoice_supplier_form"/> | ||
604 | 60 | <field name="arch" type="xml"> | ||
605 | 61 | <field name="date_due" position="after"> | ||
606 | 62 | <field name="vat_on_payment"/> | ||
607 | 63 | </field> | ||
608 | 64 | </field> | ||
609 | 65 | </record> | ||
610 | 66 | |||
611 | 67 | <!-- move line --> | ||
612 | 68 | |||
613 | 69 | <record id="view_move_line_form" model="ir.ui.view"> | ||
614 | 70 | <field name="name">account.move.line.form</field> | ||
615 | 71 | <field name="model">account.move.line</field> | ||
616 | 72 | <field name="inherit_id" ref="account.view_move_line_form"/> | ||
617 | 73 | <field name="arch" type="xml"> | ||
618 | 74 | <field name="reconcile_partial_id" position="after"> | ||
619 | 75 | <field name="real_payment_move_id" /> | ||
620 | 76 | </field> | ||
621 | 77 | </field> | ||
622 | 78 | </record> | ||
623 | 79 | |||
624 | 80 | <!-- voucher --> | ||
625 | 81 | |||
626 | 82 | <record id="view_vendor_receipt_form_shadow_move" model="ir.ui.view"> | ||
627 | 83 | <field name="name">account.voucher.receipt.form.shadow.move</field> | ||
628 | 84 | <field name="model">account.voucher</field> | ||
629 | 85 | <field name="inherit_id" ref="account_voucher.view_vendor_receipt_form"/> | ||
630 | 86 | <field name="arch" type="xml"> | ||
631 | 87 | <field name="move_ids" position="after"> | ||
632 | 88 | <field name="shadow_move_id" /> | ||
633 | 89 | </field> | ||
634 | 90 | </field> | ||
635 | 91 | </record> | ||
636 | 92 | |||
637 | 93 | <record id="view_vendor_payment_form_shadow_move" model="ir.ui.view"> | ||
638 | 94 | <field name="name">account.voucher.payment.form.shadow.move</field> | ||
639 | 95 | <field name="model">account.voucher</field> | ||
640 | 96 | <field name="inherit_id" ref="account_voucher.view_vendor_payment_form"/> | ||
641 | 97 | <field name="arch" type="xml"> | ||
642 | 98 | <field name="move_ids" position="after"> | ||
643 | 99 | <field name="shadow_move_id" /> | ||
644 | 100 | </field> | ||
645 | 101 | </field> | ||
646 | 102 | </record> | ||
647 | 103 | </data> | ||
648 | 104 | </openerp> | ||
649 | 0 | 105 | ||
650 | === added file 'account_vat_on_payment/company.py' | |||
651 | --- account_vat_on_payment/company.py 1970-01-01 00:00:00 +0000 | |||
652 | +++ account_vat_on_payment/company.py 2014-06-03 16:12:49 +0000 | |||
653 | @@ -0,0 +1,42 @@ | |||
654 | 1 | # -*- coding: utf-8 -*- | ||
655 | 2 | ############################################################################## | ||
656 | 3 | # | ||
657 | 4 | # OpenERP, Open Source Management Solution | ||
658 | 5 | # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). | ||
659 | 6 | # Copyright (C) 2012-2013 Agile Business Group sagl | ||
660 | 7 | # (<http://www.agilebg.com>) | ||
661 | 8 | # | ||
662 | 9 | # This program is free software: you can redistribute it and/or modify | ||
663 | 10 | # it under the terms of the GNU Affero General Public License as | ||
664 | 11 | # published by the Free Software Foundation, either version 3 of the | ||
665 | 12 | # License, or (at your option) any later version. | ||
666 | 13 | # | ||
667 | 14 | # This program is distributed in the hope that it will be useful, | ||
668 | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
669 | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
670 | 17 | # GNU Affero General Public License for more details. | ||
671 | 18 | # | ||
672 | 19 | # You should have received a copy of the GNU Affero General Public License | ||
673 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
674 | 21 | # | ||
675 | 22 | ############################################################################## | ||
676 | 23 | |||
677 | 24 | from openerp.osv import orm, fields | ||
678 | 25 | from tools.translate import _ | ||
679 | 26 | |||
680 | 27 | |||
681 | 28 | class res_company(orm.Model): | ||
682 | 29 | _inherit = "res.company" | ||
683 | 30 | _columns = { | ||
684 | 31 | 'vat_on_payment': fields.boolean('VAT on payment treatment'), | ||
685 | 32 | } | ||
686 | 33 | |||
687 | 34 | |||
688 | 35 | class account_config_settings(orm.TransientModel): | ||
689 | 36 | _inherit = 'account.config.settings' | ||
690 | 37 | _columns = { | ||
691 | 38 | 'vat_on_payment': fields.related( | ||
692 | 39 | 'company_id', 'vat_on_payment', | ||
693 | 40 | type='boolean', | ||
694 | 41 | string="VAT on payment treatment"), | ||
695 | 42 | } | ||
696 | 0 | 43 | ||
697 | === added file 'account_vat_on_payment/company_view.xml' | |||
698 | --- account_vat_on_payment/company_view.xml 1970-01-01 00:00:00 +0000 | |||
699 | +++ account_vat_on_payment/company_view.xml 2014-06-03 16:12:49 +0000 | |||
700 | @@ -0,0 +1,21 @@ | |||
701 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
702 | 2 | <openerp> | ||
703 | 3 | <data> | ||
704 | 4 | |||
705 | 5 | <!-- account --> | ||
706 | 6 | |||
707 | 7 | <record id="view_account_settings_currency_xchange_form" model="ir.ui.view"> | ||
708 | 8 | <field name="name">view_account_settings_currency_xchange_form</field> | ||
709 | 9 | <field name="model">account.config.settings</field> | ||
710 | 10 | <field name="inherit_id" ref="account_voucher_cash_basis.view_account_config_settings"/> | ||
711 | 11 | <field name="arch" type="xml"> | ||
712 | 12 | <xpath expr="/form/group[5]/div" position="inside"> | ||
713 | 13 | <div> | ||
714 | 14 | <field name="vat_on_payment" class="oe_inline"/> | ||
715 | 15 | <label for="vat_on_payment"/> | ||
716 | 16 | </div> | ||
717 | 17 | </xpath> | ||
718 | 18 | </field> | ||
719 | 19 | </record> | ||
720 | 20 | </data> | ||
721 | 21 | </openerp> | ||
722 | 0 | 22 | ||
723 | === added directory 'account_vat_on_payment/i18n' | |||
724 | === added file 'account_vat_on_payment/partner.py' | |||
725 | --- account_vat_on_payment/partner.py 1970-01-01 00:00:00 +0000 | |||
726 | +++ account_vat_on_payment/partner.py 2014-06-03 16:12:49 +0000 | |||
727 | @@ -0,0 +1,36 @@ | |||
728 | 1 | # -*- coding: utf-8 -*- | ||
729 | 2 | ############################################################################## | ||
730 | 3 | # | ||
731 | 4 | # OpenERP, Open Source Management Solution | ||
732 | 5 | # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). | ||
733 | 6 | # Copyright (C) 2012-2013 Agile Business Group sagl | ||
734 | 7 | # (<http://www.agilebg.com>) | ||
735 | 8 | # Copyright (C) 2014 Develer srl (<http://www.develer.com>) | ||
736 | 9 | # | ||
737 | 10 | # This program is free software: you can redistribute it and/or modify | ||
738 | 11 | # it under the terms of the GNU Affero General Public License as | ||
739 | 12 | # published by the Free Software Foundation, either version 3 of the | ||
740 | 13 | # License, or (at your option) any later version. | ||
741 | 14 | # | ||
742 | 15 | # This program is distributed in the hope that it will be useful, | ||
743 | 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
744 | 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
745 | 18 | # GNU Affero General Public License for more details. | ||
746 | 19 | # | ||
747 | 20 | # You should have received a copy of the GNU Affero General Public License | ||
748 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
749 | 22 | # | ||
750 | 23 | ############################################################################## | ||
751 | 24 | |||
752 | 25 | |||
753 | 26 | from openerp.osv import fields, orm | ||
754 | 27 | from openerp.tools.translate import _ | ||
755 | 28 | |||
756 | 29 | |||
757 | 30 | class account_fiscal_position(orm.Model): | ||
758 | 31 | _inherit = 'account.fiscal.position' | ||
759 | 32 | |||
760 | 33 | _columns = { | ||
761 | 34 | 'default_has_vat_on_payment': fields.boolean( | ||
762 | 35 | 'VAT on Payment Default Flag'), | ||
763 | 36 | } | ||
764 | 0 | 37 | ||
765 | === added file 'account_vat_on_payment/partner_view.xml' | |||
766 | --- account_vat_on_payment/partner_view.xml 1970-01-01 00:00:00 +0000 | |||
767 | +++ account_vat_on_payment/partner_view.xml 2014-06-03 16:12:49 +0000 | |||
768 | @@ -0,0 +1,48 @@ | |||
769 | 1 | <?xml version="1.0"?> | ||
770 | 2 | |||
771 | 3 | <!-- | ||
772 | 4 | # -*- coding: utf-8 -*- | ||
773 | 5 | ############################################################################## | ||
774 | 6 | # | ||
775 | 7 | # OpenERP, Open Source Management Solution | ||
776 | 8 | # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). | ||
777 | 9 | # Copyright (C) 2012-2013 Agile Business Group sagl | ||
778 | 10 | # (<http://www.agilebg.com>) | ||
779 | 11 | # Copyright (C) 2014 Develer srl (<http://www.develer.com>) | ||
780 | 12 | # | ||
781 | 13 | # This program is free software: you can redistribute it and/or modify | ||
782 | 14 | # it under the terms of the GNU Affero General Public License as | ||
783 | 15 | # published by the Free Software Foundation, either version 3 of the | ||
784 | 16 | # License, or (at your option) any later version. | ||
785 | 17 | # | ||
786 | 18 | # This program is distributed in the hope that it will be useful, | ||
787 | 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
788 | 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
789 | 21 | # GNU Affero General Public License for more details. | ||
790 | 22 | # | ||
791 | 23 | # You should have received a copy of the GNU Affero General Public License | ||
792 | 24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
793 | 25 | # | ||
794 | 26 | ############################################################################## | ||
795 | 27 | --> | ||
796 | 28 | |||
797 | 29 | |||
798 | 30 | <openerp> | ||
799 | 31 | <data> | ||
800 | 32 | |||
801 | 33 | <!-- res.partner customizations --> | ||
802 | 34 | |||
803 | 35 | <record id="view_partner_form" model="ir.ui.view"> | ||
804 | 36 | <field name="name">account.fiscal.position.vat.default.view</field> | ||
805 | 37 | <field name="model">account.fiscal.position</field> | ||
806 | 38 | <field name="inherit_id" ref="account.view_account_position_form"/> | ||
807 | 39 | <field name="arch" type="xml"> | ||
808 | 40 | <field name="active" position="after" version="7.0"> | ||
809 | 41 | <field name="default_has_vat_on_payment" class="oe_inline"/> | ||
810 | 42 | </field> | ||
811 | 43 | </field> | ||
812 | 44 | </record> | ||
813 | 45 | |||
814 | 46 | |||
815 | 47 | </data> | ||
816 | 48 | </openerp> |
there's a blocking typo here:
http:// bazaar. launchpad. net/~domsense/ account- payment/ adding_ account_ vat_on_ payment_ 7/view/ head:/account_ vat_on_ payment/ account. py#L45
s/vat_on_ paymen/ vat_on_ payment