Merge lp:~bruno-bottacini/domsense-agilebg-addons/7-account_due_list_partner_optout_enable into lp:domsense-agilebg-addons
- 7-account_due_list_partner_optout_enable
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~bruno-bottacini/domsense-agilebg-addons/7-account_due_list_partner_optout_enable |
Merge into: | lp:domsense-agilebg-addons |
Diff against target: |
634 lines (+577/-0) 11 files modified
account_due_list/AUTHORS.txt (+2/-0) account_due_list/__init__.py (+21/-0) account_due_list/__openerp__.py (+34/-0) account_due_list/account_move_line.py (+91/-0) account_due_list/i18n/de.po (+109/-0) account_due_list/i18n/it.po (+157/-0) account_due_list/payment_view.xml (+75/-0) partner_optout_enable/AUTHORS.txt (+1/-0) partner_optout_enable/__init__.py (+21/-0) partner_optout_enable/__openerp__.py (+37/-0) partner_optout_enable/partner.py (+29/-0) |
To merge this branch: | bzr merge lp:~bruno-bottacini/domsense-agilebg-addons/7-account_due_list_partner_optout_enable |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lorenzo Battistini | Disapprove | ||
Review via email: mp+170812@code.launchpad.net |
Commit message
Description of the change
- 227. By bruno bottacini
-
function fields_view_get give an error on installation
bruno bottacini (bruno-bottacini) wrote : | # |
ciao,
peccato, preferivo 'account_due_list' perchè è più pulito ed essenziale
Lorenzo Battistini (elbati) wrote : | # |
Ciao Bruno,
proprio in questi giorni si sta parlando di come gestire le compatibilità tra i moduli:
http://
Inoltre, recentemente è stata dichiarata una incompatibilità proprio con account_
http://
per motivi simili a quelli relativi ad account_due_list: account_
Alla luce di questo, ti inviterei a proporre il merge sul branch lp:account-payment/7.0 , specificando l'incompatibilità con account_
Alex Comba - Agile BG (tafaru) wrote : | # |
Ciao Bruno,
ti informo che me ne sto occupando io di proporre il MP su lp:account-payment/7.0, ti chiederei pertanto di ignorare il precedente commento di Lorenzo:
>Alla luce di questo, ti inviterei a proporre il merge sul branch lp:account-payment/7.0 , specificando l'incompatibilità con account_
Grazie.
Unmerged revisions
- 227. By bruno bottacini
-
function fields_view_get give an error on installation
- 226. By bruno bottacini
-
migrate account_due_list and partner_
optout_ enable to openerp 7
Preview Diff
1 | === added directory 'account_due_list' |
2 | === added file 'account_due_list/AUTHORS.txt' |
3 | --- account_due_list/AUTHORS.txt 1970-01-01 00:00:00 +0000 |
4 | +++ account_due_list/AUTHORS.txt 2013-06-21 14:32:23 +0000 |
5 | @@ -0,0 +1,2 @@ |
6 | +Jordi Esteve <jesteve@zikzakmedia.com> |
7 | +Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
8 | |
9 | === added file 'account_due_list/__init__.py' |
10 | --- account_due_list/__init__.py 1970-01-01 00:00:00 +0000 |
11 | +++ account_due_list/__init__.py 2013-06-21 14:32:23 +0000 |
12 | @@ -0,0 +1,21 @@ |
13 | +# -*- coding: utf-8 -*- |
14 | +############################################################################## |
15 | +# |
16 | +# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) |
17 | +# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) |
18 | +# |
19 | +# This program is free software: you can redistribute it and/or modify |
20 | +# it under the terms of the GNU Affero General Public License as published |
21 | +# by the Free Software Foundation, either version 3 of the License, or |
22 | +# (at your option) any later version. |
23 | +# |
24 | +# This program is distributed in the hope that it will be useful, |
25 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
26 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
27 | +# GNU General Public License for more details. |
28 | +# |
29 | +# You should have received a copy of the GNU Affero General Public License |
30 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
31 | +# |
32 | +############################################################################## |
33 | +import account_move_line |
34 | |
35 | === added file 'account_due_list/__openerp__.py' |
36 | --- account_due_list/__openerp__.py 1970-01-01 00:00:00 +0000 |
37 | +++ account_due_list/__openerp__.py 2013-06-21 14:32:23 +0000 |
38 | @@ -0,0 +1,34 @@ |
39 | +# -*- coding: utf-8 -*- |
40 | +############################################################################## |
41 | +# |
42 | +# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) |
43 | +# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) |
44 | +# |
45 | +# This program is free software: you can redistribute it and/or modify |
46 | +# it under the terms of the GNU Affero General Public License as published |
47 | +# by the Free Software Foundation, either version 3 of the License, or |
48 | +# (at your option) any later version. |
49 | +# |
50 | +# This program is distributed in the hope that it will be useful, |
51 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
52 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
53 | +# GNU General Public License for more details. |
54 | +# |
55 | +# You should have received a copy of the GNU Affero General Public License |
56 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
57 | +# |
58 | +############################################################################## |
59 | +{ |
60 | + 'name': "Payments Due list", |
61 | + 'version': '0.1', |
62 | + 'category': 'Generic Modules/Payment', |
63 | + 'description': """A due list of pending payments. The list contains every expected payment, generated by invoices. The list is fully filterable.""", |
64 | + 'author': 'Agile Business Group, Zikzakmedia SL', |
65 | + 'website': 'http://www.agilebg.com', |
66 | + 'license': 'AGPL-3', |
67 | + "depends" : ['account'], |
68 | + "data" : ['payment_view.xml'], |
69 | + "demo_xml" : [], |
70 | + "active": False, |
71 | + "installable": True |
72 | +} |
73 | |
74 | === added file 'account_due_list/account_move_line.py' |
75 | --- account_due_list/account_move_line.py 1970-01-01 00:00:00 +0000 |
76 | +++ account_due_list/account_move_line.py 2013-06-21 14:32:23 +0000 |
77 | @@ -0,0 +1,91 @@ |
78 | +# -*- coding: utf-8 -*- |
79 | +############################################################################## |
80 | +# |
81 | +# OpenERP, Open Source Management Solution |
82 | +# Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
83 | +# Jordi Esteve <jesteve@zikzakmedia.com> |
84 | +# |
85 | +# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) |
86 | +# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) |
87 | +# |
88 | +# This program is free software: you can redistribute it and/or modify |
89 | +# it under the terms of the GNU Affero General Public License as published |
90 | +# by the Free Software Foundation, either version 3 of the License, or |
91 | +# (at your option) any later version. |
92 | +# |
93 | +# This program is distributed in the hope that it will be useful, |
94 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
95 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
96 | +# GNU General Public License for more details. |
97 | +# |
98 | +# You should have received a copy of the GNU Affero General Public License |
99 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
100 | +# |
101 | +############################################################################## |
102 | + |
103 | +from openerp.osv import fields, orm |
104 | + |
105 | +class account_move_line(orm.Model): |
106 | + |
107 | + def _get_invoice(self, cr, uid, ids, field_name, arg, context=None): |
108 | + invoice_pool = self.pool.get('account.invoice') |
109 | + res = {} |
110 | + for line in self.browse(cr, uid, ids): |
111 | + inv_ids = invoice_pool.search(cr, uid, [('move_id', '=', line.move_id.id)]) |
112 | + if len(inv_ids)>1: |
113 | + raise orm.except_orm(_('Error'), _('Incongruent data: move %s has more than one invoice') % line.move_id.name) |
114 | + if inv_ids: |
115 | + res[line.id] = inv_ids[0] |
116 | + else: |
117 | + res[line.id] = False |
118 | + return res |
119 | + |
120 | + def _get_day(self, cr, uid, ids, field_name, arg, context=None): |
121 | + res = {} |
122 | + for line in self.browse(cr, uid, ids): |
123 | + if line.date_maturity: |
124 | + res[line.id] = line.date_maturity |
125 | + else: res[line.id] = False |
126 | + return res |
127 | + |
128 | + def _get_move_lines(self, cr, uid, ids, context=None): |
129 | + invoice_pool = self.pool.get('account.invoice') |
130 | + res = [] |
131 | + for invoice in invoice_pool.browse(cr, uid, ids): |
132 | + if invoice.move_id: |
133 | + for line in invoice.move_id.line_id: |
134 | + if line.id not in res: |
135 | + res.append(line.id) |
136 | + return res |
137 | + |
138 | + _inherit = 'account.move.line' |
139 | + |
140 | + _columns = { |
141 | + 'invoice_origin': fields.related('invoice', 'origin', type='char', string='Source Doc', store=False), |
142 | + 'invoice_date': fields.related('invoice', 'date_invoice', type='date', string='Invoice Date', store=False), |
143 | + 'partner_ref': fields.related('partner_id', 'ref', type='char', string='Partner Ref', store=False), |
144 | + 'payment_term_id': fields.related('invoice', 'payment_term', type='many2one', string='Payment Term', store=False, relation="account.payment.term"), |
145 | + 'stored_invoice_id': fields.function(_get_invoice, method=True, string="Invoice", type="many2one", relation="account.invoice", |
146 | + store={ |
147 | + 'account.move.line': (lambda self, cr, uid, ids, c={}: ids, ['move_id'], 10), |
148 | + 'account.invoice': (_get_move_lines, ['move_id'], 10), |
149 | + }), |
150 | + 'day': fields.function(_get_day, method=True, string="Day", type="char", size=16, |
151 | + store={ |
152 | + 'account.move.line': (lambda self, cr, uid, ids, c={}: ids, ['date_maturity'], 10), |
153 | + }), |
154 | + } |
155 | + |
156 | + def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): |
157 | + model_data_obj = self.pool.get('ir.model.data') |
158 | + ids = model_data_obj.search(cr, uid, [('module','=','account_due_list'), ('name','=','view_payments_tree')]) |
159 | + if ids: |
160 | + view_payments_tree_id = model_data_obj.get_object_reference( |
161 | + cr, uid, 'account_due_list', 'view_payments_tree') |
162 | + if ids and view_id == view_payments_tree_id[1]: |
163 | + # Use due list |
164 | + result = super(orm.Model, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) |
165 | + else: |
166 | + # Use special views for account.move.line object (for ex. tree view contains user defined fields) |
167 | + result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) |
168 | + return result |
169 | |
170 | === added directory 'account_due_list/i18n' |
171 | === added file 'account_due_list/i18n/de.po' |
172 | --- account_due_list/i18n/de.po 1970-01-01 00:00:00 +0000 |
173 | +++ account_due_list/i18n/de.po 2013-06-21 14:32:23 +0000 |
174 | @@ -0,0 +1,109 @@ |
175 | +# Translation of OpenERP Server. |
176 | +# This file contains the translation of the following modules: |
177 | +# * account_due_list |
178 | +# |
179 | +msgid "" |
180 | +msgstr "" |
181 | +"Project-Id-Version: OpenERP Server 6.0.3\n" |
182 | +"Report-Msgid-Bugs-To: support@openerp.com\n" |
183 | +"POT-Creation-Date: 2011-10-11 08:28+0000\n" |
184 | +"PO-Revision-Date: 2011-10-11 10:35+0100\n" |
185 | +"Last-Translator: Thomas Winteler <info@win-soft.ch>\n" |
186 | +"Language-Team: \n" |
187 | +"MIME-Version: 1.0\n" |
188 | +"Content-Type: text/plain; charset=UTF-8\n" |
189 | +"Content-Transfer-Encoding: 8bit\n" |
190 | +"Plural-Forms: \n" |
191 | + |
192 | +#. module: account_due_list |
193 | +#: view:account.move.line:0 |
194 | +msgid "Receivable" |
195 | +msgstr "Debitor" |
196 | + |
197 | +#. module: account_due_list |
198 | +#: field:account.move.line,invoice_origin:0 |
199 | +msgid "Source Doc" |
200 | +msgstr "Herkunft" |
201 | + |
202 | +#. module: account_due_list |
203 | +#: view:account.move.line:0 |
204 | +msgid "Payable" |
205 | +msgstr "Kreditor" |
206 | + |
207 | +#. module: account_due_list |
208 | +#: constraint:account.move.line:0 |
209 | +msgid "You can not create move line on closed account." |
210 | +msgstr "Sie können keine Buchung auf einem bereits abgeschlossenen Konto vornehmen." |
211 | + |
212 | +#. module: account_due_list |
213 | +#: field:account.move.line,invoice_date:0 |
214 | +msgid "Invoice Date" |
215 | +msgstr "Rechnungsdatum" |
216 | + |
217 | +#. module: account_due_list |
218 | +#: view:account.move.line:0 |
219 | +msgid "Unreconciled" |
220 | +msgstr "Offene Posten" |
221 | + |
222 | +#. module: account_due_list |
223 | +#: view:account.move.line:0 |
224 | +msgid "Total Debit" |
225 | +msgstr "Total Debit" |
226 | + |
227 | +#. module: account_due_list |
228 | +#: view:account.move.line:0 |
229 | +msgid "Group By..." |
230 | +msgstr "Gruppierung..." |
231 | + |
232 | +#. module: account_due_list |
233 | +#: sql_constraint:account.move.line:0 |
234 | +msgid "Wrong credit or debit value in accounting entry !" |
235 | +msgstr "Falscher Buchungsbetrag in Soll oder Haben" |
236 | + |
237 | +#. module: account_due_list |
238 | +#: view:account.move.line:0 |
239 | +#: model:ir.actions.act_window,name:account_due_list.action_invoice_payments |
240 | +#: model:ir.ui.menu,name:account_due_list.menu_action_invoice_payments |
241 | +msgid "Payments" |
242 | +msgstr "Zahlungen" |
243 | + |
244 | +#. module: account_due_list |
245 | +#: view:account.move.line:0 |
246 | +msgid "Search Payments" |
247 | +msgstr "Zahlungen suchen" |
248 | + |
249 | +#. module: account_due_list |
250 | +#: model:ir.model,name:account_due_list.model_account_move_line |
251 | +msgid "Journal Items" |
252 | +msgstr "Buchungsjournale" |
253 | + |
254 | +#. module: account_due_list |
255 | +#: view:account.move.line:0 |
256 | +msgid "Partner" |
257 | +msgstr "Partner" |
258 | + |
259 | +#. module: account_due_list |
260 | +#: constraint:account.move.line:0 |
261 | +msgid "You can not create move line on view account." |
262 | +msgstr "Sie können keine Buchungen auf Konten des Typs Ansicht erstellen." |
263 | + |
264 | +#. module: account_due_list |
265 | +#: constraint:account.move.line:0 |
266 | +msgid "Company must be same for its related account and period." |
267 | +msgstr "Das Unternehmen muss für zugehörige Konten und Perioden identisch sein." |
268 | + |
269 | +#. module: account_due_list |
270 | +#: view:account.move.line:0 |
271 | +msgid "Total Credit" |
272 | +msgstr "Total Kredit" |
273 | + |
274 | +#. module: account_due_list |
275 | +#: field:account.move.line,partner_ref:0 |
276 | +msgid "Partner Ref" |
277 | +msgstr "Partner Ref" |
278 | + |
279 | +#. module: account_due_list |
280 | +#: view:account.move.line:0 |
281 | +msgid "Overdue" |
282 | +msgstr "Überfällig" |
283 | + |
284 | |
285 | === added file 'account_due_list/i18n/it.po' |
286 | --- account_due_list/i18n/it.po 1970-01-01 00:00:00 +0000 |
287 | +++ account_due_list/i18n/it.po 2013-06-21 14:32:23 +0000 |
288 | @@ -0,0 +1,157 @@ |
289 | +# Translation of OpenERP Server. |
290 | +# This file contains the translation of the following modules: |
291 | +# * account_due_list |
292 | +# |
293 | +msgid "" |
294 | +msgstr "" |
295 | +"Project-Id-Version: OpenERP Server 6.0.3\n" |
296 | +"Report-Msgid-Bugs-To: support@openerp.com\n" |
297 | +"POT-Creation-Date: 2012-01-01 14:38+0000\n" |
298 | +"PO-Revision-Date: 2012-01-01 15:39+0100\n" |
299 | +"Last-Translator: Lorenzo Battistini <lorenzo.battistini@agilebg.com>\n" |
300 | +"Language-Team: \n" |
301 | +"MIME-Version: 1.0\n" |
302 | +"Content-Type: text/plain; charset=UTF-8\n" |
303 | +"Content-Transfer-Encoding: 8bit\n" |
304 | +"Plural-Forms: \n" |
305 | + |
306 | +#. module: account_due_list |
307 | +#: view:account.move.line:0 |
308 | +msgid "Receivable" |
309 | +msgstr "Crediti" |
310 | + |
311 | +#. module: account_due_list |
312 | +#: field:account.move.line,payment_term_id:0 |
313 | +msgid "Payment Term" |
314 | +msgstr "Termini di pagamento" |
315 | + |
316 | +#. module: account_due_list |
317 | +#: view:account.move.line:0 |
318 | +msgid "Unreconciled" |
319 | +msgstr "Non riconciliate" |
320 | + |
321 | +#. module: account_due_list |
322 | +#: view:account.move.line:0 |
323 | +msgid "Group By..." |
324 | +msgstr "Raggruppa per..." |
325 | + |
326 | +#. module: account_due_list |
327 | +#: field:account.move.line,invoice_origin:0 |
328 | +msgid "Source Doc" |
329 | +msgstr "Documento di origine" |
330 | + |
331 | +#. module: account_due_list |
332 | +#: field:account.move.line,invoice_date:0 |
333 | +msgid "Invoice Date" |
334 | +msgstr "Data fattura" |
335 | + |
336 | +#. module: account_due_list |
337 | +#: code:addons/account_due_list/account_move_line.py:37 |
338 | +#, python-format |
339 | +msgid "Incongruent data: move %s has more than one invoice" |
340 | +msgstr "Dati incongruenti: la registrazione %s ha più di una fattura" |
341 | + |
342 | +#. module: account_due_list |
343 | +#: view:account.move.line:0 |
344 | +msgid "Payable" |
345 | +msgstr "Debiti" |
346 | + |
347 | +#. module: account_due_list |
348 | +#: view:account.move.line:0 |
349 | +msgid "Search Payments" |
350 | +msgstr "Ricerca pagamenti" |
351 | + |
352 | +#. module: account_due_list |
353 | +#: model:ir.model,name:account_due_list.model_account_move_line |
354 | +msgid "Journal Items" |
355 | +msgstr "Voci sezionale" |
356 | + |
357 | +#. module: account_due_list |
358 | +#: constraint:account.move.line:0 |
359 | +msgid "Company must be same for its related account and period." |
360 | +msgstr "L'azienda deve essere la stessa del suo conto e periodo." |
361 | + |
362 | +#. module: account_due_list |
363 | +#: view:account.move.line:0 |
364 | +msgid "Total Credit" |
365 | +msgstr "Credito totale" |
366 | + |
367 | +#. module: account_due_list |
368 | +#: constraint:account.move.line:0 |
369 | +msgid "You can not create move line on closed account." |
370 | +msgstr "Nonè possibile creare movimenti su un conto chiuso." |
371 | + |
372 | +#. module: account_due_list |
373 | +#: view:account.move.line:0 |
374 | +msgid "Total Debit" |
375 | +msgstr "Debito totale" |
376 | + |
377 | +#. module: account_due_list |
378 | +#: sql_constraint:account.move.line:0 |
379 | +msgid "Wrong credit or debit value in accounting entry !" |
380 | +msgstr "Valore di debito o credito errato nella registrazione contabile" |
381 | + |
382 | +#. module: account_due_list |
383 | +#: view:account.move.line:0 |
384 | +#: model:ir.actions.act_window,name:account_due_list.action_invoice_payments |
385 | +#: model:ir.ui.menu,name:account_due_list.menu_action_invoice_payments |
386 | +msgid "Payments" |
387 | +msgstr "Pagamenti" |
388 | + |
389 | +#. module: account_due_list |
390 | +#: code:addons/account_due_list/account_move_line.py:37 |
391 | +#, python-format |
392 | +msgid "Error" |
393 | +msgstr "Errore" |
394 | + |
395 | +#. module: account_due_list |
396 | +#: model:ir.module.module,description:account_due_list.module_meta_information |
397 | +msgid "A due list of pending payments. The list contains every expected payment, generated by invoices. The list is fully filterable." |
398 | +msgstr "A due list of pending payments. The list contains every expected payment, generated by invoices. The list is fully filterable." |
399 | + |
400 | +#. module: account_due_list |
401 | +#: view:account.move.line:0 |
402 | +msgid "Overdue" |
403 | +msgstr "Scaduti" |
404 | + |
405 | +#. module: account_due_list |
406 | +#: view:account.move.line:0 |
407 | +msgid "Due date" |
408 | +msgstr "Data scadenza" |
409 | + |
410 | +#. module: account_due_list |
411 | +#: model:ir.module.module,shortdesc:account_due_list.module_meta_information |
412 | +msgid "Payments Due list" |
413 | +msgstr "Scadenzario pagamenti" |
414 | + |
415 | +#. module: account_due_list |
416 | +#: field:account.move.line,day:0 |
417 | +msgid "Day" |
418 | +msgstr "Giorno" |
419 | + |
420 | +#. module: account_due_list |
421 | +#: view:account.move.line:0 |
422 | +msgid "Month" |
423 | +msgstr "Mese" |
424 | + |
425 | +#. module: account_due_list |
426 | +#: view:account.move.line:0 |
427 | +#: field:account.move.line,stored_invoice_id:0 |
428 | +msgid "Invoice" |
429 | +msgstr "Fattura" |
430 | + |
431 | +#. module: account_due_list |
432 | +#: view:account.move.line:0 |
433 | +msgid "Partner" |
434 | +msgstr "Partner" |
435 | + |
436 | +#. module: account_due_list |
437 | +#: field:account.move.line,partner_ref:0 |
438 | +msgid "Partner Ref" |
439 | +msgstr "Rif Partner" |
440 | + |
441 | +#. module: account_due_list |
442 | +#: constraint:account.move.line:0 |
443 | +msgid "You can not create move line on view account." |
444 | +msgstr "Non è possibile creare movimenti su conti vista." |
445 | + |
446 | |
447 | === added file 'account_due_list/payment_view.xml' |
448 | --- account_due_list/payment_view.xml 1970-01-01 00:00:00 +0000 |
449 | +++ account_due_list/payment_view.xml 2013-06-21 14:32:23 +0000 |
450 | @@ -0,0 +1,75 @@ |
451 | +<?xml version="1.0" encoding="utf-8"?> |
452 | +<openerp> |
453 | +<data> |
454 | + |
455 | + <!--****************************** PAYMENTS ***********************************--> |
456 | + <record id="view_payments_tree" model="ir.ui.view"> |
457 | + <field name="name">Payments</field> |
458 | + <field name="model">account.move.line</field> |
459 | + <field name="field_parent">partner_id</field> |
460 | + <field name="priority" eval="20"/> |
461 | + <field name="arch" type="xml"> |
462 | + <tree string="Payments" colors="grey:reconcile_id!=False;red:date_maturity<current_date"> |
463 | + <field name="stored_invoice_id" readonly="1"/> |
464 | + <field name="invoice_date" readonly="1"/> |
465 | + <field name="invoice_origin" readonly="1"/> |
466 | + <field name="partner_id" readonly="1"/> |
467 | + <field name="partner_ref" readonly="1"/> |
468 | + <field name="payment_term_id" readonly="1"/> |
469 | + <field name="account_id" readonly="1"/> |
470 | + <field name="debit" readonly="1" sum="Total Debit"/> |
471 | + <field name="credit" readonly="1" sum="Total Credit"/> |
472 | + <field name="date_maturity"/> |
473 | + <field name="move_id" readonly="1"/> |
474 | + <field name="reconcile_id" readonly="1"/> |
475 | + <field name="reconcile_partial_id" readonly="1"/> |
476 | + <field name="day" invisible="1"/> |
477 | + </tree> |
478 | + </field> |
479 | + </record> |
480 | + |
481 | + <record id="view_payments_filter" model="ir.ui.view"> |
482 | + <field name="name">Payments Select</field> |
483 | + <field name="model">account.move.line</field> |
484 | + <field name="priority" eval="20"/> |
485 | + <field name="arch" type="xml"> |
486 | + <search string="Search Payments"> |
487 | + <group col='10' colspan='4'> |
488 | + <filter icon="terp-sale" string="Receivable" domain="[('account_id.type','=','receivable')]" help="Receivable payments"/> |
489 | + <filter icon="terp-purchase" string="Payable" domain="[('account_id.type','=','payable')]" help="Payable payments"/> |
490 | + <separator orientation="vertical"/> |
491 | + <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False)]" help="Unreconciled payments"/> |
492 | + <separator orientation="vertical"/> |
493 | + <filter icon="terp-go-today" string="Overdue" domain="[('date_maturity','<',time.strftime('%%Y-%%m-%%d'))]" help="Overdue payments" name="overdue"/> |
494 | + <separator orientation="vertical"/> |
495 | + <field name="account_id"/> |
496 | + <field name="partner_id"/> |
497 | + <field name="invoice"/> |
498 | + <field name="invoice_origin"/> |
499 | + <field name="date_maturity"/> |
500 | + </group> |
501 | + <newline/> |
502 | + <group expand="0" string="Group By..."> |
503 | + <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/> |
504 | + <filter string="Invoice" icon="terp-folder-orange" domain="[]" context="{'group_by':'stored_invoice_id'}"/> |
505 | + <filter string="Due date" icon="terp-go-today" domain="[]" context="{'group_by':'day'}"/> |
506 | + <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_maturity'}"/> |
507 | + </group> |
508 | + </search> |
509 | + </field> |
510 | + </record> |
511 | + |
512 | + <!-- Invoice Payments --> |
513 | + <record model="ir.actions.act_window" id="action_invoice_payments"> |
514 | + <field name="name">Payments</field> |
515 | + <field name="res_model">account.move.line</field> |
516 | + <field name="view_type">form</field> |
517 | + <field name="view_mode">tree,form</field> |
518 | + <field name="view_id" ref="view_payments_tree"/> |
519 | + <field name="search_view_id" ref="view_payments_filter"/> |
520 | + <field name="domain">['&','|',('account_id.type','=','payable'),('account_id.type','=','receivable'),'|','|','|',('journal_id.code','=','SAJ'),('journal_id.code','=','EXJ'),('journal_id.code','=','SCNJ'),('journal_id.code','=','ECNJ')]</field> |
521 | + </record> |
522 | + <menuitem name="Payments" parent="account.menu_finance_entries" action="action_invoice_payments" id="menu_action_invoice_payments" sequence="5"/> |
523 | + |
524 | +</data> |
525 | +</openerp> |
526 | |
527 | === added directory 'partner_optout_enable' |
528 | === added file 'partner_optout_enable/AUTHORS.txt' |
529 | --- partner_optout_enable/AUTHORS.txt 1970-01-01 00:00:00 +0000 |
530 | +++ partner_optout_enable/AUTHORS.txt 2013-06-21 14:32:23 +0000 |
531 | @@ -0,0 +1,1 @@ |
532 | +Lorenzo Battistini <lorenzo.battistini@agilebg.com> |
533 | |
534 | === added file 'partner_optout_enable/__init__.py' |
535 | --- partner_optout_enable/__init__.py 1970-01-01 00:00:00 +0000 |
536 | +++ partner_optout_enable/__init__.py 2013-06-21 14:32:23 +0000 |
537 | @@ -0,0 +1,21 @@ |
538 | +# -*- coding: utf-8 -*- |
539 | +############################################################################## |
540 | +# |
541 | +# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>) |
542 | +# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>) |
543 | +# |
544 | +# This program is free software: you can redistribute it and/or modify |
545 | +# it under the terms of the GNU Affero General Public License as published |
546 | +# by the Free Software Foundation, either version 3 of the License, or |
547 | +# (at your option) any later version. |
548 | +# |
549 | +# This program is distributed in the hope that it will be useful, |
550 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
551 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
552 | +# GNU General Public License for more details. |
553 | +# |
554 | +# You should have received a copy of the GNU Affero General Public License |
555 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
556 | +# |
557 | +############################################################################## |
558 | +import partner |
559 | |
560 | === added file 'partner_optout_enable/__openerp__.py' |
561 | --- partner_optout_enable/__openerp__.py 1970-01-01 00:00:00 +0000 |
562 | +++ partner_optout_enable/__openerp__.py 2013-06-21 14:32:23 +0000 |
563 | @@ -0,0 +1,37 @@ |
564 | +# -*- coding: utf-8 -*- |
565 | +############################################################################## |
566 | +# |
567 | +# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) |
568 | +# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) |
569 | +# |
570 | +# This program is free software: you can redistribute it and/or modify |
571 | +# it under the terms of the GNU Affero General Public License as published |
572 | +# by the Free Software Foundation, either version 3 of the License, or |
573 | +# (at your option) any later version. |
574 | +# |
575 | +# This program is distributed in the hope that it will be useful, |
576 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
577 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
578 | +# GNU General Public License for more details. |
579 | +# |
580 | +# You should have received a copy of the GNU Affero General Public License |
581 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
582 | +# |
583 | +############################################################################## |
584 | +{ |
585 | + 'name': "Enable Opt-out for partners", |
586 | + 'version': '0.1', |
587 | + 'category': 'Marketing', |
588 | + 'description': """ |
589 | +This module simply enable by default the 'opt-out' field on partner. |
590 | +So that, by default, partner will not receive any automated email notification, such as the availability of invoices. |
591 | +""", |
592 | + 'author': 'Agile Business Group', |
593 | + 'website': 'http://www.agilebg.com', |
594 | + 'license': 'AGPL-3', |
595 | + "depends" : ['email_template'], |
596 | + "data" : [], |
597 | + "demo_xml" : [], |
598 | + "active": False, |
599 | + "installable": True |
600 | +} |
601 | |
602 | === added file 'partner_optout_enable/partner.py' |
603 | --- partner_optout_enable/partner.py 1970-01-01 00:00:00 +0000 |
604 | +++ partner_optout_enable/partner.py 2013-06-21 14:32:23 +0000 |
605 | @@ -0,0 +1,29 @@ |
606 | +# -*- coding: utf-8 -*- |
607 | +############################################################################## |
608 | +# |
609 | +# Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) |
610 | +# Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) |
611 | +# |
612 | +# This program is free software: you can redistribute it and/or modify |
613 | +# it under the terms of the GNU Affero General Public License as published |
614 | +# by the Free Software Foundation, either version 3 of the License, or |
615 | +# (at your option) any later version. |
616 | +# |
617 | +# This program is distributed in the hope that it will be useful, |
618 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
619 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
620 | +# GNU General Public License for more details. |
621 | +# |
622 | +# You should have received a copy of the GNU Affero General Public License |
623 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
624 | +# |
625 | +############################################################################## |
626 | + |
627 | +from openerp.osv import fields,orm |
628 | + |
629 | +class res_partner(orm.Model): |
630 | + _inherit = 'res.partner' |
631 | + |
632 | + _defaults = { |
633 | + 'opt_out': True, |
634 | + } |
Ciao Bruno, grazie della proposta, ma questi due moduli probabilmente non approderanno mai alla 7.
Per quanto riguarda 'partner_ optout_ enable' , avevo già proposto il merge sui community branches /code.launchpad .net/~elbati/ partner- contact- management/ adding_ partner_ optout_ enable/ +merge/ 147950
https:/
ma poi ci siamo accorti che il campo in questione era inutilizzato.
Se invece hai scoperto che il modulo può comunque essere utile, puoi continuare la discussione su quella MP.
Mentre 'account_due_list' contiene funzionalità già presenti nel modulo 'account_ payment_ extension' ( https:/ /code.launchpad .net/~account- payment- team/account- payment/ 7.0 ), quindi sarebbe superfluo.
Anche in questo caso, se ritieni che il modulo possa essere comunque utile, puoi proporre il merge su lp:~account-payment-team/account-payment/7.0
A proposito del pensionamento di account_due_list, bisognerà considerarlo quando migreremo il modulo RiBa (che dipende da account_due_list), rimuovendo la dipendenza.