Merge lp:andreacometa-addons/7.0 into lp:andreacometa-addons

Proposed by mohamedhanfy
Status: Rejected
Rejected by: Andrea Cometa
Proposed branch: lp:andreacometa-addons/7.0
Merge into: lp:andreacometa-addons
Diff against target: 3625 lines (+3177/-0)
77 files modified
README.txt (+2/-0)
account_due_list_extended/__init__.py (+26/-0)
account_due_list_extended/__openerp__.py (+46/-0)
account_due_list_extended/account/__init__.py (+24/-0)
account_due_list_extended/account/account.py (+94/-0)
account_due_list_extended/account/account_view.xml (+104/-0)
account_due_list_extended/i18n/account_due_list_extended.pot (+119/-0)
account_due_list_extended/i18n/it.po (+119/-0)
account_due_list_extended/payment_type_data.xml (+22/-0)
account_due_list_extended/reports/__init__.py (+24/-0)
account_due_list_extended/reports/parser.py (+49/-0)
account_due_list_extended/reports/reports.xml (+338/-0)
account_due_list_extended/reports/scadenzario.mako (+115/-0)
account_due_list_extended/security/ir.model.access.csv (+4/-0)
account_due_list_extended/security/security.xml (+12/-0)
account_invoice_show_maturity/AUTHORS (+2/-0)
account_invoice_show_maturity/__init__.py (+22/-0)
account_invoice_show_maturity/__openerp__.py (+36/-0)
account_invoice_show_maturity/account_invoice.py (+44/-0)
account_invoice_show_maturity/show_maturity.xml (+38/-0)
account_payment_term_enhanced/AUTHORS.txt (+1/-0)
account_payment_term_enhanced/__init__.py (+24/-0)
account_payment_term_enhanced/__openerp__.py (+41/-0)
account_payment_term_enhanced/account.py (+177/-0)
account_payment_term_enhanced/account_view.xml (+63/-0)
account_payment_term_enhanced/i18n/account_payment_term_enhanced.pot (+99/-0)
account_payment_term_enhanced/i18n/it.po (+99/-0)
invoice_line_report_data/__init__.py (+12/-0)
invoice_line_report_data/__openerp__.py (+41/-0)
invoice_line_report_data/i18n/it.po (+52/-0)
invoice_line_report_data/invoice.py (+58/-0)
invoice_line_report_data/invoice_view.xml (+39/-0)
invoice_sequence_recovery/AUTHORS (+2/-0)
invoice_sequence_recovery/__init__.py (+22/-0)
invoice_sequence_recovery/__openerp__.py (+39/-0)
invoice_sequence_recovery/invoice.py (+46/-0)
invoice_sequence_recovery/invoice_view.xml (+10/-0)
last_purchase_price_product/__init__.py (+25/-0)
last_purchase_price_product/__openerp__.py (+42/-0)
last_purchase_price_product/i18n/last_purchase_price_product.pot (+26/-0)
last_purchase_price_product/product/__init__.py (+24/-0)
last_purchase_price_product/product/product.py (+42/-0)
last_purchase_price_product/product/product_view.xml (+35/-0)
last_purchase_price_product/wizard/__init__.py (+24/-0)
last_purchase_price_product/wizard/wizard_partial_picking.py (+54/-0)
order_line_report_data/__init__.py (+12/-0)
order_line_report_data/__openerp__.py (+41/-0)
order_line_report_data/i18n/it.po (+52/-0)
order_line_report_data/sale.py (+58/-0)
order_line_report_data/sale_view.xml (+39/-0)
partner_sequence/__init__.py (+24/-0)
partner_sequence/__openerp__.py (+41/-0)
partner_sequence/i18n/it.po (+33/-0)
partner_sequence/i18n/partner_sequence.pot (+33/-0)
partner_sequence/partner_sequence.py (+70/-0)
partner_sequence/partner_sequence.xml (+15/-0)
partner_show_existed_name/.bzr.retired.0/README (+3/-0)
partner_show_existed_name/.bzr.retired.0/branch-format (+1/-0)
partner_show_existed_name/.bzr.retired.0/branch/branch.conf (+1/-0)
partner_show_existed_name/.bzr.retired.0/branch/format (+1/-0)
partner_show_existed_name/.bzr.retired.0/branch/last-revision (+1/-0)
partner_show_existed_name/.bzr.retired.0/checkout/conflicts (+1/-0)
partner_show_existed_name/.bzr.retired.0/checkout/format (+1/-0)
partner_show_existed_name/.bzr.retired.0/repository/format (+1/-0)
partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.six (+5/-0)
partner_show_existed_name/__init__.py (+24/-0)
partner_show_existed_name/__openerp__.py (+42/-0)
partner_show_existed_name/partner/__init__.py (+24/-0)
partner_show_existed_name/partner/partner.py (+41/-0)
partner_show_existed_name/partner/partner_view.xml (+17/-0)
sequence_recovery/__init__.py (+26/-0)
sequence_recovery/__openerp__.py (+45/-0)
sequence_recovery/base/__init__.py (+24/-0)
sequence_recovery/base/sequence.py (+105/-0)
sequence_recovery/base/sequence_view.xml (+45/-0)
sequence_recovery/security/ir.model.access.csv (+4/-0)
sequence_recovery/security/sequence_recovery_security.xml (+10/-0)
To merge this branch: bzr merge lp:andreacometa-addons/7.0
Reviewer Review Type Date Requested Status
Andrea Cometa Needs Information
Review via email: mp+185638@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrea Cometa (scigghia) wrote :

Hi,
why you need this?

review: Needs Information
lp:andreacometa-addons/7.0 updated
14. By Francesco Apruzzese

[FIX] Currency value exchange for last purchase price

15. By Francesco Apruzzese

[FIX] Currency value exchange for last purchase price

16. By Andrea Cometa

[add] account_due_list alfa

17. By Francesco Apruzzese

[ADD] Module to sow maturities in invoice based on payment term

18. By Francesco Apruzzese

[ADD] Module to sow maturities in invoice based on payment term

19. By Francesco Apruzzese

[FIX] Maturity in supplier view too

20. By Francesco Apruzzese

[ADD] Module to recovery invoice sequences

21. By Francesco Apruzzese

[IMP] Added menu to show sequence recovery menu in account configuration

22. By Andrea Cometa

[imp] account_payment_term_enhanced it.po

23. By Andrea Cometa

[imp] account_payment_term_enhanced pot

24. By Andrea Cometa

[del] rimosso stock_cancel ora disponibile su stock-logistic-flows

25. By Andrea Cometa

[imp] data fattura + numero fattura fornitore

26. By Andrea Cometa

[fix] data fattura

27. By Andrea Cometa

[fix] css row width

28. By Andrea Cometa

[fix] css row width

29. By Andrea Cometa

[fix] css row width

30. By Andrea Cometa

[fix] css row width

31. By Andrea Cometa

[fix] css row width

32. By Andrea Cometa

[fix] row width

Unmerged revisions

42. By Andrea Cometa

[ADD] account_expense

41. By Andrea Cometa

[account_due_list_extended] fix account_view.xml

40. By Andrea Cometa

[account_due_list_extended] fix account_view.xml

39. By Andrea Cometa

[account_due_list_extended] action window modificata + odt stampa aeroo

38. By Andrea Cometa

[add] added maturity list report, not orderd

37. By Andrea Cometa

[fix] rimosso ordinamento per data scadenza

36. By Andrea Cometa

[fix] rimosso ordinamento per data scadenza

35. By Andrea Cometa

[add] account_due_list_extended_aeroo stampa scadenzario per aeroo

34. By Francesco Apruzzese

[IMP] Report due register

33. By Andrea Cometa

[imp] account_due_list_extended: new filter on journal to hide move lines in due list

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'README.txt'
2--- README.txt 1970-01-01 00:00:00 +0000
3+++ README.txt 2014-03-28 12:10:25 +0000
4@@ -0,0 +1,2 @@
5+AMiGA rulez
6+but Linux is better!!! Developers Developers Developers!
7
8=== added directory 'account_due_list_extended'
9=== added file 'account_due_list_extended/__init__.py'
10--- account_due_list_extended/__init__.py 1970-01-01 00:00:00 +0000
11+++ account_due_list_extended/__init__.py 2014-03-28 12:10:25 +0000
12@@ -0,0 +1,26 @@
13+# -*- encoding: utf-8 -*-
14+##############################################################################
15+#
16+# OpenERP, Open Source Management Solution
17+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
18+# www.andreacometa.it
19+# openerp@andreacometa.it
20+#
21+# This program is free software: you can redistribute it and/or modify
22+# it under the terms of the GNU Affero General Public License as published
23+# by the Free Software Foundation, either version 3 of the License, or
24+# (at your option) any later version.
25+#
26+# This program is distributed in the hope that it will be useful,
27+# but WITHOUT ANY WARRANTY; without even the implied warranty of
28+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29+# GNU Affero General Public License for more details.
30+#
31+# You should have received a copy of the GNU Affero General Public License
32+# along with this program. If not, see <http://www.gnu.org/licenses/>.
33+#
34+##############################################################################
35+
36+import account
37+import reports
38+
39
40=== added file 'account_due_list_extended/__openerp__.py'
41--- account_due_list_extended/__openerp__.py 1970-01-01 00:00:00 +0000
42+++ account_due_list_extended/__openerp__.py 2014-03-28 12:10:25 +0000
43@@ -0,0 +1,46 @@
44+# -*- encoding: utf-8 -*-
45+##############################################################################
46+#
47+# OpenERP, Open Source Management Solution
48+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
49+# www.andreacometa.it
50+# openerp@andreacometa.it
51+#
52+# This program is free software: you can redistribute it and/or modify
53+# it under the terms of the GNU Affero General Public License as published
54+# by the Free Software Foundation, either version 3 of the License, or
55+# (at your option) any later version.
56+#
57+# This program is distributed in the hope that it will be useful,
58+# but WITHOUT ANY WARRANTY; without even the implied warranty of
59+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60+# GNU Affero General Public License for more details.
61+#
62+# You should have received a copy of the GNU Affero General Public License
63+# along with this program. If not, see <http://www.gnu.org/licenses/>.
64+#
65+##############################################################################
66+
67+{
68+ 'name': "Payments Due list Extended",
69+ 'version': '0.1',
70+ 'category': 'Generic Modules/Payment',
71+ 'description': """ENG: Original AgileBG addons extended with webkit report
72+ITA: Stampa webkit delle scadenze cliente/fornitore""",
73+ 'author': 'www.andreacometa.it',
74+ 'website': 'http://www.andreacometa.it',
75+ 'license': 'AGPL-3',
76+ "depends" : ['account_due_list', 'report_webkit'],
77+ "init_xml" : [],
78+ "update_xml" : [
79+ 'account/account_view.xml',
80+ 'reports/reports.xml',
81+ 'payment_type_data.xml',
82+ 'security/security.xml',
83+ 'security/ir.model.access.csv',
84+ ],
85+ "demo_xml" : [],
86+ "active": False,
87+ "installable": True,
88+ "images": ['images/image.png'],
89+}
90
91=== added directory 'account_due_list_extended/account'
92=== added file 'account_due_list_extended/account/__init__.py'
93--- account_due_list_extended/account/__init__.py 1970-01-01 00:00:00 +0000
94+++ account_due_list_extended/account/__init__.py 2014-03-28 12:10:25 +0000
95@@ -0,0 +1,24 @@
96+# -*- encoding: utf-8 -*-
97+##############################################################################
98+#
99+# OpenERP, Open Source Management Solution
100+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
101+# www.andreacometa.it
102+# openerp@andreacometa.it
103+#
104+# This program is free software: you can redistribute it and/or modify
105+# it under the terms of the GNU Affero General Public License as published
106+# by the Free Software Foundation, either version 3 of the License, or
107+# (at your option) any later version.
108+#
109+# This program is distributed in the hope that it will be useful,
110+# but WITHOUT ANY WARRANTY; without even the implied warranty of
111+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
112+# GNU Affero General Public License for more details.
113+#
114+# You should have received a copy of the GNU Affero General Public License
115+# along with this program. If not, see <http://www.gnu.org/licenses/>.
116+#
117+##############################################################################
118+
119+import account
120
121=== added file 'account_due_list_extended/account/account.py'
122--- account_due_list_extended/account/account.py 1970-01-01 00:00:00 +0000
123+++ account_due_list_extended/account/account.py 2014-03-28 12:10:25 +0000
124@@ -0,0 +1,94 @@
125+# -*- encoding: utf-8 -*-
126+##############################################################################
127+#
128+# OpenERP, Open Source Management Solution
129+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
130+# www.andreacometa.it
131+# openerp@andreacometa.it
132+#
133+# This program is free software: you can redistribute it and/or modify
134+# it under the terms of the GNU Affero General Public License as published
135+# by the Free Software Foundation, either version 3 of the License, or
136+# (at your option) any later version.
137+#
138+# This program is distributed in the hope that it will be useful,
139+# but WITHOUT ANY WARRANTY; without even the implied warranty of
140+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
141+# GNU Affero General Public License for more details.
142+#
143+# You should have received a copy of the GNU Affero General Public License
144+# along with this program. If not, see <http://www.gnu.org/licenses/>.
145+#
146+##############################################################################
147+
148+from osv import fields, osv
149+
150+
151+class account_payment_term_type(osv.osv):
152+ _name = 'account.payment.term.type'
153+ _description = 'Payment term type list'
154+
155+ _columns = {
156+ 'name': fields.char('Codice', size=16),
157+ 'description': fields.char('Descrizione', size=64),
158+ }
159+account_payment_term_type()
160+
161+
162+class account_payment_term(osv.osv):
163+ _name = 'account.payment.term'
164+ _inherit = 'account.payment.term'
165+
166+ _columns = {
167+ 'payment_term_type': fields.many2one('account.payment.term.type',
168+ 'Tipo di pagamento'),
169+ }
170+
171+account_payment_term()
172+
173+
174+class account_move_line(osv.osv):
175+
176+ _name = 'account.move.line'
177+ _inherit = 'account.move.line'
178+
179+ def _importo(self, cr, uid, ids, name, arg, context=None):
180+ res = {}
181+ for line in self.browse(cr, uid, ids, context=context):
182+ if line.reconcile_partial_id:
183+ total_line = 0.0
184+ for line_reconcile in line.reconcile_partial_id.line_partial_ids:
185+ total_line += line_reconcile.debit - line_reconcile.credit
186+ res[line.id] = total_line
187+ else:
188+ res[line.id] = line.debit - line.credit
189+ return res
190+
191+ def _payment_type(self, cr, uid, ids, name, arg, context=None):
192+ res = {}
193+ for line in self.browse(cr, uid, ids, context=context):
194+ res[line.id] = (line.payment_term_id and
195+ line.payment_term_id.payment_term_type and
196+ line.payment_term_id.payment_term_type.id or False)
197+ return res
198+
199+ def _payment_term_search(self, cr, uid, obj, name, args, context):
200+ if args:
201+ payment_obj = self.pool.get('account.payment.term')
202+ payment_ids = payment_obj.search(cr, uid, args)
203+ if payment_ids:
204+ move_ids = self.search(cr, uid, [
205+ ('payment_term_id', 'in', payment_ids)])
206+ return [('id', 'in', move_ids)]
207+ return False
208+
209+ _columns = {
210+ 'payment_term_type': fields.function(
211+ _payment_type, method=True, string='Tipo di pagamento',
212+ type='many2one', relation='account.payment.term.type', store=False,
213+ fnct_search=_payment_term_search),
214+ 'importo': fields.function(_importo, method=True, string='Importo',
215+ type='float', store=False),
216+ }
217+
218+account_move_line()
219
220=== added file 'account_due_list_extended/account/account_view.xml'
221--- account_due_list_extended/account/account_view.xml 1970-01-01 00:00:00 +0000
222+++ account_due_list_extended/account/account_view.xml 2014-03-28 12:10:25 +0000
223@@ -0,0 +1,104 @@
224+<?xml version="1.0" encoding="utf-8"?>
225+
226+<openerp>
227+ <data>
228+
229+ <!-- ====================================================== -->
230+ <!-- ACCOUNT.PAYMENT.TERM FORM -->
231+ <!-- ====================================================== -->
232+ <record id="view_payment_term_form_type_extended" model="ir.ui.view">
233+ <field name="name">account.payment.term.form.type_extended</field>
234+ <field name="model">account.payment.term</field>
235+ <field name="inherit_id" ref="account.view_payment_term_form"/>
236+ <field name="arch" type="xml">
237+ <field name="name" position="after" >
238+ <field name="payment_term_type" />
239+ </field>
240+ </field>
241+ </record>
242+
243+ <!-- ====================================================== -->
244+ <!-- ACCOUNT.MOVE.LINE FILTER -->
245+ <!-- ====================================================== -->
246+ <record id="view_payments_filter_type_extended" model="ir.ui.view">
247+ <field name="name">Payments Select Exdended</field>
248+ <field name="model">account.move.line</field>
249+ <field name="inherit_id" ref="account_due_list.view_payments_filter"/>
250+ <field name="arch" type="xml">
251+ <field name="date_maturity" position="after">
252+ <field name="payment_term_type" />
253+ </field>
254+ <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False)]" help="Unreconciled payments" position="replace">
255+ <filter name="unreconciled_filter" icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False)]" help="Unreconciled payments"/>
256+ <filter name="reconciled_filter" icon="terp-dolar" string="Reconciled" domain="[('reconcile_id','!=',False)]" help="Reconciled payments"/>
257+ </filter>
258+ </field>
259+ </record>
260+
261+ <!-- ====================================================== -->
262+ <!-- ACCOUNT.MOVE.LINE TREE -->
263+ <!-- ====================================================== -->
264+ <record id="view_payments_tree_type_extended" model="ir.ui.view">
265+ <field name="name">Account move line</field>
266+ <field name="model">account.move.line</field>
267+ <field name="inherit_id" ref="account_due_list.view_payments_tree"/>
268+ <field name="arch" type="xml">
269+ <field name="payment_term_id" position="after">
270+ <field name="payment_term_type"/>
271+ </field>
272+ <field name="reconcile_partial_id" position="after">
273+ <field name="importo"/>
274+ </field>
275+ </field>
276+ </record>
277+
278+ <!-- ====================================================== -->
279+ <!-- ACCOUNT.MOVE.LINE ACTION -->
280+ <!-- ====================================================== -->
281+ <record model="ir.actions.act_window" id="account_due_list.action_invoice_payments">
282+ <field name="name">Payments</field>
283+ <field name="res_model">account.move.line</field>
284+ <field name="view_type">form</field>
285+ <field name="view_mode">tree,form</field>
286+ <field name="view_id" ref="account_due_list.view_payments_tree"/>
287+ <field name="search_view_id" ref="account_due_list.view_payments_filter"/>
288+ <field name="domain">['|','&amp;',('account_id.type','=','payable'),('debit','=',0),'&amp;',('account_id.type','=','receivable'),('credit','=',0)]</field>
289+ <field name="context">{'search_default_unreconciled_filter':1}</field>
290+ </record>
291+
292+ <menuitem name="Due Register" parent="account.menu_finance_entries" action="account_due_list.action_invoice_payments" id="account_due_list.menu_action_invoice_payments" sequence="5"/>
293+
294+
295+ <!-- ====================================================== -->
296+ <!-- PAYMENT TERM TYPE TREE -->
297+ <!-- ====================================================== -->
298+ <record id="view_payments_type_tree" model="ir.ui.view">
299+ <field name="name">account.payment.term.type.tree</field>
300+ <field name="model">account.payment.term.type</field>
301+ <field name="type">tree</field>
302+ <field name="arch" type="xml">
303+ <tree string="Payment">
304+ <field name="name" select="1" />
305+ <field name="description" select="1" />
306+ </tree>
307+ </field>
308+ </record>
309+
310+ <!-- ====================================================== -->
311+ <!-- PAYMENT TERM TYPE ACTION -->
312+ <!-- ====================================================== -->
313+ <record model="ir.actions.act_window" id="action_view_payments_type">
314+ <field name="name">Tipi di pagamento</field>
315+ <field name="res_model">account.payment.term.type</field>
316+ <field name="view_type">form</field>
317+ <field name="view_mode">tree,form</field>
318+ <field name="view_id" ref="view_payments_type_tree"/>
319+ </record>
320+
321+ <!-- ====================================================== -->
322+ <!-- PAYMENT TERM TYPE ACTION -->
323+ <!-- ====================================================== -->
324+ <menuitem name="Tipi di pagamento" parent="account.menu_configuration_misc" id="menu_payments_type" action="action_view_payments_type"/>
325+
326+ </data>
327+</openerp>
328
329=== added directory 'account_due_list_extended/i18n'
330=== added file 'account_due_list_extended/i18n/account_due_list_extended.pot'
331--- account_due_list_extended/i18n/account_due_list_extended.pot 1970-01-01 00:00:00 +0000
332+++ account_due_list_extended/i18n/account_due_list_extended.pot 2014-03-28 12:10:25 +0000
333@@ -0,0 +1,119 @@
334+# Translation of OpenERP Server.
335+# This file contains the translation of the following modules:
336+# * account_due_list_extended
337+#
338+msgid ""
339+msgstr ""
340+"Project-Id-Version: OpenERP Server 6.1\n"
341+"Report-Msgid-Bugs-To: \n"
342+"POT-Creation-Date: 2012-12-11 17:04+0000\n"
343+"PO-Revision-Date: 2012-12-11 17:04+0000\n"
344+"Last-Translator: <>\n"
345+"Language-Team: \n"
346+"MIME-Version: 1.0\n"
347+"Content-Type: text/plain; charset=UTF-8\n"
348+"Content-Transfer-Encoding: \n"
349+"Plural-Forms: \n"
350+
351+#. module: account_due_list_extended
352+#: constraint:account.move.line:0
353+msgid "The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal."
354+msgstr ""
355+
356+#. module: account_due_list_extended
357+#: constraint:account.move.line:0
358+msgid "You can not create journal items on closed account."
359+msgstr ""
360+
361+#. module: account_due_list_extended
362+#: field:account.move.line,payment_term_type:0
363+#: field:account.payment.term,payment_term_type:0
364+msgid "Tipo di pagamento"
365+msgstr ""
366+
367+#. module: account_due_list_extended
368+#: field:account.payment.term.type,name:0
369+msgid "Codice"
370+msgstr ""
371+
372+#. module: account_due_list_extended
373+#: model:ir.model,name:account_due_list_extended.model_account_payment_term_type
374+msgid "Payment term type list"
375+msgstr ""
376+
377+#. module: account_due_list_extended
378+#: constraint:account.move.line:0
379+msgid "Company must be the same for its related account and period."
380+msgstr ""
381+
382+#. module: account_due_list_extended
383+#: model:ir.actions.act_window,name:account_due_list_extended.action_view_payments_type
384+#: model:ir.ui.menu,name:account_due_list_extended.menu_payments_type
385+msgid "Tipi di pagamento"
386+msgstr ""
387+
388+#. module: account_due_list_extended
389+#: view:account.move.line:0
390+msgid "Reconciled"
391+msgstr ""
392+
393+#. module: account_due_list_extended
394+#: view:account.move.line:0
395+msgid "Unreconciled payments"
396+msgstr ""
397+
398+#. module: account_due_list_extended
399+#: model:ir.model,name:account_due_list_extended.model_account_payment_term
400+msgid "Payment Term"
401+msgstr ""
402+
403+#. module: account_due_list_extended
404+#: view:account.move.line:0
405+msgid "Unreconciled"
406+msgstr ""
407+
408+#. module: account_due_list_extended
409+#: field:account.payment.term.type,description:0
410+msgid "Descrizione"
411+msgstr ""
412+
413+#. module: account_due_list_extended
414+#: constraint:account.move.line:0
415+msgid "The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal."
416+msgstr ""
417+
418+#. module: account_due_list_extended
419+#: sql_constraint:account.move.line:0
420+msgid "Wrong credit or debit value in accounting entry !"
421+msgstr ""
422+
423+#. module: account_due_list_extended
424+#: field:account.move.line,importo:0
425+msgid "Importo"
426+msgstr ""
427+
428+#. module: account_due_list_extended
429+#: model:ir.actions.report.xml,name:account_due_list_extended.report_stampa_scadenzario
430+msgid "Stampa Scadenzario"
431+msgstr ""
432+
433+#. module: account_due_list_extended
434+#: model:ir.model,name:account_due_list_extended.model_account_move_line
435+msgid "Journal Items"
436+msgstr ""
437+
438+#. module: account_due_list_extended
439+#: constraint:account.move.line:0
440+msgid "You can not create journal items on an account of type view."
441+msgstr ""
442+
443+#. module: account_due_list_extended
444+#: view:account.payment.term.type:0
445+msgid "Payment"
446+msgstr ""
447+
448+#. module: account_due_list_extended
449+#: view:account.move.line:0
450+msgid "Reconciled payments"
451+msgstr ""
452+
453
454=== added file 'account_due_list_extended/i18n/it.po'
455--- account_due_list_extended/i18n/it.po 1970-01-01 00:00:00 +0000
456+++ account_due_list_extended/i18n/it.po 2014-03-28 12:10:25 +0000
457@@ -0,0 +1,119 @@
458+# Translation of OpenERP Server.
459+# This file contains the translation of the following modules:
460+# * account_due_list_extended
461+#
462+msgid ""
463+msgstr ""
464+"Project-Id-Version: OpenERP Server 6.1\n"
465+"Report-Msgid-Bugs-To: \n"
466+"POT-Creation-Date: 2012-12-11 17:04+0000\n"
467+"PO-Revision-Date: 2012-12-11 17:04+0000\n"
468+"Last-Translator: <>\n"
469+"Language-Team: \n"
470+"MIME-Version: 1.0\n"
471+"Content-Type: text/plain; charset=UTF-8\n"
472+"Content-Transfer-Encoding: \n"
473+"Plural-Forms: \n"
474+
475+#. module: account_due_list_extended
476+#: constraint:account.move.line:0
477+msgid "The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal."
478+msgstr "The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account or select a multi-currency view on the journal."
479+
480+#. module: account_due_list_extended
481+#: constraint:account.move.line:0
482+msgid "You can not create journal items on closed account."
483+msgstr "Non è possibile creare sezionali su un conto chiuso."
484+
485+#. module: account_due_list_extended
486+#: field:account.move.line,payment_term_type:0
487+#: field:account.payment.term,payment_term_type:0
488+msgid "Tipo di pagamento"
489+msgstr "Tipo di pagamento"
490+
491+#. module: account_due_list_extended
492+#: field:account.payment.term.type,name:0
493+msgid "Codice"
494+msgstr "Codice"
495+
496+#. module: account_due_list_extended
497+#: model:ir.model,name:account_due_list_extended.model_account_payment_term_type
498+msgid "Payment term type list"
499+msgstr "Lista dei tipi di termini pagamento"
500+
501+#. module: account_due_list_extended
502+#: constraint:account.move.line:0
503+msgid "Company must be the same for its related account and period."
504+msgstr "L'azienda deve essere la stessa per i conti collegati ed il periodo"
505+
506+#. module: account_due_list_extended
507+#: model:ir.actions.act_window,name:account_due_list_extended.action_view_payments_type
508+#: model:ir.ui.menu,name:account_due_list_extended.menu_payments_type
509+msgid "Tipi di pagamento"
510+msgstr "Tipi di pagamento"
511+
512+#. module: account_due_list_extended
513+#: view:account.move.line:0
514+msgid "Reconciled"
515+msgstr "Riconciliati"
516+
517+#. module: account_due_list_extended
518+#: view:account.move.line:0
519+msgid "Unreconciled payments"
520+msgstr "Pagamenti non riconciliati"
521+
522+#. module: account_due_list_extended
523+#: model:ir.model,name:account_due_list_extended.model_account_payment_term
524+msgid "Payment Term"
525+msgstr "Termini di pagamento"
526+
527+#. module: account_due_list_extended
528+#: view:account.move.line:0
529+msgid "Unreconciled"
530+msgstr "Non riconciliate"
531+
532+#. module: account_due_list_extended
533+#: field:account.payment.term.type,description:0
534+msgid "Descrizione"
535+msgstr "Descrizione"
536+
537+#. module: account_due_list_extended
538+#: constraint:account.move.line:0
539+msgid "The date of your Journal Entry is not in the defined period! You should change the date or remove this constraint from the journal."
540+msgstr "La data della voce di giornale non è nel periodo definito! Dovresti cambiare la data o rimuovere questo vincolo dal giornale."
541+
542+#. module: account_due_list_extended
543+#: sql_constraint:account.move.line:0
544+msgid "Wrong credit or debit value in accounting entry !"
545+msgstr "Valore di credito o debito errato nella registrazione contabile !"
546+
547+#. module: account_due_list_extended
548+#: field:account.move.line,importo:0
549+msgid "Importo"
550+msgstr "Importo"
551+
552+#. module: account_due_list_extended
553+#: model:ir.actions.report.xml,name:account_due_list_extended.report_stampa_scadenzario
554+msgid "Stampa Scadenzario"
555+msgstr "Stampa Scadenzario"
556+
557+#. module: account_due_list_extended
558+#: model:ir.model,name:account_due_list_extended.model_account_move_line
559+msgid "Journal Items"
560+msgstr "Voci sezionale"
561+
562+#. module: account_due_list_extended
563+#: constraint:account.move.line:0
564+msgid "You can not create journal items on an account of type view."
565+msgstr "Non è possibile effettuare registrazioni su un conto di tipo vista."
566+
567+#. module: account_due_list_extended
568+#: view:account.payment.term.type:0
569+msgid "Payment"
570+msgstr "Pagamento"
571+
572+#. module: account_due_list_extended
573+#: view:account.move.line:0
574+msgid "Reconciled payments"
575+msgstr "Pagamenti riconciliati"
576+
577
578=== added directory 'account_due_list_extended/images'
579=== added file 'account_due_list_extended/images/image.png'
580Binary files account_due_list_extended/images/image.png 1970-01-01 00:00:00 +0000 and account_due_list_extended/images/image.png 2014-03-28 12:10:25 +0000 differ
581=== added file 'account_due_list_extended/payment_type_data.xml'
582--- account_due_list_extended/payment_type_data.xml 1970-01-01 00:00:00 +0000
583+++ account_due_list_extended/payment_type_data.xml 2014-03-28 12:10:25 +0000
584@@ -0,0 +1,22 @@
585+<?xml version="1.0" encoding="utf-8"?>
586+<openerp>
587+ <data noupdate="True">
588+
589+ <record id="payment_type_rd" model="account.payment.term.type">
590+ <!--ield name="domain">partner</field-->
591+ <field name="name">RD</field>
592+ <field name="description">Rimessa Diretta</field>
593+ </record>
594+ <record id="payment_type_rb" model="account.payment.term.type">
595+ <!--ield name="domain">partner</field-->
596+ <field name="name">RB</field>
597+ <field name="description">Ricevuta Bancaria</field>
598+ </record>
599+ <record id="payment_type_bb" model="account.payment.term.type">
600+ <!--ield name="domain">partner</field-->
601+ <field name="name">BB</field>
602+ <field name="description">Bonifico Bancario</field>
603+ </record>
604+
605+ </data>
606+</openerp>
607
608=== added directory 'account_due_list_extended/reports'
609=== added file 'account_due_list_extended/reports/__init__.py'
610--- account_due_list_extended/reports/__init__.py 1970-01-01 00:00:00 +0000
611+++ account_due_list_extended/reports/__init__.py 2014-03-28 12:10:25 +0000
612@@ -0,0 +1,24 @@
613+# -*- encoding: utf-8 -*-
614+##############################################################################
615+#
616+# OpenERP, Open Source Management Solution
617+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
618+# www.andreacometa.it
619+# openerp@andreacometa.it
620+#
621+# This program is free software: you can redistribute it and/or modify
622+# it under the terms of the GNU Affero General Public License as published
623+# by the Free Software Foundation, either version 3 of the License, or
624+# (at your option) any later version.
625+#
626+# This program is distributed in the hope that it will be useful,
627+# but WITHOUT ANY WARRANTY; without even the implied warranty of
628+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
629+# GNU Affero General Public License for more details.
630+#
631+# You should have received a copy of the GNU Affero General Public License
632+# along with this program. If not, see <http://www.gnu.org/licenses/>.
633+#
634+##############################################################################
635+
636+import parser
637
638=== added file 'account_due_list_extended/reports/parser.py'
639--- account_due_list_extended/reports/parser.py 1970-01-01 00:00:00 +0000
640+++ account_due_list_extended/reports/parser.py 2014-03-28 12:10:25 +0000
641@@ -0,0 +1,49 @@
642+# -*- encoding: utf-8 -*-
643+##############################################################################
644+#
645+# OpenERP, Open Source Management Solution
646+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
647+# www.andreacometa.it
648+# openerp@andreacometa.it
649+#
650+# This program is free software: you can redistribute it and/or modify
651+# it under the terms of the GNU Affero General Public License as published
652+# by the Free Software Foundation, either version 3 of the License, or
653+# (at your option) any later version.
654+#
655+# This program is distributed in the hope that it will be useful,
656+# but WITHOUT ANY WARRANTY; without even the implied warranty of
657+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
658+# GNU Affero General Public License for more details.
659+#
660+# You should have received a copy of the GNU Affero General Public License
661+# along with this program. If not, see <http://www.gnu.org/licenses/>.
662+#
663+##############################################################################
664+
665+import time
666+from report import report_sxw
667+import inspect
668+import os
669+from datetime import datetime
670+from osv import osv
671+from osv import fields
672+
673+
674+class account_due_list_webkit(report_sxw.rml_parse):
675+ def __init__(self, cr, uid, name, context):
676+ super(account_due_list_webkit, self).__init__(cr, uid, name,
677+ context=context)
678+ file_path = os.path.dirname(inspect.getfile(inspect.currentframe()))
679+ self.localcontext.update({
680+ 'datetime': datetime,
681+ 'time': time,
682+ 'cr': cr,
683+ 'uid': uid,
684+ 'file_path': file_path,
685+ })
686+
687+report_sxw.report_sxw('report.account_due_list.scadenzario',
688+ 'account.move.line',
689+ 'account_due_list_extended/reports/scadenzario.mako',
690+ parser=account_due_list_webkit)
691
692=== added file 'account_due_list_extended/reports/reports.xml'
693--- account_due_list_extended/reports/reports.xml 1970-01-01 00:00:00 +0000
694+++ account_due_list_extended/reports/reports.xml 2014-03-28 12:10:25 +0000
695@@ -0,0 +1,338 @@
696+<?xml version="1.0" encoding="utf-8"?>
697+<openerp>
698+ <data>
699+
700+ <record id="account_due_list_portrait_header" model="ir.header_webkit">
701+ <field name="footer_html"></field>
702+ <field name="orientation">Portrait</field>
703+ <field name="format">A4</field>
704+ <field name="html">
705+ <![CDATA[
706+ <html>
707+ <head>
708+ <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
709+ <script>
710+ function subst() {
711+ var vars={};
712+ var x=document.location.search.substring(1).split('&');
713+ for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
714+ var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
715+ for(var i in x) {
716+ var y = document.getElementsByClassName(x[i]);
717+ for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
718+ }
719+ }
720+ </script>
721+ <style type="text/css">
722+ ${css}
723+ </style>
724+ </head>
725+ <body style="border-bottom:0px solid lightGray; margin:0;" onload="subst()">
726+ ${_debug or ''|n} </body>
727+ </html>]]>
728+ </field>
729+ <field eval="0" name="margin_top"/>
730+ <field eval="0" name="margin_bottom"/>
731+ <field name="css" ><![CDATA[
732+
733+ body {
734+ font-family:helvetica;
735+ font-size:12;
736+ }
737+
738+ .logo {
739+ width:100%;
740+ text-align:right;
741+ }
742+
743+ .logo_centered {
744+ width:100%;
745+ text-align:center;
746+ }
747+
748+ hr {
749+ width: 100%;
750+ align: center;
751+ border: 0px;
752+ color: #000;
753+ background-color: #000;
754+ height: 1px;
755+ }
756+
757+ .simple_info {
758+ width: 50%;
759+ align: left;
760+ float: left;
761+ margin: 2px 0px;
762+ }
763+
764+ .text_info {
765+ width:80%;
766+ margin:0px auto;
767+ text-align:left;
768+ }
769+
770+ .centered {
771+ width:100%;
772+ text-align:center;
773+ }
774+
775+ .basic_table{
776+ width:100%;
777+ text-align:center;
778+ border:1px solid #000;
779+ border-collapse: collapse;
780+ margin:10px 0px;
781+ }
782+
783+ .contract_table {
784+ width:100%;
785+ text-align:left;
786+ border:1px solid #000;
787+ border-collapse: collapse;
788+ margin:10px 0px;
789+ font-size:10;
790+ }
791+
792+ .contract_table td {
793+ border:1px solid #000;
794+ padding:2px;
795+ vertical-align:center;
796+ }
797+
798+ .basic_table td {
799+ border:1px solid #000;
800+ padding:2px;
801+ vertical-align:center;
802+ }
803+
804+ .particulars_main {
805+ width:100%;
806+ margin-bottom:5px;
807+ }
808+
809+ .particulars {
810+ width:50%;
811+ float:left;
812+ }
813+
814+ .details {
815+ width:80%;
816+ text-align:center;
817+ margin:10px 0px;
818+ }
819+
820+ .sx {
821+ float:left;
822+ margin-left:0px;
823+ margin-right:auto;
824+ }
825+
826+ .dx {
827+ float:right;
828+ margin-left:auto;
829+ margin-right:0px;
830+ }
831+
832+ .clear {
833+ clear:both;
834+ }
835+
836+ .space {
837+ margin:20px 0px;
838+ }
839+
840+ .elevate {
841+ margin-top:-8px;
842+ }
843+
844+ .page-break {
845+ page-break-after: always;
846+ }
847+
848+ .w5 {
849+ width: 5%;
850+ float: left;
851+ }
852+
853+ .w10 {
854+ width: 10%;
855+ float: left;
856+ }
857+
858+ .w15 {
859+ width: 15%;
860+ float: left;
861+ }
862+
863+ .w20 {
864+ width: 20%;
865+ float: left;
866+ }
867+
868+ .w25 {
869+ width: 25%;
870+ float: left;
871+ }
872+
873+ .w30 {
874+ width: 30%;
875+ float: left;
876+ }
877+
878+ .w33 {
879+ width: 33%;
880+ float: left;
881+ }
882+
883+ .w35 {
884+ width: 35%;
885+ float: left;
886+ }
887+
888+ .w40 {
889+ width: 40%;
890+ float: left;
891+ }
892+
893+ .w45 {
894+ width: 45%;
895+ float: left;
896+ }
897+
898+ .w50 {
899+ width: 50%;
900+ float: left;
901+ }
902+
903+ .w60 {
904+ width: 60%;
905+ float: left;
906+ }
907+
908+ .w75 {
909+ width: 75%;
910+ float: left;
911+ }
912+
913+ .w80 {
914+ width: 80%;
915+ float: left;
916+ }
917+
918+ .w90 {
919+ width: 90%;
920+ float: left;
921+ }
922+
923+ .w95 {
924+ width: 90%;
925+ float: left;
926+ }
927+
928+ .w100 {
929+ width: 100%;
930+ float: left;
931+ }
932+
933+ .indented {
934+ margin-left: 10px;
935+ }
936+
937+ .font_6 {
938+ font-size: 6px;
939+ }
940+
941+ .font_7 {
942+ font-size: 6px;
943+ }
944+
945+ .font_8 {
946+ font-size: 8px;
947+ }
948+
949+ .font_9 {
950+ font-size: 9px;
951+ }
952+
953+ .font_10 {
954+ font-size: 10px;
955+ }
956+
957+ .font_12 {
958+ font-size: 12px;
959+ }
960+
961+ .font_big {
962+ font-size: 14px;
963+ font-weight: bold;
964+ }
965+
966+ .noborder_table{
967+ width:100%;
968+ text-align:center;
969+ border:0;
970+ border-collapse: collapse;
971+ margin:10px 0px;
972+ }
973+
974+ .noborder_table td {
975+ border:0;
976+ padding:2px;
977+ vertical-align:center;
978+ }
979+
980+ .noborder_table table {
981+ border:1px solid #000;
982+ }
983+
984+ .rotate_90 {
985+ -webkit-transform: rotate(-90deg);
986+ }
987+
988+ .bordi_arrotondati {
989+ border:1px solid;
990+ border-radius: 5px;
991+ -webkit-border-radius: 5px;
992+ }
993+
994+ .distance {
995+ padding:10px 0px;
996+ }
997+
998+ .separated_bottom {
999+ margin-bottom: 5px;
1000+ }
1001+
1002+ .grey_border {
1003+ border-color:#B5B5B5;
1004+ }
1005+
1006+ .info_table td {
1007+ border:1px solid;
1008+ border-radius: 5px;
1009+ -webkit-border-radius: 5px;
1010+ border-color:#B5B5B5;
1011+ }
1012+
1013+ .info_table p.data {
1014+ font-weight:bold;
1015+ }
1016+
1017+ ]]>
1018+ </field>
1019+ <field name="name">Reports Header</field>
1020+ </record>
1021+
1022+ <report auto="False"
1023+ id="report_stampa_scadenzario"
1024+ model="account.move.line"
1025+ name="account_due_list.stampa_scadenzario"
1026+ file="account_due_list_extended/reports/scadenzario.mako"
1027+ string="Stampa Scadenzario"
1028+ report_type="webkit"
1029+ webkit_header="account_due_list_portrait_header"
1030+ />
1031+
1032+ </data>
1033+</openerp>
1034
1035=== added file 'account_due_list_extended/reports/scadenzario.mako'
1036--- account_due_list_extended/reports/scadenzario.mako 1970-01-01 00:00:00 +0000
1037+++ account_due_list_extended/reports/scadenzario.mako 2014-03-28 12:10:25 +0000
1038@@ -0,0 +1,115 @@
1039+<html>
1040+<head>
1041+ <style type="text/css">
1042+ ${css}
1043+ </style>
1044+</head>
1045+<body class="font_10" style="margin:0px;padding:0px;">
1046+
1047+<br/>
1048+<center><H1>SCADENZARIO</H1></center>
1049+
1050+ <table class="font_9 w100 bordi_arrotondati">
1051+ <tr>
1052+ <td class="w10">Sezionale</td>
1053+ <td class="w25"><p style="text-align:left;">Partner</p></td>
1054+ <td class="w5"><p style="text-align:left;">Data Fattura</p></td>
1055+ <td class="w10"><p style="text-align:left;">Fattura</p></td>
1056+ <td class="w5"><p style="text-align:left;">Data Scadenza</p></td>
1057+ <td class="w15"><p style="text-align:left;">Pagamento</p></td>
1058+ <td class="w10"><p class="centered">Dare</p></td>
1059+ <td class="w10"><p class="centered">Avere</p></td>
1060+ <td class="w10"><p class="centered">Residuo</p></td>
1061+ </tr>
1062+ </table>
1063+
1064+
1065+
1066+ <div class="clear"></div>
1067+
1068+ <table id="content" class="font_9 w100">
1069+ <% tot_importo = 0 %>
1070+ <% tot_dare = 0 %>
1071+ <% tot_avere = 0 %>
1072+ <% data_scadenza = '0000-00-00' %>
1073+ %for line in objects:
1074+ %if line:
1075+ %if data_scadenza != (line.date_maturity or line.date):
1076+ %if data_scadenza != '0000-00-00':
1077+ <tr><td colspan=9><hr style="width:100%"></td></tr>
1078+ <tr>
1079+ <td class="w10">&nbsp;</td>
1080+ <td class="w25">&nbsp;</td>
1081+ <td class="w5">&nbsp;</td>
1082+ <td class="w10">&nbsp;</td>
1083+ <td class="w5">&nbsp;</td>
1084+ <td class="w15"><b>TOTALE SCADENZA</b></td>
1085+ <td class="w10"><p style="text-align:right;"><b>${parziale_dare}</b></p></td>
1086+ <td class="w10"><p style="text-align:right;"><b>${parziale_avere}</b></p></td>
1087+ <td class="w10"><p style="text-align:right;"><b>${parziale_importo}</b></p></td>
1088+ </tr>
1089+ <tr><td colspan=9>&nbsp;</td></tr>
1090+ %endif
1091+ <% parziale_importo = 0 %>
1092+ <% parziale_dare = 0 %>
1093+ <% parziale_avere = 0 %>
1094+ <% data_scadenza = (line.date_maturity or line.date) %>
1095+ %endif
1096+
1097+ <tr>
1098+ <td class="w10"><p style="text-align:left;">${line.invoice.journal_id and line.invoice.journal_id.code or ''}</p></td>
1099+ <td class="w25"><p style="text-align:left;">${line.partner_id.name or ''}</p></td>
1100+ <td class="w5"><p style="text-align:left;">${line.invoice.date_invoice or ''}</p></td>
1101+ <td class="w10"><p style="text-align:left;">${line.invoice.supplier_invoice_number or line.invoice.number or line.name or ''}</p></td>
1102+ <td class="w5"><p style="text-align:left;">${line.date_maturity or line.date}</p></td>
1103+ <td class="w15"><p style="text-align:left;">${line.invoice.payment_term and line.invoice.payment_term.name or ''}</p></td>
1104+ <td class="w10"><p style="text-align:right;">${formatLang(line.debit or 0.00, digits=get_digits(dp='Account'))}</p></td>
1105+ <td class="w10"><p style="text-align:right;">${formatLang(line.credit or 0.00, digits=get_digits(dp='Account'))}</p></td>
1106+ <td class="w10"><p style="text-align:right;">${formatLang(line.amount_residual or 0.00, digits=get_digits(dp='Account'))}</p></td>
1107+ </tr>
1108+ %if line.debit == 0.0:
1109+ <%tot_importo -= line.amount_residual %>
1110+ <% parziale_importo -= line.amount_residual %>
1111+ %else:
1112+ <%tot_importo += line.amount_residual %>
1113+ <% parziale_importo += line.amount_residual %>
1114+ %endif
1115+ <% tot_dare += line.debit %>
1116+ <% tot_avere += line.credit %>
1117+ <% parziale_dare += line.debit %>
1118+ <% parziale_avere += line.credit %>
1119+ %endif
1120+ %endfor
1121+ <tr><td colspan=9><hr style="width:100%"></td></tr>
1122+ <tr>
1123+ <td class="w10">&nbsp;</td>
1124+ <td class="w25">&nbsp;</td>
1125+ <td class="w5">&nbsp;</td>
1126+ <td class="w10">&nbsp;</td>
1127+ <td class="w5">&nbsp;</td>
1128+ <td class="w15"><b>TOTALE SCADENZA</b></td>
1129+ <td class="w10"><p style="text-align:right;"><b>${parziale_dare}</b></p></td>
1130+ <td class="w10"><p style="text-align:right;"><b>${parziale_avere}</b></p></td>
1131+ <td class="w10"><p style="text-align:right;"><b>${parziale_importo}</b></p></td>
1132+ </tr>
1133+ <tr><td colspan=9>&nbsp;</td></tr>
1134+
1135+ <tr><td colspan=9><hr style="width:100%"></td></tr>
1136+ <tr style="height:100%">
1137+ <td class="w10">&nbsp;</td>
1138+ <td class="w25">&nbsp;</td>
1139+ <td class="w5">&nbsp;</td>
1140+ <td class="w10">&nbsp;</td>
1141+ <td class="w5">&nbsp;</td>
1142+ <td class="w15"><b>TOTALE COMPLESSIVO</b></td>
1143+ <td class="w10"><p style="text-align:right; font-weight: bold;">${tot_dare}</p></td>
1144+ <td class="w10"><p style="text-align:right; font-weight: bold;">${tot_avere}</p></td>
1145+ <td class="w10"><p style="text-align:right; font-weight: bold;">${tot_importo}</p></td>
1146+ </tr>
1147+ </table>
1148+
1149+ <div class="clear">&nbsp;</div>
1150+
1151+
1152+</body>
1153+</html>
1154
1155=== added directory 'account_due_list_extended/security'
1156=== added file 'account_due_list_extended/security/ir.model.access.csv'
1157--- account_due_list_extended/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
1158+++ account_due_list_extended/security/ir.model.access.csv 2014-03-28 12:10:25 +0000
1159@@ -0,0 +1,4 @@
1160+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
1161+
1162+VB_group_account_payment_term_type_user,account_payment_term_type user,model_account_payment_term_type,group_account_payment_term_type_user,1,0,0,0
1163+VB_group_account_payment_term_type_manager,account_payment_term_type user,model_account_payment_term_type,group_account_payment_term_type_manager,1,1,1,1
1164
1165=== added file 'account_due_list_extended/security/security.xml'
1166--- account_due_list_extended/security/security.xml 1970-01-01 00:00:00 +0000
1167+++ account_due_list_extended/security/security.xml 2014-03-28 12:10:25 +0000
1168@@ -0,0 +1,12 @@
1169+<?xml version="1.0" encoding="utf-8"?>
1170+<openerp><data>
1171+
1172+ <record id="group_account_payment_term_type_user" model="res.groups">
1173+ <field name="name">Account/Payment Term Type User</field>
1174+ </record>
1175+
1176+ <record id="group_account_payment_term_type_manager" model="res.groups">
1177+ <field name="name">Account/Payment Term Type Manager</field>
1178+ </record>
1179+
1180+</data></openerp>
1181
1182=== added directory 'account_invoice_show_maturity'
1183=== added file 'account_invoice_show_maturity/AUTHORS'
1184--- account_invoice_show_maturity/AUTHORS 1970-01-01 00:00:00 +0000
1185+++ account_invoice_show_maturity/AUTHORS 2014-03-28 12:10:25 +0000
1186@@ -0,0 +1,2 @@
1187+Alessandro Gioffreda <a.gioffreda@yahoo.it>
1188+Francesco OpenCode Apruzzese <f.apruzzese@andreacometa.it>
1189
1190=== added file 'account_invoice_show_maturity/__init__.py'
1191--- account_invoice_show_maturity/__init__.py 1970-01-01 00:00:00 +0000
1192+++ account_invoice_show_maturity/__init__.py 2014-03-28 12:10:25 +0000
1193@@ -0,0 +1,22 @@
1194+# -*- coding: utf-8 -*-
1195+##############################################################################
1196+#
1197+# Copyright (C) 2014 Andrea Cometa - Perito informatico
1198+# All Rights Reserved
1199+#
1200+# This program is free software: you can redistribute it and/or modify
1201+# it under the terms of the GNU Affero General Public License as published
1202+# by the Free Software Foundation, either version 3 of the License, or
1203+# (at your option) any later version.
1204+#
1205+# This program is distributed in the hope that it will be useful,
1206+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1207+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1208+# GNU Affero General Public License for more details.
1209+#
1210+# You should have received a copy of the GNU Affero General Public License
1211+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1212+#
1213+###############################################################################
1214+
1215+import account_invoice
1216
1217=== added file 'account_invoice_show_maturity/__openerp__.py'
1218--- account_invoice_show_maturity/__openerp__.py 1970-01-01 00:00:00 +0000
1219+++ account_invoice_show_maturity/__openerp__.py 2014-03-28 12:10:25 +0000
1220@@ -0,0 +1,36 @@
1221+# -*- coding: utf-8 -*-
1222+##############################################################################
1223+#
1224+# Copyright (C) 2014 Andrea Cometa - Perito informatico
1225+# All Rights Reserved
1226+#
1227+# This program is free software: you can redistribute it and/or modify
1228+# it under the terms of the GNU Affero General Public License as published
1229+# by the Free Software Foundation, either version 3 of the License, or
1230+# (at your option) any later version.
1231+#
1232+# This program is distributed in the hope that it will be useful,
1233+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1234+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1235+# GNU Affero General Public License for more details.
1236+#
1237+# You should have received a copy of the GNU Affero General Public License
1238+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1239+#
1240+##############################################################################
1241+
1242+{
1243+ 'name': "show_maturity",
1244+ 'version': '1.0',
1245+ 'category': 'Account',
1246+ 'description': """Show Payment Term Maturities in Invoice Form """,
1247+ 'author': 'www.andreacometa.it',
1248+ 'website': 'www.andreacometa.it',
1249+ 'license': 'AGPL-3',
1250+ "depends": ['account'],
1251+ "init_xml": ['show_maturity.xml'],
1252+ "update_xml": [],
1253+ "demo_xml": [],
1254+ "active": False,
1255+ "installable": True
1256+}
1257
1258=== added file 'account_invoice_show_maturity/account_invoice.py'
1259--- account_invoice_show_maturity/account_invoice.py 1970-01-01 00:00:00 +0000
1260+++ account_invoice_show_maturity/account_invoice.py 2014-03-28 12:10:25 +0000
1261@@ -0,0 +1,44 @@
1262+# -*- coding: utf-8 -*-
1263+##############################################################################
1264+#
1265+# Copyright (C) 2014 Andrea Cometa - Perito informatico
1266+# All Rights Reserved
1267+#
1268+# This program is free software: you can redistribute it and/or modify
1269+# it under the terms of the GNU Affero General Public License as published
1270+# by the Free Software Foundation, either version 3 of the License, or
1271+# (at your option) any later version.
1272+#
1273+# This program is distributed in the hope that it will be useful,
1274+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1275+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1276+# GNU Affero General Public License for more details.
1277+#
1278+# You should have received a copy of the GNU Affero General Public License
1279+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1280+#
1281+##############################################################################
1282+
1283+from osv import fields, osv
1284+
1285+
1286+class account_invoice(osv.osv):
1287+
1288+ _inherit = "account.invoice"
1289+
1290+ def _maturity(self, cr, uid, ids, filed_name, arg, context=None):
1291+ res = {}
1292+ for o in self.browse(cr, uid, ids, context):
1293+ if not o.id in res:
1294+ res[o.id] = []
1295+ if o.move_id and o.move_id.line_id:
1296+ for line in o.move_id.line_id:
1297+ if line.date_maturity:
1298+ res[o.id].append(line.id)
1299+ return res
1300+
1301+ _columns = {
1302+ "maturity_ids": fields.function(
1303+ _maturity, type="one2many", store=False,
1304+ relation="account.move.line", method=True)
1305+ }
1306
1307=== added file 'account_invoice_show_maturity/show_maturity.xml'
1308--- account_invoice_show_maturity/show_maturity.xml 1970-01-01 00:00:00 +0000
1309+++ account_invoice_show_maturity/show_maturity.xml 2014-03-28 12:10:25 +0000
1310@@ -0,0 +1,38 @@
1311+<?xml version="1.0" encoding="utf-8"?>
1312+<openerp>
1313+<data>
1314+
1315+ <record id="show_maturity" model="ir.ui.view">
1316+ <field name="name">show_maturity.form</field>
1317+ <field name="model">account.invoice</field>
1318+ <field name="inherit_id" ref="account.invoice_form"/>
1319+ <field name="arch" type="xml">
1320+ <field name="payment_ids" position="before">
1321+ <field name="maturity_ids" nolabel="1">
1322+ <tree string="Maturities">
1323+ <field name="date_maturity"/>
1324+ <field name="debit" string="Amount"/>
1325+ </tree>
1326+ </field>
1327+ </field>
1328+ </field>
1329+ </record>
1330+
1331+ <record id="show_maturity_supplier" model="ir.ui.view">
1332+ <field name="name">show_maturity.supplier.form</field>
1333+ <field name="model">account.invoice</field>
1334+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
1335+ <field name="arch" type="xml">
1336+ <field name="payment_ids" position="before">
1337+ <field name="maturity_ids" nolabel="1">
1338+ <tree string="Maturities">
1339+ <field name="date_maturity"/>
1340+ <field name="credit" string="Amount"/>
1341+ </tree>
1342+ </field>
1343+ </field>
1344+ </field>
1345+ </record>
1346+
1347+</data>
1348+</openerp>
1349
1350=== added directory 'account_payment_term_enhanced'
1351=== added file 'account_payment_term_enhanced/AUTHORS.txt'
1352--- account_payment_term_enhanced/AUTHORS.txt 1970-01-01 00:00:00 +0000
1353+++ account_payment_term_enhanced/AUTHORS.txt 2014-03-28 12:10:25 +0000
1354@@ -0,0 +1,1 @@
1355+Andrea Cometa <info@andreacometa.it> / AMiGA rulez
1356
1357=== added file 'account_payment_term_enhanced/__init__.py'
1358--- account_payment_term_enhanced/__init__.py 1970-01-01 00:00:00 +0000
1359+++ account_payment_term_enhanced/__init__.py 2014-03-28 12:10:25 +0000
1360@@ -0,0 +1,24 @@
1361+# -*- encoding: utf-8 -*-
1362+##############################################################################
1363+#
1364+# OpenERP, Open Source Management Solution
1365+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
1366+# www.andreacometa.it
1367+# openerp@andreacometa.it
1368+#
1369+# This program is free software: you can redistribute it and/or modify
1370+# it under the terms of the GNU Affero General Public License as published
1371+# by the Free Software Foundation, either version 3 of the License, or
1372+# (at your option) any later version.
1373+#
1374+# This program is distributed in the hope that it will be useful,
1375+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1376+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1377+# GNU Affero General Public License for more details.
1378+#
1379+# You should have received a copy of the GNU Affero General Public License
1380+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1381+#
1382+##############################################################################
1383+
1384+import account
1385
1386=== added file 'account_payment_term_enhanced/__openerp__.py'
1387--- account_payment_term_enhanced/__openerp__.py 1970-01-01 00:00:00 +0000
1388+++ account_payment_term_enhanced/__openerp__.py 2014-03-28 12:10:25 +0000
1389@@ -0,0 +1,41 @@
1390+# -*- encoding: utf-8 -*-
1391+##############################################################################
1392+#
1393+# OpenERP, Open Source Management Solution
1394+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
1395+# www.andreacometa.it
1396+# openerp@andreacometa.it
1397+#
1398+# This program is free software: you can redistribute it and/or modify
1399+# it under the terms of the GNU Affero General Public License as published
1400+# by the Free Software Foundation, either version 3 of the License, or
1401+# (at your option) any later version.
1402+#
1403+# This program is distributed in the hope that it will be useful,
1404+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1405+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1406+# GNU Affero General Public License for more details.
1407+#
1408+# You should have received a copy of the GNU Affero General Public License
1409+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1410+#
1411+##############################################################################
1412+
1413+{
1414+ 'name': 'Account Payment Term Enhanced',
1415+ 'version': '1.1',
1416+ 'category': 'Accounting & Finance',
1417+ 'description': """
1418+ITA: Aggiunge la possibilità di calcolare le scadenze ripartendole equamente
1419+ Permette di calcolare le scadenze per mese oltre che per giorni.
1420+ENG: Adds the ability to calculate maturities basing them equally.
1421+ Adds due date calc based on months instead days""",
1422+ 'author': 'www.andreacometa.it',
1423+ 'website': 'http://www.andreacometa.it',
1424+ 'depends': ['account'],
1425+ 'update_xml': [ 'account_view.xml',],
1426+ 'installable': True,
1427+ 'active': False,
1428+ 'images' : ['images/image.png'],
1429+}
1430+
1431
1432=== added file 'account_payment_term_enhanced/account.py'
1433--- account_payment_term_enhanced/account.py 1970-01-01 00:00:00 +0000
1434+++ account_payment_term_enhanced/account.py 2014-03-28 12:10:25 +0000
1435@@ -0,0 +1,177 @@
1436+# -*- encoding: utf-8 -*-
1437+##############################################################################
1438+#
1439+# OpenERP, Open Source Management Solution
1440+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
1441+# www.andreacometa.it
1442+# openerp@andreacometa.it
1443+#
1444+# This program is free software: you can redistribute it and/or modify
1445+# it under the terms of the GNU Affero General Public License as published
1446+# by the Free Software Foundation, either version 3 of the License, or
1447+# (at your option) any later version.
1448+#
1449+# This program is distributed in the hope that it will be useful,
1450+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1451+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1452+# GNU Affero General Public License for more details.
1453+#
1454+# You should have received a copy of the GNU Affero General Public License
1455+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1456+#
1457+##############################################################################
1458+
1459+from osv import fields, osv
1460+import decimal_precision as dp
1461+from tools.translate import _
1462+from datetime import datetime
1463+from dateutil.relativedelta import relativedelta
1464+
1465+class account_payment_term(osv.osv):
1466+ _inherit = "account.payment.term"
1467+
1468+ _columns = {
1469+ 'fairly': fields.boolean("Distribute fairly"),
1470+ 'days': fields.integer(
1471+ 'Number of Days', required=True,
1472+ help="Number of days between every maturity from the day of month.\
1473+If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."
1474+ ),
1475+ 'days2': fields.integer(
1476+ 'Day of the Month', required=True,
1477+ help="Day of the month, set -1 for the last day of the current mon\
1478+th. If it's positive, it gives the day of the next month. Set 0 for net days (\
1479+otherwise it's based on the beginning of the month)."),
1480+ 'maturities': fields.integer(
1481+ "Number of maturities",
1482+ help="Number of maturities to divide the total amount"),
1483+ 'start_day': fields.integer(
1484+ 'Start Day', required=True,
1485+ help="Start Day of the month, set -1 for the last day of the curre\
1486+nt month. If it's positive, it gives the day of the next month. Set 0 for net \
1487+days (otherwise it's based on the beginning of the month)."),
1488+ 'monthly': fields.boolean(
1489+ "Calculate by month",
1490+ help="if checked, calculates one maturity for every month"),
1491+ }
1492+
1493+ _defaults = {
1494+ 'maturities': 1,
1495+ 'days': 0,
1496+ 'days2': 0,
1497+ 'start_day': 0,
1498+ 'fairly': False,
1499+ 'monthly': False,
1500+ }
1501+
1502+ def compute(self, cr, uid, id, value, date_ref=False, context=None):
1503+ if not date_ref:
1504+ date_ref = datetime.now().strftime('%Y-%m-%d')
1505+ pt = self.browse(cr, uid, id, context=context)
1506+ amount = value
1507+ result = []
1508+ obj_precision = self.pool.get('decimal.precision')
1509+ prec = obj_precision.precision_get(cr, uid, 'Account')
1510+ # added by me
1511+ if pt.fairly:
1512+ single_amount = round(amount / pt.maturities, prec)
1513+ if pt.start_day < 0:
1514+ start_date = (
1515+ datetime.strptime(date_ref, '%Y-%m-%d') +
1516+ relativedelta(day=1, months=1) +
1517+ relativedelta(days=pt.start_day))
1518+ else:
1519+ start_date = (
1520+ datetime.strptime(date_ref, '%Y-%m-%d') +
1521+ relativedelta(days=pt.start_day, months=0))
1522+ #print "data iniziale: %s\n" % start_date
1523+
1524+ for i in range(0, pt.maturities):
1525+ if pt.maturities > 1:
1526+ if pt.monthly:
1527+ next_date = (start_date +
1528+ relativedelta(months=(i+1)))
1529+ else:
1530+ next_date = (start_date +
1531+ relativedelta(days=pt.days * (i+1)))
1532+ if pt.days2 < 0:
1533+ next_first_date = (
1534+ next_date + relativedelta(day=1, months=1))
1535+ # Getting 1st of next month
1536+ next_date = (
1537+ next_first_date + relativedelta(days=pt.days2))
1538+
1539+ if pt.days2 > 0: # numero giorno in cui farlo scadere
1540+ if pt.monthly:
1541+ next_date += relativedelta(day=pt.days2)
1542+ else:
1543+ next_date += relativedelta(day=pt.days2, months=1)
1544+ #print "data scadenza: %s\n" % next_date
1545+ else:
1546+ next_date = start_date
1547+
1548+ if i < pt.maturities-1:
1549+ result.append((next_date.strftime('%Y-%m-%d'),
1550+ single_amount))
1551+ amount -= single_amount
1552+ else: # last round
1553+ result.append((next_date.strftime('%Y-%m-%d'), amount))
1554+ else:
1555+ for line in pt.line_ids:
1556+ if line.value == 'fixed':
1557+ amt = round(line.value_amount, prec)
1558+ elif line.value == 'procent':
1559+ amt = round(value * line.value_amount, prec)
1560+ elif line.value == 'balance':
1561+ amt = round(amount, prec)
1562+ if amt:
1563+ if line.start_day < 0:
1564+ start_date = (
1565+ datetime.strptime(date_ref, '%Y-%m-%d') +
1566+ relativedelta(day=1, months=1) +
1567+ relativedelta(days=line.start_day))
1568+ elif line.start_day > 0:
1569+ start_date = (
1570+ datetime.strptime(date_ref, '%Y-%m-%d') +
1571+ relativedelta(days=line.start_day, months=1))
1572+ else:
1573+ start_date = datetime.strptime(date_ref, '%Y-%m-%d')
1574+ if line.monthly:
1575+ next_date = (start_date +
1576+ relativedelta(months=line.days))
1577+ else:
1578+ next_date = (start_date +
1579+ relativedelta(days=line.days))
1580+ if line.days2 < 0:
1581+ next_first_date = (next_date +
1582+ relativedelta(day=1, months=1))
1583+ # Getting 1st of next month
1584+ next_date = (next_first_date +
1585+ relativedelta(days=line.days2))
1586+ if line.days2 > 0:
1587+ next_date += relativedelta(day=line.days2, months=1)
1588+ result.append((next_date.strftime('%Y-%m-%d'), amt))
1589+ amount -= amt
1590+ return result
1591+
1592+account_payment_term()
1593+
1594+
1595+class account_payment_term_line(osv.osv):
1596+ _inherit = 'account.payment.term.line'
1597+
1598+ _columns = {
1599+ 'start_day': fields.integer(
1600+ 'Start Day', required=True,
1601+ help="Start Day of the month, set -1 for the last day of the curre\
1602+nt month. If it's positive, it gives the day of the next month. Set 0 for net \
1603+days (otherwise it's based on the beginning of the month)."),
1604+ 'monthly': fields.boolean(
1605+ 'Monthly',
1606+ help="If checked, the number in days/month will be months"),
1607+ }
1608+ _defaults = {
1609+ 'start_day': 0,
1610+ 'monthly': False,
1611+ }
1612+account_payment_term_line()
1613
1614=== added file 'account_payment_term_enhanced/account_view.xml'
1615--- account_payment_term_enhanced/account_view.xml 1970-01-01 00:00:00 +0000
1616+++ account_payment_term_enhanced/account_view.xml 2014-03-28 12:10:25 +0000
1617@@ -0,0 +1,63 @@
1618+<?xml version="1.0" encoding="utf-8"?>
1619+<openerp>
1620+ <data>
1621+
1622+ <record id="view_payment_term_form_enhanced" model="ir.ui.view">
1623+ <field name="name">account.payment.term.form</field>
1624+ <field name="model">account.payment.term</field>
1625+ <field name="inherit_id" ref="account.view_payment_term_form"/>
1626+ <field name="arch" type="xml">
1627+ <field name="note" position="replace" >
1628+ <group colspan="4" col="7">
1629+ <group colspan="5" col="6">
1630+ <field name="note" />
1631+ </group>
1632+ <separator orientation="vertical" rowspan="4"/>
1633+ <group colspan="1" col="2">
1634+ <field name="fairly"/>
1635+ <field name="monthly" attrs="{'readonly':[('fairly', '=', False)]}"/>
1636+ <field name="days" attrs="{'readonly':['|', ('fairly', '=', False), ('monthly', '=', True)]}"/>
1637+ <field name="start_day" attrs="{'readonly':[('fairly', '=', False)]}"/>
1638+ <field name="days2" attrs="{'readonly':[('fairly', '=', False)]}"/>
1639+ <field name="maturities" attrs="{'readonly':[('fairly', '=', False)]}"/>
1640+ </group>
1641+ </group>
1642+ </field>
1643+ <field name="line_ids" position="replace">
1644+ <field colspan="4" name="line_ids" nolabel="1" attrs="{'readonly':[('fairly', '=', True)]}"/>
1645+ </field>
1646+ </field>
1647+ </record>
1648+
1649+ <record model="ir.ui.view" id="view_payment_term_line_form_enhanced">
1650+ <field name="name">account.payment.term.line.form.enhanced</field>
1651+ <field name="model">account.payment.term.line</field>
1652+ <field name="inherit_id" ref="account.view_payment_term_line_form"/>
1653+ <field name="arch" type="xml">
1654+ <field name="days2" position="before">
1655+ <field name="start_day" colspan="4"/>
1656+ <field name="monthly" colspan="4"/>
1657+ </field>
1658+ <field name="days" position="replace">
1659+ <field name="days" string="days/months"/>
1660+ </field>
1661+ </field>
1662+ </record>
1663+
1664+ <record model="ir.ui.view" id="view_payment_term_line_tree_enhanced">
1665+ <field name="name">account.payment.term.line.tree.enhanced</field>
1666+ <field name="model">account.payment.term.line</field>
1667+ <field name="inherit_id" ref="account.view_payment_term_line_tree"/>
1668+ <field name="arch" type="xml">
1669+ <field name="days2" position="before">
1670+ <field name="start_day"/>
1671+ <field name="monthly"/>
1672+ </field>
1673+ <field name="days" position="replace">
1674+ <field name="days" string="days/months"/>
1675+ </field>
1676+ </field>
1677+ </record>
1678+
1679+ </data>
1680+</openerp>
1681
1682=== added directory 'account_payment_term_enhanced/i18n'
1683=== added file 'account_payment_term_enhanced/i18n/account_payment_term_enhanced.pot'
1684--- account_payment_term_enhanced/i18n/account_payment_term_enhanced.pot 1970-01-01 00:00:00 +0000
1685+++ account_payment_term_enhanced/i18n/account_payment_term_enhanced.pot 2014-03-28 12:10:25 +0000
1686@@ -0,0 +1,99 @@
1687+# Translation of OpenERP Server.
1688+# This file contains the translation of the following modules:
1689+# * account_payment_term_enhanced
1690+#
1691+msgid ""
1692+msgstr ""
1693+"Project-Id-Version: OpenERP Server 7.0\n"
1694+"Report-Msgid-Bugs-To: \n"
1695+"POT-Creation-Date: 2014-02-28 10:28+0000\n"
1696+"PO-Revision-Date: 2014-02-28 10:28+0000\n"
1697+"Last-Translator: <>\n"
1698+"Language-Team: \n"
1699+"MIME-Version: 1.0\n"
1700+"Content-Type: text/plain; charset=UTF-8\n"
1701+"Content-Transfer-Encoding: \n"
1702+"Plural-Forms: \n"
1703+
1704+#. module: account_payment_term_enhanced
1705+#: field:account.payment.term,start_day:0
1706+#: field:account.payment.term.line,start_day:0
1707+msgid "Start Day"
1708+msgstr ""
1709+
1710+#. module: account_payment_term_enhanced
1711+#: help:account.payment.term,start_day:0
1712+#: help:account.payment.term.line,start_day:0
1713+msgid "Start Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."
1714+msgstr ""
1715+
1716+#. module: account_payment_term_enhanced
1717+#: field:account.payment.term,days2:0
1718+msgid "Day of the Month"
1719+msgstr ""
1720+
1721+#. module: account_payment_term_enhanced
1722+#: field:account.payment.term,monthly:0
1723+msgid "Calculate by month"
1724+msgstr ""
1725+
1726+#. module: account_payment_term_enhanced
1727+#: field:account.payment.term.line,monthly:0
1728+msgid "Monthly"
1729+msgstr ""
1730+
1731+#. module: account_payment_term_enhanced
1732+#: view:account.payment.term.line:0
1733+msgid "days/months"
1734+msgstr ""
1735+
1736+#. module: account_payment_term_enhanced
1737+#: model:ir.model,name:account_payment_term_enhanced.model_account_payment_term
1738+msgid "Payment Term"
1739+msgstr ""
1740+
1741+#. module: account_payment_term_enhanced
1742+#: field:account.payment.term,days:0
1743+msgid "Number of Days"
1744+msgstr ""
1745+
1746+#. module: account_payment_term_enhanced
1747+#: help:account.payment.term.line,monthly:0
1748+msgid "If checked, the number in days/month will be months"
1749+msgstr ""
1750+
1751+#. module: account_payment_term_enhanced
1752+#: model:ir.model,name:account_payment_term_enhanced.model_account_payment_term_line
1753+msgid "Payment Term Line"
1754+msgstr ""
1755+
1756+#. module: account_payment_term_enhanced
1757+#: field:account.payment.term,fairly:0
1758+msgid "Distribute fairly"
1759+msgstr ""
1760+
1761+#. module: account_payment_term_enhanced
1762+#: field:account.payment.term,maturities:0
1763+msgid "Number of maturities"
1764+msgstr ""
1765+
1766+#. module: account_payment_term_enhanced
1767+#: help:account.payment.term,maturities:0
1768+msgid "Number of maturities to divide the total amount"
1769+msgstr ""
1770+
1771+#. module: account_payment_term_enhanced
1772+#: help:account.payment.term,days2:0
1773+msgid "Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."
1774+msgstr ""
1775+
1776+#. module: account_payment_term_enhanced
1777+#: help:account.payment.term,monthly:0
1778+msgid "if checked, calculates one maturity for every month"
1779+msgstr ""
1780+
1781+#. module: account_payment_term_enhanced
1782+#: help:account.payment.term,days:0
1783+msgid "Number of days between every maturity from the day of month.If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."
1784+msgstr ""
1785+
1786
1787=== added file 'account_payment_term_enhanced/i18n/it.po'
1788--- account_payment_term_enhanced/i18n/it.po 1970-01-01 00:00:00 +0000
1789+++ account_payment_term_enhanced/i18n/it.po 2014-03-28 12:10:25 +0000
1790@@ -0,0 +1,99 @@
1791+# Translation of OpenERP Server.
1792+# This file contains the translation of the following modules:
1793+# * account_payment_term_enhanced
1794+#
1795+msgid ""
1796+msgstr ""
1797+"Project-Id-Version: OpenERP Server 7.0\n"
1798+"Report-Msgid-Bugs-To: \n"
1799+"POT-Creation-Date: 2014-02-28 10:26+0000\n"
1800+"PO-Revision-Date: 2014-02-28 10:26+0000\n"
1801+"Last-Translator: <>\n"
1802+"Language-Team: \n"
1803+"MIME-Version: 1.0\n"
1804+"Content-Type: text/plain; charset=UTF-8\n"
1805+"Content-Transfer-Encoding: \n"
1806+"Plural-Forms: \n"
1807+
1808+#. module: account_payment_term_enhanced
1809+#: field:account.payment.term,start_day:0
1810+#: field:account.payment.term.line,start_day:0
1811+msgid "Start Day"
1812+msgstr "Giorno iniziale"
1813+
1814+#. module: account_payment_term_enhanced
1815+#: help:account.payment.term,start_day:0
1816+#: help:account.payment.term.line,start_day:0
1817+msgid "Start Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."
1818+msgstr "Giorno iniziale per il calcolo delle scadenze. Impostare -1 per fine mese da data fattura. Se positivo, fornisce il numero di giorni dalla data fattura. "
1819+
1820+#. module: account_payment_term_enhanced
1821+#: field:account.payment.term,days2:0
1822+msgid "Day of the Month"
1823+msgstr "Giorno del mese"
1824+
1825+#. module: account_payment_term_enhanced
1826+#: field:account.payment.term,monthly:0
1827+msgid "Calculate by month"
1828+msgstr "Calcolo mensile"
1829+
1830+#. module: account_payment_term_enhanced
1831+#: field:account.payment.term.line,monthly:0
1832+msgid "Monthly"
1833+msgstr "Monthly"
1834+
1835+#. module: account_payment_term_enhanced
1836+#: view:account.payment.term.line:0
1837+msgid "days/months"
1838+msgstr "days/months"
1839+
1840+#. module: account_payment_term_enhanced
1841+#: model:ir.model,name:account_payment_term_enhanced.model_account_payment_term
1842+msgid "Payment Term"
1843+msgstr "Termine di pagamento"
1844+
1845+#. module: account_payment_term_enhanced
1846+#: field:account.payment.term,days:0
1847+msgid "Number of Days"
1848+msgstr "Numero di Giorni"
1849+
1850+#. module: account_payment_term_enhanced
1851+#: help:account.payment.term.line,monthly:0
1852+msgid "If checked, the number in days/month will be months"
1853+msgstr "If checked, the number in days/month will be months"
1854+
1855+#. module: account_payment_term_enhanced
1856+#: model:ir.model,name:account_payment_term_enhanced.model_account_payment_term_line
1857+msgid "Payment Term Line"
1858+msgstr "Riga termine di pagamento"
1859+
1860+#. module: account_payment_term_enhanced
1861+#: field:account.payment.term,fairly:0
1862+msgid "Distribute fairly"
1863+msgstr "Dividi equamente"
1864+
1865+#. module: account_payment_term_enhanced
1866+#: field:account.payment.term,maturities:0
1867+msgid "Number of maturities"
1868+msgstr "Numero di scadenze"
1869+
1870+#. module: account_payment_term_enhanced
1871+#: help:account.payment.term,maturities:0
1872+msgid "Number of maturities to divide the total amount"
1873+msgstr "Numero di scadenze su cui dividere l'importo totale"
1874+
1875+#. module: account_payment_term_enhanced
1876+#: help:account.payment.term,days2:0
1877+msgid "Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."
1878+msgstr "Giorno del mese, impostare a -1 per l'ultimo giorno del mese corrente. Se positivo, fornisce il giorno del prossimo mese. Impostare a 0 per i giorni precisi (altrimenti basato sull'inizio del mese)."
1879+
1880+#. module: account_payment_term_enhanced
1881+#: help:account.payment.term,monthly:0
1882+msgid "if checked, calculates one maturity for every month"
1883+msgstr "Se spuntato, calcola una scadenza per ogni mese"
1884+
1885+#. module: account_payment_term_enhanced
1886+#: help:account.payment.term,days:0
1887+msgid "Number of days between every maturity from the day of month.If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."
1888+msgstr "Numero di giorni tra ogni scadenza a partire dal giorno del mese indicato. Se la data=15/01, Numero di giorni=22, Giorno del mese=-1, allora la data di scadenza è il 28/02."
1889+
1890
1891=== added directory 'account_payment_term_enhanced/images'
1892=== added file 'account_payment_term_enhanced/images/image.png'
1893Binary files account_payment_term_enhanced/images/image.png 1970-01-01 00:00:00 +0000 and account_payment_term_enhanced/images/image.png 2014-03-28 12:10:25 +0000 differ
1894=== added directory 'invoice_line_report_data'
1895=== added file 'invoice_line_report_data/__init__.py'
1896--- invoice_line_report_data/__init__.py 1970-01-01 00:00:00 +0000
1897+++ invoice_line_report_data/__init__.py 2014-03-28 12:10:25 +0000
1898@@ -0,0 +1,12 @@
1899+# -*- encoding: utf-8 -*-
1900+##############################################################################
1901+#
1902+# Personalizzazione realizzata da Andrea Cometa
1903+# Compatible with OpenERP release 6.0.0
1904+# Copyright (C) 2012 Andrea Cometa. All Rights Reserved.
1905+# Email: info@andreacometa.it
1906+# Web site: http://www.andreacometa.it
1907+#
1908+##############################################################################
1909+
1910+import invoice
1911
1912=== added file 'invoice_line_report_data/__openerp__.py'
1913--- invoice_line_report_data/__openerp__.py 1970-01-01 00:00:00 +0000
1914+++ invoice_line_report_data/__openerp__.py 2014-03-28 12:10:25 +0000
1915@@ -0,0 +1,41 @@
1916+# -*- encoding: utf-8 -*-
1917+##############################################################################
1918+#
1919+# OpenERP, Open Source Management Solution
1920+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
1921+# www.andreacometa.it
1922+# openerp@andreacometa.it
1923+#
1924+# This program is free software: you can redistribute it and/or modify
1925+# it under the terms of the GNU Affero General Public License as published by
1926+# the Free Software Foundation, either version 3 of the License, or
1927+# (at your option) any later version.
1928+#
1929+# This program is distributed in the hope that it will be useful,
1930+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1931+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1932+# GNU Affero General Public License for more details.
1933+#
1934+# You should have received a copy of the GNU Affero General Public License
1935+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1936+#
1937+##############################################################################
1938+
1939+{
1940+ 'name': 'Invoice Line Report Data',
1941+ 'version': '1.0',
1942+ 'category': 'Account',
1943+ 'description': """ENG: This module allows you to insert report information in account invoice line and manage them in your report\n
1944+ ITA: Questo modulo consente di inserire alcune informazioni utili ai report così da gestire meglio i dagti nel report stesso.
1945+ """,
1946+ 'author': 'www.andreacometa.it',
1947+ 'website': 'http://www.andreacometa.it',
1948+ 'depends': ['account'],
1949+ 'update_xml': [
1950+ 'invoice_view.xml',
1951+ ],
1952+ 'installable': True,
1953+ 'active': False,
1954+ 'images' : ['images/invoice_line_report_note.jpg'],
1955+}
1956+
1957
1958=== added directory 'invoice_line_report_data/i18n'
1959=== added file 'invoice_line_report_data/i18n/it.po'
1960--- invoice_line_report_data/i18n/it.po 1970-01-01 00:00:00 +0000
1961+++ invoice_line_report_data/i18n/it.po 2014-03-28 12:10:25 +0000
1962@@ -0,0 +1,52 @@
1963+# Translation of OpenERP Server.
1964+# This file contains the translation of the following modules:
1965+# * invoice_line_report_data
1966+#
1967+msgid ""
1968+msgstr ""
1969+"Project-Id-Version: OpenERP Server 7.0\n"
1970+"Report-Msgid-Bugs-To: \n"
1971+"POT-Creation-Date: 2013-06-04 15:36+0000\n"
1972+"PO-Revision-Date: 2013-06-04 15:36+0000\n"
1973+"Last-Translator: <>\n"
1974+"Language-Team: \n"
1975+"MIME-Version: 1.0\n"
1976+"Content-Type: text/plain; charset=UTF-8\n"
1977+"Content-Transfer-Encoding: \n"
1978+"Plural-Forms: \n"
1979+
1980+#. module: invoice_line_report_data
1981+#: selection:account.invoice.line,report_line_type:0
1982+msgid "Product"
1983+msgstr "Prodotto"
1984+
1985+#. module: invoice_line_report_data
1986+#: selection:account.invoice.line,report_line_type:0
1987+msgid "Title"
1988+msgstr "Titolo"
1989+
1990+#. module: invoice_line_report_data
1991+#: view:account.invoice.line:0
1992+msgid "{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}"
1993+msgstr "{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}"
1994+
1995+#. module: invoice_line_report_data
1996+#: model:ir.model,name:invoice_line_report_data.model_account_invoice_line
1997+msgid "Invoice Line"
1998+msgstr "Righe Fattura"
1999+
2000+#. module: invoice_line_report_data
2001+#: selection:account.invoice.line,report_line_type:0
2002+msgid "Note"
2003+msgstr "Nota"
2004+
2005+#. module: invoice_line_report_data
2006+#: field:account.invoice.line,report_line_type:0
2007+msgid "Line Type"
2008+msgstr "Tipologia dettaglio"
2009+
2010+#. module: invoice_line_report_data
2011+#: selection:account.invoice.line,report_line_type:0
2012+msgid "Separator"
2013+msgstr "Separatore"
2014+
2015
2016=== added directory 'invoice_line_report_data/images'
2017=== added file 'invoice_line_report_data/images/invoice_line_report_note.png'
2018Binary files invoice_line_report_data/images/invoice_line_report_note.png 1970-01-01 00:00:00 +0000 and invoice_line_report_data/images/invoice_line_report_note.png 2014-03-28 12:10:25 +0000 differ
2019=== added file 'invoice_line_report_data/invoice.py'
2020--- invoice_line_report_data/invoice.py 1970-01-01 00:00:00 +0000
2021+++ invoice_line_report_data/invoice.py 2014-03-28 12:10:25 +0000
2022@@ -0,0 +1,58 @@
2023+# -*- encoding: utf-8 -*-
2024+##############################################################################
2025+#
2026+# OpenERP, Open Source Management Solution
2027+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2028+# www.andreacometa.it
2029+# openerp@andreacometa.it
2030+#
2031+# This program is free software: you can redistribute it and/or modify
2032+# it under the terms of the GNU Affero General Public License as published by
2033+# the Free Software Foundation, either version 3 of the License, or
2034+# (at your option) any later version.
2035+#
2036+# This program is distributed in the hope that it will be useful,
2037+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2038+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2039+# GNU Affero General Public License for more details.
2040+#
2041+# You should have received a copy of the GNU Affero General Public License
2042+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2043+#
2044+##############################################################################
2045+
2046+
2047+from osv import osv, fields
2048+import netsvc
2049+from tools.translate import _
2050+
2051+
2052+class account_invoice_line(osv.osv):
2053+
2054+ _name = 'account.invoice.line'
2055+ _inherit = 'account.invoice.line'
2056+
2057+ def on_change_report_line_type(self, cr, uid, ids, report_line_type):
2058+ if not report_line_type in ('t', 'n', 's'):
2059+ return {}
2060+ return {'value': {
2061+ 'product_id': False,
2062+ 'quantity': 0.0,
2063+ 'price_unit': 0.0,
2064+ 'uos_id': False,
2065+ 'discount' : 0.00,
2066+ 'invoice_line_tax_id' : False,
2067+ }
2068+ }
2069+
2070+ _columns = {
2071+ 'report_line_type' : fields.selection(
2072+ (('p', 'Product'),('t', 'Title'),('n', 'Note'),('s', 'Separator')),
2073+ 'Line Type'),
2074+ }
2075+
2076+ _defaults = {
2077+ 'report_line_type' : 'p',
2078+ }
2079+
2080+account_invoice_line()
2081
2082=== added file 'invoice_line_report_data/invoice_view.xml'
2083--- invoice_line_report_data/invoice_view.xml 1970-01-01 00:00:00 +0000
2084+++ invoice_line_report_data/invoice_view.xml 2014-03-28 12:10:25 +0000
2085@@ -0,0 +1,39 @@
2086+<?xml version="1.0" encoding="utf-8"?>
2087+<openerp>
2088+ <data>
2089+
2090+ <record id="view_invoice_line_report_data_form" model="ir.ui.view">
2091+ <field name="name">invoice.line.report.data.form</field>
2092+ <field name="model">account.invoice.line</field>
2093+ <field name="inherit_id" ref="account.view_invoice_line_form"/>
2094+ <field name="arch" type="xml">
2095+ <label for="name" position="before">
2096+ <label for="report_line_type" />
2097+ <field name="report_line_type" colspan="4" on_change="on_change_report_line_type(report_line_type)"/>
2098+ </label>
2099+ <field name="product_id" position="attributes">
2100+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2101+ </field>
2102+ <field name="quantity" position="attributes">
2103+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2104+ </field>
2105+ <field name="price_unit" position="attributes">
2106+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2107+ </field>
2108+ <field name="price_unit" position="attributes">
2109+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2110+ </field>
2111+ <field name="uos_id" position="attributes">
2112+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2113+ </field>
2114+ <field name="discount" position="attributes">
2115+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2116+ </field>
2117+ <field name="invoice_line_tax_id" position="attributes">
2118+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2119+ </field>
2120+ </field>
2121+ </record>
2122+
2123+ </data>
2124+</openerp>
2125
2126=== added directory 'invoice_sequence_recovery'
2127=== added file 'invoice_sequence_recovery/AUTHORS'
2128--- invoice_sequence_recovery/AUTHORS 1970-01-01 00:00:00 +0000
2129+++ invoice_sequence_recovery/AUTHORS 2014-03-28 12:10:25 +0000
2130@@ -0,0 +1,2 @@
2131+Alessandro Gioffreda <a.gioffreda@yahoo.it>
2132+Francesco OpenCode Apruzzese <f.apruzzese@andreacometa.it>
2133
2134=== added file 'invoice_sequence_recovery/__init__.py'
2135--- invoice_sequence_recovery/__init__.py 1970-01-01 00:00:00 +0000
2136+++ invoice_sequence_recovery/__init__.py 2014-03-28 12:10:25 +0000
2137@@ -0,0 +1,22 @@
2138+# -*- coding: utf-8 -*-
2139+##############################################################################
2140+#
2141+# Copyright (C) 2014 Andrea Cometa - Perito informatico
2142+# All Rights Reserved
2143+#
2144+# This program is free software: you can redistribute it and/or modify
2145+# it under the terms of the GNU Affero General Public License as published
2146+# by the Free Software Foundation, either version 3 of the License, or
2147+# (at your option) any later version.
2148+#
2149+# This program is distributed in the hope that it will be useful,
2150+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2151+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2152+# GNU Affero General Public License for more details.
2153+#
2154+# You should have received a copy of the GNU Affero General Public License
2155+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2156+#
2157+##############################################################################
2158+
2159+import invoice
2160
2161=== added file 'invoice_sequence_recovery/__openerp__.py'
2162--- invoice_sequence_recovery/__openerp__.py 1970-01-01 00:00:00 +0000
2163+++ invoice_sequence_recovery/__openerp__.py 2014-03-28 12:10:25 +0000
2164@@ -0,0 +1,39 @@
2165+# -*- coding: utf-8 -*-
2166+##############################################################################
2167+#
2168+# Copyright (C) 2014 Andrea Cometa - Perito informatico
2169+# All Rights Reserved
2170+#
2171+# This program is free software: you can redistribute it and/or modify
2172+# it under the terms of the GNU Affero General Public License as published
2173+# by the Free Software Foundation, either version 3 of the License, or
2174+# (at your option) any later version.
2175+#
2176+# This program is distributed in the hope that it will be useful,
2177+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2178+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2179+# GNU Affero General Public License for more details.
2180+#
2181+# You should have received a copy of the GNU Affero General Public License
2182+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2183+#
2184+##############################################################################
2185+
2186+{
2187+ 'name': "Invoice Sequence Recovery",
2188+ 'version': '1.0',
2189+ 'category': '',
2190+ 'description': """A module dedicated to recovery sequence for
2191+ in and out invoice""",
2192+ 'author': 'www.andreacometa.it',
2193+ 'website': 'www.andreacometa.it',
2194+ 'license': 'AGPL-3',
2195+ "depends": ['account', 'sequence_recovery'],
2196+ "init_xml": [],
2197+ "update_xml": [
2198+ 'invoice_view.xml',
2199+ ],
2200+ "demo_xml": [],
2201+ "active": False,
2202+ "installable": True
2203+}
2204
2205=== added file 'invoice_sequence_recovery/invoice.py'
2206--- invoice_sequence_recovery/invoice.py 1970-01-01 00:00:00 +0000
2207+++ invoice_sequence_recovery/invoice.py 2014-03-28 12:10:25 +0000
2208@@ -0,0 +1,46 @@
2209+# -*- coding: utf-8 -*-
2210+##############################################################################
2211+#
2212+# Copyright (C) 2014 Andrea Cometa - Perito informatico
2213+# All Rights Reserved
2214+#
2215+# This program is free software: you can redistribute it and/or modify
2216+# it under the terms of the GNU Affero General Public License as published
2217+# by the Free Software Foundation, either version 3 of the License, or
2218+# (at your option) any later version.
2219+#
2220+# This program is distributed in the hope that it will be useful,
2221+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2222+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2223+# GNU Affero General Public License for more details.
2224+#
2225+# You should have received a copy of the GNU Affero General Public License
2226+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2227+#
2228+##############################################################################
2229+
2230+from osv import osv
2231+from tools.translate import _
2232+
2233+
2234+class account_invoice(osv.osv):
2235+
2236+ _inherit = "account.invoice"
2237+
2238+ def unlink(self, cr, uid, ids, context=None):
2239+ for invoice in self.browse(cr, uid, ids, context):
2240+ # ----- get the sequence from journal
2241+ sequence_id = invoice.journal_id.sequence_id and \
2242+ invoice.journal_id.sequence_id.id or False
2243+ if not sequence_id:
2244+ raise osv.except_osv(
2245+ _('Error'),
2246+ _('Set a sequence for the journal!'))
2247+ # ----- Recovers the sequence
2248+ self.pool.get('ir.sequence_recovery').set(
2249+ cr, uid, [invoice.id], 'account.invoice',
2250+ 'internal_number', '', sequence_id)
2251+ return super(account_invoice, self).unlink(cr, uid,
2252+ ids, context)
2253+
2254+account_invoice()
2255
2256=== added file 'invoice_sequence_recovery/invoice_view.xml'
2257--- invoice_sequence_recovery/invoice_view.xml 1970-01-01 00:00:00 +0000
2258+++ invoice_sequence_recovery/invoice_view.xml 2014-03-28 12:10:25 +0000
2259@@ -0,0 +1,10 @@
2260+<?xml version="1.0" encoding="utf-8"?>
2261+<openerp>
2262+<data>
2263+
2264+ <menuitem string="Sequence Recovery" action="sequence_recovery.action_sequence_recovery"
2265+ id="menu_sequence_recovery_invoice" parent="account.menu_configuration_misc"
2266+ groups="sequence_recovery.group_sequence_recovery" />
2267+
2268+</data>
2269+</openerp>
2270
2271=== added directory 'last_purchase_price_product'
2272=== added file 'last_purchase_price_product/__init__.py'
2273--- last_purchase_price_product/__init__.py 1970-01-01 00:00:00 +0000
2274+++ last_purchase_price_product/__init__.py 2014-03-28 12:10:25 +0000
2275@@ -0,0 +1,25 @@
2276+# -*- encoding: utf-8 -*-
2277+##############################################################################
2278+#
2279+# OpenERP, Open Source Management Solution
2280+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2281+# www.andreacometa.it
2282+# openerp@andreacometa.it
2283+#
2284+# This program is free software: you can redistribute it and/or modify
2285+# it under the terms of the GNU Affero General Public License as published by
2286+# the Free Software Foundation, either version 3 of the License, or
2287+# (at your option) any later version.
2288+#
2289+# This program is distributed in the hope that it will be useful,
2290+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2291+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2292+# GNU Affero General Public License for more details.
2293+#
2294+# You should have received a copy of the GNU Affero General Public License
2295+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2296+#
2297+##############################################################################
2298+
2299+import wizard
2300+import product
2301
2302=== added file 'last_purchase_price_product/__openerp__.py'
2303--- last_purchase_price_product/__openerp__.py 1970-01-01 00:00:00 +0000
2304+++ last_purchase_price_product/__openerp__.py 2014-03-28 12:10:25 +0000
2305@@ -0,0 +1,42 @@
2306+# -*- encoding: utf-8 -*-
2307+##############################################################################
2308+#
2309+# OpenERP, Open Source Management Solution
2310+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2311+# www.andreacometa.it
2312+# openerp@andreacometa.it
2313+#
2314+# This program is free software: you can redistribute it and/or modify
2315+# it under the terms of the GNU Affero General Public License as published by
2316+# the Free Software Foundation, either version 3 of the License, or
2317+# (at your option) any later version.
2318+#
2319+# This program is distributed in the hope that it will be useful,
2320+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2321+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2322+# GNU Affero General Public License for more details.
2323+#
2324+# You should have received a copy of the GNU Affero General Public License
2325+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2326+#
2327+##############################################################################
2328+
2329+{
2330+ "name" : "last_purchase_price_product",
2331+ "description" : """
2332+ Adds LIFO as cost methos in products
2333+ Aggiunge l'ultimo prezzo di acquisto automatico
2334+ """,
2335+ "version" : "1.0",
2336+ "author" : "www.andreacometa.it",
2337+ "depends" : ["product","stock"],
2338+ "category" : "Product",
2339+ "init_xml" : [],
2340+ "update_xml" : [
2341+ 'product/product_view.xml'
2342+ ],
2343+ 'demo_xml': [],
2344+ "website": 'http://www.andreacometa.it',
2345+ 'installable': True,
2346+ 'active': False,
2347+}
2348
2349=== added directory 'last_purchase_price_product/i18n'
2350=== added file 'last_purchase_price_product/i18n/last_purchase_price_product.pot'
2351--- last_purchase_price_product/i18n/last_purchase_price_product.pot 1970-01-01 00:00:00 +0000
2352+++ last_purchase_price_product/i18n/last_purchase_price_product.pot 2014-03-28 12:10:25 +0000
2353@@ -0,0 +1,26 @@
2354+# Translation of OpenERP Server.
2355+# This file contains the translation of the following modules:
2356+# * last_purchase_price_product
2357+#
2358+msgid ""
2359+msgstr ""
2360+"Project-Id-Version: OpenERP Server 6.1\n"
2361+"Report-Msgid-Bugs-To: \n"
2362+"POT-Creation-Date: 2012-12-14 09:48+0000\n"
2363+"PO-Revision-Date: 2012-12-14 09:48+0000\n"
2364+"Last-Translator: <>\n"
2365+"Language-Team: \n"
2366+"MIME-Version: 1.0\n"
2367+"Content-Type: text/plain; charset=UTF-8\n"
2368+"Content-Transfer-Encoding: \n"
2369+"Plural-Forms: \n"
2370+
2371+#. module: last_purchase_price_product
2372+#: help:product.template,cost_method:0
2373+msgid "Standard Price: the cost price is fixed and recomputed periodically (usually at the end of the year), Average Price: the cost price is recomputed at each reception of products, Last Purchase Price: the cost price is the price of last purchase of products."
2374+msgstr ""
2375+
2376+#. module: last_purchase_price_product
2377+#: selection:product.template,cost_method:0
2378+msgid "Last Purchase Price"
2379+msgstr ""
2380
2381=== added directory 'last_purchase_price_product/product'
2382=== added file 'last_purchase_price_product/product/__init__.py'
2383--- last_purchase_price_product/product/__init__.py 1970-01-01 00:00:00 +0000
2384+++ last_purchase_price_product/product/__init__.py 2014-03-28 12:10:25 +0000
2385@@ -0,0 +1,24 @@
2386+# -*- encoding: utf-8 -*-
2387+##############################################################################
2388+#
2389+# OpenERP, Open Source Management Solution
2390+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2391+# www.andreacometa.it
2392+# openerp@andreacometa.it
2393+#
2394+# This program is free software: you can redistribute it and/or modify
2395+# it under the terms of the GNU Affero General Public License as published by
2396+# the Free Software Foundation, either version 3 of the License, or
2397+# (at your option) any later version.
2398+#
2399+# This program is distributed in the hope that it will be useful,
2400+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2401+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2402+# GNU Affero General Public License for more details.
2403+#
2404+# You should have received a copy of the GNU Affero General Public License
2405+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2406+#
2407+##############################################################################
2408+
2409+import product
2410
2411=== added file 'last_purchase_price_product/product/product.py'
2412--- last_purchase_price_product/product/product.py 1970-01-01 00:00:00 +0000
2413+++ last_purchase_price_product/product/product.py 2014-03-28 12:10:25 +0000
2414@@ -0,0 +1,42 @@
2415+# -*- encoding: utf-8 -*-
2416+##############################################################################
2417+#
2418+# OpenERP, Open Source Management Solution
2419+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2420+# www.andreacometa.it
2421+# openerp@andreacometa.it
2422+#
2423+# This program is free software: you can redistribute it and/or modify
2424+# it under the terms of the GNU Affero General Public License as published by
2425+# the Free Software Foundation, either version 3 of the License, or
2426+# (at your option) any later version.
2427+#
2428+# This program is distributed in the hope that it will be useful,
2429+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2430+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2431+# GNU Affero General Public License for more details.
2432+#
2433+# You should have received a copy of the GNU Affero General Public License
2434+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2435+#
2436+##############################################################################
2437+
2438+from osv import osv, fields
2439+
2440+#----------------------------------------------------------
2441+# Products
2442+#----------------------------------------------------------
2443+class product_template(osv.osv):
2444+ _inherit = "product.template"
2445+
2446+ _columns = {
2447+ 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price'), ('lpp', 'Last Purchase Price')], 'Costing Method', required=True,
2448+ help="Standard Price: the cost price is fixed and recomputed periodically (usually at the end of the year), Average Price: the cost price is recomputed at each reception of products, Last Purchase Price: the cost price is the price of last purchase of products."),
2449+ }
2450+
2451+ _defaults = {
2452+ 'cost_method': 'standard',
2453+ }
2454+
2455+
2456+product_template()
2457
2458=== added file 'last_purchase_price_product/product/product_view.xml'
2459--- last_purchase_price_product/product/product_view.xml 1970-01-01 00:00:00 +0000
2460+++ last_purchase_price_product/product/product_view.xml 2014-03-28 12:10:25 +0000
2461@@ -0,0 +1,35 @@
2462+<?xml version="1.0" encoding="UTF-8"?>
2463+<openerp>
2464+ <data>
2465+
2466+ <record id="stock.view_product_standard_price_form" model="ir.ui.view">
2467+ <field name="name">product.normal.form.replace_standard_price</field>
2468+ <field name="model">product.product</field>
2469+ <field name="inherit_id" ref="product.product_normal_form_view"/>
2470+ <field name="type">form</field>
2471+ <field name="arch" type="xml">
2472+ <field name="standard_price" position="replace">
2473+ <label string="Cost Price:" align="1.0"/>
2474+ <group col="2" colspan="1">
2475+ <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
2476+ <button name="%(stock.action_view_change_standard_price)d" string="Update"
2477+ type="action" icon="gtk-execute" attrs="{'invisible':[('cost_method','!=','average')]}"/>
2478+ </group>
2479+ </field>
2480+ </field>
2481+ </record>
2482+
2483+ <record id="product_template_form_view_replace_standard_price" model="ir.ui.view">
2484+ <field name="name">product.template.product.form.replace_standard_price</field>
2485+ <field name="model">product.template</field>
2486+ <field name="inherit_id" ref="product.product_template_form_view"/>
2487+ <field name="type">form</field>
2488+ <field name="arch" type="xml">
2489+ <field name="standard_price" position="replace">
2490+ <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
2491+ </field>
2492+ </field>
2493+ </record>
2494+
2495+ </data>
2496+</openerp>
2497
2498=== added directory 'last_purchase_price_product/wizard'
2499=== added file 'last_purchase_price_product/wizard/__init__.py'
2500--- last_purchase_price_product/wizard/__init__.py 1970-01-01 00:00:00 +0000
2501+++ last_purchase_price_product/wizard/__init__.py 2014-03-28 12:10:25 +0000
2502@@ -0,0 +1,24 @@
2503+# -*- encoding: utf-8 -*-
2504+##############################################################################
2505+#
2506+# OpenERP, Open Source Management Solution
2507+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2508+# www.andreacometa.it
2509+# openerp@andreacometa.it
2510+#
2511+# This program is free software: you can redistribute it and/or modify
2512+# it under the terms of the GNU Affero General Public License as published by
2513+# the Free Software Foundation, either version 3 of the License, or
2514+# (at your option) any later version.
2515+#
2516+# This program is distributed in the hope that it will be useful,
2517+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2518+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2519+# GNU Affero General Public License for more details.
2520+#
2521+# You should have received a copy of the GNU Affero General Public License
2522+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2523+#
2524+##############################################################################
2525+
2526+import wizard_partial_picking
2527
2528=== added file 'last_purchase_price_product/wizard/wizard_partial_picking.py'
2529--- last_purchase_price_product/wizard/wizard_partial_picking.py 1970-01-01 00:00:00 +0000
2530+++ last_purchase_price_product/wizard/wizard_partial_picking.py 2014-03-28 12:10:25 +0000
2531@@ -0,0 +1,54 @@
2532+# -*- encoding: utf-8 -*-
2533+##############################################################################
2534+#
2535+# OpenERP, Open Source Management Solution
2536+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2537+# www.andreacometa.it
2538+# openerp@andreacometa.it
2539+#
2540+# This program is free software: you can redistribute it and/or modify
2541+# it under the terms of the GNU Affero General Public License as published by
2542+# the Free Software Foundation, either version 3 of the License, or
2543+# (at your option) any later version.
2544+#
2545+# This program is distributed in the hope that it will be useful,
2546+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2547+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2548+# GNU Affero General Public License for more details.
2549+#
2550+# You should have received a copy of the GNU Affero General Public License
2551+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2552+#
2553+##############################################################################
2554+
2555+from osv import osv
2556+
2557+class partial_picking(osv.osv_memory):
2558+
2559+ _inherit = 'stock.partial.picking'
2560+
2561+ def do_partial(self, cr, uid, ids, context=None):
2562+ if context is None:
2563+ context = {}
2564+ res = super(partial_picking, self).do_partial(cr, uid, ids, context=context)
2565+ pick_obj = self.pool.get('stock.picking')
2566+ purchase_obj = self.pool.get('purchase.order')
2567+ currency_obj = self.pool.get('res.currency')
2568+ picking_ids = context.get('active_ids', False)
2569+ partial = self.browse(cr, uid, ids[0], context=context)
2570+ pick_list = pick_obj.browse(cr, uid, picking_ids, context=context)
2571+ for pick in pick_list:
2572+ if pick.type == 'in' and pick.origin:
2573+ order_id = pick.purchase_id and pick.purchase_id.id or False
2574+ if order_id:
2575+ order = purchase_obj.browse(cr, uid, order_id)
2576+ for move in partial.move_ids:
2577+ if move.product_id.cost_method == 'lpp':
2578+ product_cost = 0.0
2579+ for line in order.order_line:
2580+ if line.product_id.id == move.product_id.id:
2581+ product_cost = currency_obj.compute(cr, uid, order.currency_id.id, order.company_id.currency_id.id, line.price_unit)
2582+ self.pool.get('product.product').write(cr, uid, [move.product_id.id], {'standard_price': product_cost})
2583+ return res
2584+
2585+partial_picking()
2586
2587=== added directory 'order_line_report_data'
2588=== added file 'order_line_report_data/__init__.py'
2589--- order_line_report_data/__init__.py 1970-01-01 00:00:00 +0000
2590+++ order_line_report_data/__init__.py 2014-03-28 12:10:25 +0000
2591@@ -0,0 +1,12 @@
2592+# -*- encoding: utf-8 -*-
2593+##############################################################################
2594+#
2595+# Personalizzazione realizzata da Andrea Cometa
2596+# Compatible with OpenERP release 6.0.0
2597+# Copyright (C) 2012 Andrea Cometa. All Rights Reserved.
2598+# Email: info@andreacometa.it
2599+# Web site: http://www.andreacometa.it
2600+#
2601+##############################################################################
2602+
2603+import sale
2604
2605=== added file 'order_line_report_data/__openerp__.py'
2606--- order_line_report_data/__openerp__.py 1970-01-01 00:00:00 +0000
2607+++ order_line_report_data/__openerp__.py 2014-03-28 12:10:25 +0000
2608@@ -0,0 +1,41 @@
2609+# -*- encoding: utf-8 -*-
2610+##############################################################################
2611+#
2612+# OpenERP, Open Source Management Solution
2613+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2614+# www.andreacometa.it
2615+# openerp@andreacometa.it
2616+#
2617+# This program is free software: you can redistribute it and/or modify
2618+# it under the terms of the GNU Affero General Public License as published by
2619+# the Free Software Foundation, either version 3 of the License, or
2620+# (at your option) any later version.
2621+#
2622+# This program is distributed in the hope that it will be useful,
2623+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2624+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2625+# GNU Affero General Public License for more details.
2626+#
2627+# You should have received a copy of the GNU Affero General Public License
2628+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2629+#
2630+##############################################################################
2631+
2632+{
2633+ 'name': 'Order Line Report Data',
2634+ 'version': '1.0',
2635+ 'category': 'Sale',
2636+ 'description': """ENG: This module allows you to insert report information in sale order line and manage them in your report\n
2637+ ITA: Questo modulo consente di inserire alcune informazioni utili ai report così da gestire meglio i dati nel report stesso.
2638+ """,
2639+ 'author': 'www.andreacometa.it',
2640+ 'website': 'http://www.andreacometa.it',
2641+ 'depends': ['sale'],
2642+ 'update_xml': [
2643+ 'sale_view.xml',
2644+ ],
2645+ 'installable': True,
2646+ 'active': False,
2647+ 'images' : ['images/order_line_report_note.jpg'],
2648+}
2649+
2650
2651=== added directory 'order_line_report_data/i18n'
2652=== added file 'order_line_report_data/i18n/it.po'
2653--- order_line_report_data/i18n/it.po 1970-01-01 00:00:00 +0000
2654+++ order_line_report_data/i18n/it.po 2014-03-28 12:10:25 +0000
2655@@ -0,0 +1,52 @@
2656+# Translation of OpenERP Server.
2657+# This file contains the translation of the following modules:
2658+# * invoice_line_report_data
2659+#
2660+msgid ""
2661+msgstr ""
2662+"Project-Id-Version: OpenERP Server 7.0\n"
2663+"Report-Msgid-Bugs-To: \n"
2664+"POT-Creation-Date: 2013-06-04 15:36+0000\n"
2665+"PO-Revision-Date: 2013-06-04 15:36+0000\n"
2666+"Last-Translator: <>\n"
2667+"Language-Team: \n"
2668+"MIME-Version: 1.0\n"
2669+"Content-Type: text/plain; charset=UTF-8\n"
2670+"Content-Transfer-Encoding: \n"
2671+"Plural-Forms: \n"
2672+
2673+#. module: invoice_line_report_data
2674+#: selection:account.invoice.line,report_line_type:0
2675+msgid "Product"
2676+msgstr "Prodotto"
2677+
2678+#. module: invoice_line_report_data
2679+#: selection:account.invoice.line,report_line_type:0
2680+msgid "Title"
2681+msgstr "Titolo"
2682+
2683+#. module: invoice_line_report_data
2684+#: view:account.invoice.line:0
2685+msgid "{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}"
2686+msgstr "{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}"
2687+
2688+#. module: invoice_line_report_data
2689+#: model:ir.model,name:invoice_line_report_data.model_account_invoice_line
2690+msgid "Invoice Line"
2691+msgstr "Righe Fattura"
2692+
2693+#. module: invoice_line_report_data
2694+#: selection:account.invoice.line,report_line_type:0
2695+msgid "Note"
2696+msgstr "Nota"
2697+
2698+#. module: invoice_line_report_data
2699+#: field:account.invoice.line,report_line_type:0
2700+msgid "Line Type"
2701+msgstr "Tipologia dettaglio"
2702+
2703+#. module: invoice_line_report_data
2704+#: selection:account.invoice.line,report_line_type:0
2705+msgid "Separator"
2706+msgstr "Separatore"
2707+
2708
2709=== added directory 'order_line_report_data/images'
2710=== added file 'order_line_report_data/images/order_line_report_note.png'
2711Binary files order_line_report_data/images/order_line_report_note.png 1970-01-01 00:00:00 +0000 and order_line_report_data/images/order_line_report_note.png 2014-03-28 12:10:25 +0000 differ
2712=== added file 'order_line_report_data/sale.py'
2713--- order_line_report_data/sale.py 1970-01-01 00:00:00 +0000
2714+++ order_line_report_data/sale.py 2014-03-28 12:10:25 +0000
2715@@ -0,0 +1,58 @@
2716+# -*- encoding: utf-8 -*-
2717+##############################################################################
2718+#
2719+# OpenERP, Open Source Management Solution
2720+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
2721+# www.andreacometa.it
2722+# openerp@andreacometa.it
2723+#
2724+# This program is free software: you can redistribute it and/or modify
2725+# it under the terms of the GNU Affero General Public License as published by
2726+# the Free Software Foundation, either version 3 of the License, or
2727+# (at your option) any later version.
2728+#
2729+# This program is distributed in the hope that it will be useful,
2730+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2731+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2732+# GNU Affero General Public License for more details.
2733+#
2734+# You should have received a copy of the GNU Affero General Public License
2735+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2736+#
2737+##############################################################################
2738+
2739+
2740+from osv import osv, fields
2741+import netsvc
2742+from tools.translate import _
2743+
2744+
2745+class sale_order_line(osv.osv):
2746+
2747+ _name = 'sale.order.line'
2748+ _inherit = 'sale.order.line'
2749+
2750+ def on_change_report_line_type(self, cr, uid, ids, report_line_type):
2751+ if not report_line_type in ('t', 'n', 's'):
2752+ return {}
2753+ return {'value': {
2754+ 'product_id': False,
2755+ 'product_uom_qty': 0.0,
2756+ 'product_uos_qty': 0.0,
2757+ 'price_unit': 0.0,
2758+ 'discount' : 0.00,
2759+ 'tax_id' : False,
2760+ }
2761+ }
2762+
2763+ _columns = {
2764+ 'report_line_type' : fields.selection(
2765+ (('p', 'Product'),('t', 'Title'),('n', 'Note'),('s', 'Separator')),
2766+ 'Line Type'),
2767+ }
2768+
2769+ _defaults = {
2770+ 'report_line_type' : 'p',
2771+ }
2772+
2773+sale_order_line()
2774
2775=== added file 'order_line_report_data/sale_view.xml'
2776--- order_line_report_data/sale_view.xml 1970-01-01 00:00:00 +0000
2777+++ order_line_report_data/sale_view.xml 2014-03-28 12:10:25 +0000
2778@@ -0,0 +1,39 @@
2779+<?xml version="1.0" encoding="utf-8"?>
2780+<openerp>
2781+ <data>
2782+
2783+ <record id="view_order_line_report_data_form" model="ir.ui.view">
2784+ <field name="name">order.line.report.data.form</field>
2785+ <field name="model">sale.order</field>
2786+ <field name="inherit_id" ref="sale.view_order_form"/>
2787+ <field name="arch" type="xml">
2788+ <label for="name" position="before">
2789+ <label for="report_line_type" />
2790+ <field name="report_line_type" colspan="4" on_change="on_change_report_line_type(report_line_type)"/>
2791+ </label>
2792+ <field name="product_id" position="attributes">
2793+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2794+ </field>
2795+ <field name="product_uom_qty" position="attributes">
2796+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2797+ </field>
2798+ <field name="product_uom" position="attributes">
2799+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2800+ </field>
2801+ <field name="product_uos_qty" position="attributes">
2802+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2803+ </field>
2804+ <field name="price_unit" position="attributes">
2805+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2806+ </field>
2807+ <field name="discount" position="attributes">
2808+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2809+ </field>
2810+ <field name="tax_id" position="attributes">
2811+ <attribute name="attrs">{'readonly':[('report_line_type', 'in', ('t', 'n', 's'))]}</attribute>
2812+ </field>
2813+ </field>
2814+ </record>
2815+
2816+ </data>
2817+</openerp>
2818
2819=== added directory 'partner_sequence'
2820=== added file 'partner_sequence/__init__.py'
2821--- partner_sequence/__init__.py 1970-01-01 00:00:00 +0000
2822+++ partner_sequence/__init__.py 2014-03-28 12:10:25 +0000
2823@@ -0,0 +1,24 @@
2824+# -*- coding: utf-8 -*-
2825+##############################################################################
2826+#
2827+# OpenERP, Open Source Management Solution
2828+# Copyright (C) 2012 Andrea Cometa All Rights Reserved
2829+# www.andreacometa.it
2830+# <openerp@andreacometa.it>
2831+#
2832+# This program is free software: you can redistribute it and/or modify
2833+# it under the terms of the GNU Affero General Public License as published
2834+# by the Free Software Foundation, either version 3 of the License, or
2835+# (at your option) any later version.
2836+#
2837+# This program is distributed in the hope that it will be useful,
2838+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2839+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2840+# GNU Affero General Public License for more details.
2841+#
2842+# You should have received a copy of the GNU Affero General Public License
2843+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2844+#
2845+##############################################################################
2846+
2847+import partner_sequence
2848
2849=== added file 'partner_sequence/__openerp__.py'
2850--- partner_sequence/__openerp__.py 1970-01-01 00:00:00 +0000
2851+++ partner_sequence/__openerp__.py 2014-03-28 12:10:25 +0000
2852@@ -0,0 +1,41 @@
2853+# -*- coding: utf-8 -*-
2854+##############################################################################
2855+#
2856+# OpenERP, Open Source Management Solution
2857+# Copyright (C) 2012 Andrea Cometa All Rights Reserved
2858+# www.andreacometa.it
2859+# <openerp@andreacometa.it>
2860+#
2861+# This program is free software: you can redistribute it and/or modify
2862+# it under the terms of the GNU Affero General Public License as published
2863+# by the Free Software Foundation, either version 3 of the License, or
2864+# (at your option) any later version.
2865+#
2866+# This program is distributed in the hope that it will be useful,
2867+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2868+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2869+# GNU Affero General Public License for more details.
2870+#
2871+# You should have received a copy of the GNU Affero General Public License
2872+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2873+#
2874+##############################################################################
2875+
2876+{
2877+ 'name': "Partner Sequence",
2878+ 'version': '1.0',
2879+ 'category': 'Base',
2880+ 'description': """
2881+ [ENG] Add automatic partner sequence on ref field
2882+ [ITA] Aggiunge la sequenza automatica nel campo rif del partner
2883+ """,
2884+ 'author': 'www.andreacometa.it',
2885+ 'website': 'http://www.andreacometa.it',
2886+ 'license': 'AGPL-3',
2887+ "depends": ['base'],
2888+ "data": [
2889+ 'partner_sequence.xml',
2890+ ],
2891+ "active": False,
2892+ "installable": True
2893+}
2894
2895=== added directory 'partner_sequence/i18n'
2896=== added file 'partner_sequence/i18n/it.po'
2897--- partner_sequence/i18n/it.po 1970-01-01 00:00:00 +0000
2898+++ partner_sequence/i18n/it.po 2014-03-28 12:10:25 +0000
2899@@ -0,0 +1,33 @@
2900+# Translation of OpenERP Server.
2901+# This file contains the translation of the following modules:
2902+# * partner_sequence
2903+#
2904+msgid ""
2905+msgstr ""
2906+"Project-Id-Version: OpenERP Server 6.1\n"
2907+"Report-Msgid-Bugs-To: \n"
2908+"POT-Creation-Date: 2013-06-03 13:36+0000\n"
2909+"PO-Revision-Date: 2013-06-03 13:36+0000\n"
2910+"Last-Translator: <>\n"
2911+"Language-Team: \n"
2912+"MIME-Version: 1.0\n"
2913+"Content-Type: text/plain; charset=UTF-8\n"
2914+"Content-Transfer-Encoding: \n"
2915+"Plural-Forms: \n"
2916+
2917+#. module: partner_sequence
2918+#: model:ir.model,name:partner_sequence.model_res_partner
2919+msgid "Partner"
2920+msgstr "Partner"
2921+
2922+#. module: partner_sequence
2923+#: sql_constraint:res.partner:0
2924+msgid "The reference must be unique"
2925+msgstr "Il riferimento deve essere unico"
2926+
2927+#. module: partner_sequence
2928+#: code:addons/partner_sequence/partner_sequence.py:62
2929+#, python-format
2930+msgid "-copy"
2931+msgstr "-copia"
2932+
2933
2934=== added file 'partner_sequence/i18n/partner_sequence.pot'
2935--- partner_sequence/i18n/partner_sequence.pot 1970-01-01 00:00:00 +0000
2936+++ partner_sequence/i18n/partner_sequence.pot 2014-03-28 12:10:25 +0000
2937@@ -0,0 +1,33 @@
2938+# Translation of OpenERP Server.
2939+# This file contains the translation of the following modules:
2940+# * partner_sequence
2941+#
2942+msgid ""
2943+msgstr ""
2944+"Project-Id-Version: OpenERP Server 6.1\n"
2945+"Report-Msgid-Bugs-To: \n"
2946+"POT-Creation-Date: 2013-06-03 13:36+0000\n"
2947+"PO-Revision-Date: 2013-06-03 13:36+0000\n"
2948+"Last-Translator: <>\n"
2949+"Language-Team: \n"
2950+"MIME-Version: 1.0\n"
2951+"Content-Type: text/plain; charset=UTF-8\n"
2952+"Content-Transfer-Encoding: \n"
2953+"Plural-Forms: \n"
2954+
2955+#. module: partner_sequence
2956+#: model:ir.model,name:partner_sequence.model_res_partner
2957+msgid "Partner"
2958+msgstr ""
2959+
2960+#. module: partner_sequence
2961+#: sql_constraint:res.partner:0
2962+msgid "The reference must be unique"
2963+msgstr ""
2964+
2965+#. module: partner_sequence
2966+#: code:addons/partner_sequence/partner_sequence.py:62
2967+#, python-format
2968+msgid "-copy"
2969+msgstr ""
2970+
2971
2972=== added file 'partner_sequence/partner_sequence.py'
2973--- partner_sequence/partner_sequence.py 1970-01-01 00:00:00 +0000
2974+++ partner_sequence/partner_sequence.py 2014-03-28 12:10:25 +0000
2975@@ -0,0 +1,70 @@
2976+# -*- coding: utf-8 -*-
2977+##############################################################################
2978+#
2979+# OpenERP, Open Source Management Solution
2980+# Copyright (C) 2012 Andrea Cometa All Rights Reserved
2981+# www.andreacometa.it
2982+# <openerp@andreacometa.it>
2983+#
2984+# This program is free software: you can redistribute it and/or modify
2985+# it under the terms of the GNU Affero General Public License as published
2986+# by the Free Software Foundation, either version 3 of the License, or
2987+# (at your option) any later version.
2988+#
2989+# This program is distributed in the hope that it will be useful,
2990+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2991+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2992+# GNU Affero General Public License for more details.
2993+#
2994+# You should have received a copy of the GNU Affero General Public License
2995+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2996+#
2997+##############################################################################
2998+
2999+from openerp.osv.orm import Model
3000+from openerp.osv import fields
3001+from openerp.tools.translate import _
3002+
3003+
3004+class res_partner(Model):
3005+ _inherit = 'res.partner'
3006+ _columns = {
3007+ 'ref': fields.char('Reference', size=64, select=1, required=True),
3008+ }
3009+ _sql_constraints = [
3010+ ('uniq_reference', 'unique(ref)', "The reference must be unique"),
3011+ ]
3012+ _defaults = {
3013+ 'ref': '/',
3014+ }
3015+
3016+ def create(self, cr, uid, vals, context=None):
3017+ if context is None:
3018+ context = {}
3019+ if not 'ref' in vals or vals['ref'] == '/':
3020+ vals['ref'] = self.pool.get('ir.sequence').get(
3021+ cr, uid, 'res.partner')
3022+ return super(res_partner, self).create(cr, uid, vals, context)
3023+
3024+ def write(self, cr, uid, ids, vals, context=None):
3025+ if context is None:
3026+ context = {}
3027+ partners_without_code = self.search(cr, uid, [
3028+ ('ref', 'in', [False, '/']), ('id', 'in', ids)], context=context)
3029+ direct_write_ids = set(ids) - set(partners_without_code)
3030+ super(res_partner, self).write(
3031+ cr, uid, list(direct_write_ids), vals, context)
3032+ for partner_id in partners_without_code:
3033+ vals['ref'] = self.pool.get('ir.sequence').get(
3034+ cr, uid, 'res.partner')
3035+ super(res_partner, self).write(cr, uid, partner_id, vals, context)
3036+ return True
3037+
3038+ def copy(self, cr, uid, id, default={}, context=None):
3039+ product = self.read(cr, uid, id, ['ref'], context=context)
3040+ if product['ref']:
3041+ default.update({
3042+ 'ref': product['ref'] + _('-copy'),
3043+ })
3044+
3045+ return super(res_partner, self).copy(cr, uid, id, default, context)
3046
3047=== added file 'partner_sequence/partner_sequence.xml'
3048--- partner_sequence/partner_sequence.xml 1970-01-01 00:00:00 +0000
3049+++ partner_sequence/partner_sequence.xml 2014-03-28 12:10:25 +0000
3050@@ -0,0 +1,15 @@
3051+<?xml version="1.0" encoding="UTF-8" ?>
3052+ <openerp>
3053+ <data noupdate="1">
3054+ <record model="ir.sequence.type" id="seq_type_res_partner">
3055+ <field name="name">Partner Sequence</field>
3056+ <field name="code">res.partner</field>
3057+ </record>
3058+ <record model="ir.sequence" id="seq_res_partner">
3059+ <field name="name">Partner Sequence</field>
3060+ <field name="code">res.partner</field>
3061+ <field name="prefix">P</field>
3062+ <field eval="5" name="padding"/>
3063+ </record>
3064+ </data>
3065+ </openerp>
3066
3067=== added directory 'partner_show_existed_name'
3068=== added directory 'partner_show_existed_name/.bzr.retired.0'
3069=== added file 'partner_show_existed_name/.bzr.retired.0/README'
3070--- partner_show_existed_name/.bzr.retired.0/README 1970-01-01 00:00:00 +0000
3071+++ partner_show_existed_name/.bzr.retired.0/README 2014-03-28 12:10:25 +0000
3072@@ -0,0 +1,3 @@
3073+This is a Bazaar control directory.
3074+Do not change any files in this directory.
3075+See http://bazaar-vcs.org/ for more information about Bazaar.
3076
3077=== added directory 'partner_show_existed_name/.bzr.retired.0/branch'
3078=== added file 'partner_show_existed_name/.bzr.retired.0/branch-format'
3079--- partner_show_existed_name/.bzr.retired.0/branch-format 1970-01-01 00:00:00 +0000
3080+++ partner_show_existed_name/.bzr.retired.0/branch-format 2014-03-28 12:10:25 +0000
3081@@ -0,0 +1,1 @@
3082+Bazaar-NG meta directory, format 1
3083
3084=== added directory 'partner_show_existed_name/.bzr.retired.0/branch-lock'
3085=== added file 'partner_show_existed_name/.bzr.retired.0/branch/branch.conf'
3086--- partner_show_existed_name/.bzr.retired.0/branch/branch.conf 1970-01-01 00:00:00 +0000
3087+++ partner_show_existed_name/.bzr.retired.0/branch/branch.conf 2014-03-28 12:10:25 +0000
3088@@ -0,0 +1,1 @@
3089+parent_location = bzr+ssh://bazaar@scigghia.dyndns.info:222/~/progetti_6.1/recupero_protocolli/
3090
3091=== added file 'partner_show_existed_name/.bzr.retired.0/branch/format'
3092--- partner_show_existed_name/.bzr.retired.0/branch/format 1970-01-01 00:00:00 +0000
3093+++ partner_show_existed_name/.bzr.retired.0/branch/format 2014-03-28 12:10:25 +0000
3094@@ -0,0 +1,1 @@
3095+Bazaar Branch Format 7 (needs bzr 1.6)
3096
3097=== added file 'partner_show_existed_name/.bzr.retired.0/branch/last-revision'
3098--- partner_show_existed_name/.bzr.retired.0/branch/last-revision 1970-01-01 00:00:00 +0000
3099+++ partner_show_existed_name/.bzr.retired.0/branch/last-revision 2014-03-28 12:10:25 +0000
3100@@ -0,0 +1,1 @@
3101+2 scigghia@asus-k50ij-20120907152444-siia40dqhv5g8i15
3102
3103=== added directory 'partner_show_existed_name/.bzr.retired.0/branch/lock'
3104=== added file 'partner_show_existed_name/.bzr.retired.0/branch/tags'
3105=== added directory 'partner_show_existed_name/.bzr.retired.0/checkout'
3106=== added file 'partner_show_existed_name/.bzr.retired.0/checkout/conflicts'
3107--- partner_show_existed_name/.bzr.retired.0/checkout/conflicts 1970-01-01 00:00:00 +0000
3108+++ partner_show_existed_name/.bzr.retired.0/checkout/conflicts 2014-03-28 12:10:25 +0000
3109@@ -0,0 +1,1 @@
3110+BZR conflict list format 1
3111
3112=== added file 'partner_show_existed_name/.bzr.retired.0/checkout/dirstate'
3113Binary files partner_show_existed_name/.bzr.retired.0/checkout/dirstate 1970-01-01 00:00:00 +0000 and partner_show_existed_name/.bzr.retired.0/checkout/dirstate 2014-03-28 12:10:25 +0000 differ
3114=== added file 'partner_show_existed_name/.bzr.retired.0/checkout/format'
3115--- partner_show_existed_name/.bzr.retired.0/checkout/format 1970-01-01 00:00:00 +0000
3116+++ partner_show_existed_name/.bzr.retired.0/checkout/format 2014-03-28 12:10:25 +0000
3117@@ -0,0 +1,1 @@
3118+Bazaar Working Tree Format 6 (bzr 1.14)
3119
3120=== added directory 'partner_show_existed_name/.bzr.retired.0/checkout/lock'
3121=== added file 'partner_show_existed_name/.bzr.retired.0/checkout/views'
3122=== added directory 'partner_show_existed_name/.bzr.retired.0/repository'
3123=== added file 'partner_show_existed_name/.bzr.retired.0/repository/format'
3124--- partner_show_existed_name/.bzr.retired.0/repository/format 1970-01-01 00:00:00 +0000
3125+++ partner_show_existed_name/.bzr.retired.0/repository/format 2014-03-28 12:10:25 +0000
3126@@ -0,0 +1,1 @@
3127+Bazaar repository format 2a (needs bzr 1.16 or later)
3128
3129=== added directory 'partner_show_existed_name/.bzr.retired.0/repository/indices'
3130=== added file 'partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.cix'
3131Binary files partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.cix 1970-01-01 00:00:00 +0000 and partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.cix 2014-03-28 12:10:25 +0000 differ
3132=== added file 'partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.iix'
3133Binary files partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.iix 1970-01-01 00:00:00 +0000 and partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.iix 2014-03-28 12:10:25 +0000 differ
3134=== added file 'partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.rix'
3135Binary files partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.rix 1970-01-01 00:00:00 +0000 and partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.rix 2014-03-28 12:10:25 +0000 differ
3136=== added file 'partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.six'
3137--- partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.six 1970-01-01 00:00:00 +0000
3138+++ partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.six 2014-03-28 12:10:25 +0000
3139@@ -0,0 +1,5 @@
3140+B+Tree Graph Index 2
3141+node_ref_lists=0
3142+key_elements=1
3143+len=0
3144+row_lengths=
3145
3146=== added file 'partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.tix'
3147Binary files partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.tix 1970-01-01 00:00:00 +0000 and partner_show_existed_name/.bzr.retired.0/repository/indices/cd43801276c08fdb17926a3e737ffb48.tix 2014-03-28 12:10:25 +0000 differ
3148=== added directory 'partner_show_existed_name/.bzr.retired.0/repository/lock'
3149=== added directory 'partner_show_existed_name/.bzr.retired.0/repository/obsolete_packs'
3150=== added file 'partner_show_existed_name/.bzr.retired.0/repository/pack-names'
3151Binary files partner_show_existed_name/.bzr.retired.0/repository/pack-names 1970-01-01 00:00:00 +0000 and partner_show_existed_name/.bzr.retired.0/repository/pack-names 2014-03-28 12:10:25 +0000 differ
3152=== added directory 'partner_show_existed_name/.bzr.retired.0/repository/packs'
3153=== added file 'partner_show_existed_name/.bzr.retired.0/repository/packs/cd43801276c08fdb17926a3e737ffb48.pack'
3154Binary files partner_show_existed_name/.bzr.retired.0/repository/packs/cd43801276c08fdb17926a3e737ffb48.pack 1970-01-01 00:00:00 +0000 and partner_show_existed_name/.bzr.retired.0/repository/packs/cd43801276c08fdb17926a3e737ffb48.pack 2014-03-28 12:10:25 +0000 differ
3155=== added directory 'partner_show_existed_name/.bzr.retired.0/repository/upload'
3156=== added file 'partner_show_existed_name/__init__.py'
3157--- partner_show_existed_name/__init__.py 1970-01-01 00:00:00 +0000
3158+++ partner_show_existed_name/__init__.py 2014-03-28 12:10:25 +0000
3159@@ -0,0 +1,24 @@
3160+# -*- encoding: utf-8 -*-
3161+##############################################################################
3162+#
3163+# OpenERP, Open Source Management Solution
3164+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
3165+# www.andreacometa.it
3166+# openerp@andreacometa.it
3167+#
3168+# This program is free software: you can redistribute it and/or modify
3169+# it under the terms of the GNU Affero General Public License as published by
3170+# the Free Software Foundation, either version 3 of the License, or
3171+# (at your option) any later version.
3172+#
3173+# This program is distributed in the hope that it will be useful,
3174+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3175+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3176+# GNU Affero General Public License for more details.
3177+#
3178+# You should have received a copy of the GNU Affero General Public License
3179+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3180+#
3181+##############################################################################
3182+
3183+import partner
3184
3185=== added file 'partner_show_existed_name/__openerp__.py'
3186--- partner_show_existed_name/__openerp__.py 1970-01-01 00:00:00 +0000
3187+++ partner_show_existed_name/__openerp__.py 2014-03-28 12:10:25 +0000
3188@@ -0,0 +1,42 @@
3189+# -*- encoding: utf-8 -*-
3190+##############################################################################
3191+#
3192+# OpenERP, Open Source Management Solution
3193+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
3194+# www.andreacometa.it
3195+# openerp@andreacometa.it
3196+#
3197+# This program is free software: you can redistribute it and/or modify
3198+# it under the terms of the GNU Affero General Public License as published by
3199+# the Free Software Foundation, either version 3 of the License, or
3200+# (at your option) any later version.
3201+#
3202+# This program is distributed in the hope that it will be useful,
3203+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3204+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3205+# GNU Affero General Public License for more details.
3206+#
3207+# You should have received a copy of the GNU Affero General Public License
3208+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3209+#
3210+##############################################################################
3211+
3212+{
3213+ 'name': 'partner_show_existing_name',
3214+ 'version': '1.0',
3215+ 'category': 'Custom',
3216+ 'description':
3217+ """
3218+ Modulo che indica, con un warning, se il nome del partner già esiste
3219+ Module that show, with a warning, if a partner name already exist'
3220+ """,
3221+ 'author': 'www.andreacometa.it',
3222+ 'website': 'http://www.andreacometa.it',
3223+ 'license': 'AGPL-3',
3224+ "active": False,
3225+ "installable": True,
3226+ "depends" : ['base'],
3227+ "update_xml" : [
3228+ 'partner/partner_view.xml',
3229+ ],
3230+}
3231
3232=== added directory 'partner_show_existed_name/partner'
3233=== added file 'partner_show_existed_name/partner/__init__.py'
3234--- partner_show_existed_name/partner/__init__.py 1970-01-01 00:00:00 +0000
3235+++ partner_show_existed_name/partner/__init__.py 2014-03-28 12:10:25 +0000
3236@@ -0,0 +1,24 @@
3237+# -*- encoding: utf-8 -*-
3238+##############################################################################
3239+#
3240+# OpenERP, Open Source Management Solution
3241+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
3242+# www.andreacometa.it
3243+# openerp@andreacometa.it
3244+#
3245+# This program is free software: you can redistribute it and/or modify
3246+# it under the terms of the GNU Affero General Public License as published by
3247+# the Free Software Foundation, either version 3 of the License, or
3248+# (at your option) any later version.
3249+#
3250+# This program is distributed in the hope that it will be useful,
3251+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3252+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3253+# GNU Affero General Public License for more details.
3254+#
3255+# You should have received a copy of the GNU Affero General Public License
3256+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3257+#
3258+##############################################################################
3259+
3260+import partner
3261
3262=== added file 'partner_show_existed_name/partner/partner.py'
3263--- partner_show_existed_name/partner/partner.py 1970-01-01 00:00:00 +0000
3264+++ partner_show_existed_name/partner/partner.py 2014-03-28 12:10:25 +0000
3265@@ -0,0 +1,41 @@
3266+# -*- coding: utf-8 -*-
3267+##############################################################################
3268+#
3269+# Copyright (C) 2013 Francesco OpenCode Apruzzese (<cescoap@gmail.com>)
3270+# All Rights Reserved
3271+#
3272+# This program is free software: you can redistribute it and/or modify
3273+# it under the terms of the GNU Affero General Public License as published
3274+# by the Free Software Foundation, either version 3 of the License, or
3275+# (at your option) any later version.
3276+#
3277+# This program is distributed in the hope that it will be useful,
3278+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3279+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3280+# GNU Affero General Public License for more details.
3281+#
3282+# You should have received a copy of the GNU Affero General Public License
3283+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3284+#
3285+##############################################################################
3286+
3287+from osv import fields, osv
3288+from tools.translate import _
3289+
3290+class res_partner(osv.osv):
3291+
3292+ _inherit = "res.partner"
3293+
3294+ def onchange_name(self, cr, uid, ids, name, context=None):
3295+ if not name:
3296+ return False
3297+ warning = {}
3298+ if not self.search(cr, uid, [('name', 'ilike', '%' + str(name) + '%')]):
3299+ return False
3300+ warning = {
3301+ 'title' : 'Attenzione!',
3302+ 'message' : 'Questo nome esiste già per un altro partner!'
3303+ }
3304+ return {'warning': warning}
3305+
3306+res_partner()
3307
3308=== added file 'partner_show_existed_name/partner/partner_view.xml'
3309--- partner_show_existed_name/partner/partner_view.xml 1970-01-01 00:00:00 +0000
3310+++ partner_show_existed_name/partner/partner_view.xml 2014-03-28 12:10:25 +0000
3311@@ -0,0 +1,17 @@
3312+<?xml version="1.0" encoding="utf-8"?>
3313+<openerp>
3314+ <data>
3315+
3316+ <record id="view_partner_partner_show_existed_name_form" model="ir.ui.view">
3317+ <field name="name">res.partner.partner_show_existed_name.form</field>
3318+ <field name="model">res.partner</field>
3319+ <field name="inherit_id" ref="base.view_partner_form"/>
3320+ <field name="arch" type="xml">
3321+ <field name="name" position="replace">
3322+ <field name="name" default_focus="1" placeholder="Name" on_change="onchange_name(name)"/>
3323+ </field>
3324+ </field>
3325+ </record>
3326+
3327+ </data>
3328+</openerp>
3329
3330=== added directory 'sequence_recovery'
3331=== added file 'sequence_recovery/__init__.py'
3332--- sequence_recovery/__init__.py 1970-01-01 00:00:00 +0000
3333+++ sequence_recovery/__init__.py 2014-03-28 12:10:25 +0000
3334@@ -0,0 +1,26 @@
3335+# -*- encoding: utf-8 -*-
3336+##############################################################################
3337+#
3338+# OpenERP, Open Source Management Solution
3339+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
3340+# www.andreacometa.it
3341+# openerp@andreacometa.it
3342+#
3343+# This program is free software: you can redistribute it and/or modify
3344+# it under the terms of the GNU Affero General Public License as published by
3345+# the Free Software Foundation, either version 3 of the License, or
3346+# (at your option) any later version.
3347+#
3348+# This program is distributed in the hope that it will be useful,
3349+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3350+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3351+# GNU Affero General Public License for more details.
3352+#
3353+# You should have received a copy of the GNU Affero General Public License
3354+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3355+#
3356+##############################################################################
3357+
3358+import base
3359+import account
3360+import stock
3361
3362=== added file 'sequence_recovery/__openerp__.py'
3363--- sequence_recovery/__openerp__.py 1970-01-01 00:00:00 +0000
3364+++ sequence_recovery/__openerp__.py 2014-03-28 12:10:25 +0000
3365@@ -0,0 +1,45 @@
3366+# -*- encoding: utf-8 -*-
3367+##############################################################################
3368+#
3369+# OpenERP, Open Source Management Solution
3370+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
3371+# www.andreacometa.it
3372+# openerp@andreacometa.it
3373+#
3374+# This program is free software: you can redistribute it and/or modify
3375+# it under the terms of the GNU Affero General Public License as published by
3376+# the Free Software Foundation, either version 3 of the License, or
3377+# (at your option) any later version.
3378+#
3379+# This program is distributed in the hope that it will be useful,
3380+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3381+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3382+# GNU Affero General Public License for more details.
3383+#
3384+# You should have received a copy of the GNU Affero General Public License
3385+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3386+#
3387+##############################################################################
3388+
3389+{
3390+ 'name': 'Sequence Recovery',
3391+ 'version': '1.0',
3392+ 'category': 'Sequences',
3393+ 'description':
3394+ """
3395+ [ENG] Is useful for sequences recovery eg from a deleted invoice.
3396+ [ITA] Modulo per la gestione del recupero dei buchi delle sequence (DDT, Fatture, etc.)
3397+ È sufficente ereditare l'unlink di una classe con sequence per ottenere la funzionalità di ripristino
3398+ """,
3399+ 'author': 'www.andreacometa.it',
3400+ 'website': 'http://www.andreacometa.it',
3401+ 'license': 'AGPL-3',
3402+ "active": False,
3403+ "installable": True,
3404+ "depends" : ['base'],
3405+ "update_xml" : [
3406+ 'base/sequence_view.xml',
3407+ 'security/sequence_recovery_security.xml',
3408+ 'security/ir.model.access.csv',
3409+ ],
3410+}
3411
3412=== added directory 'sequence_recovery/base'
3413=== added file 'sequence_recovery/base/__init__.py'
3414--- sequence_recovery/base/__init__.py 1970-01-01 00:00:00 +0000
3415+++ sequence_recovery/base/__init__.py 2014-03-28 12:10:25 +0000
3416@@ -0,0 +1,24 @@
3417+# -*- encoding: utf-8 -*-
3418+##############################################################################
3419+#
3420+# OpenERP, Open Source Management Solution
3421+# Copyright (c) 2012 Andrea Cometa All Rights Reserved.
3422+# www.andreacometa.it
3423+# openerp@andreacometa.it
3424+#
3425+# This program is free software: you can redistribute it and/or modify
3426+# it under the terms of the GNU Affero General Public License as published by
3427+# the Free Software Foundation, either version 3 of the License, or
3428+# (at your option) any later version.
3429+#
3430+# This program is distributed in the hope that it will be useful,
3431+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3432+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3433+# GNU Affero General Public License for more details.
3434+#
3435+# You should have received a copy of the GNU Affero General Public License
3436+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3437+#
3438+##############################################################################
3439+
3440+import sequence
3441
3442=== added file 'sequence_recovery/base/sequence.py'
3443--- sequence_recovery/base/sequence.py 1970-01-01 00:00:00 +0000
3444+++ sequence_recovery/base/sequence.py 2014-03-28 12:10:25 +0000
3445@@ -0,0 +1,105 @@
3446+# -*- coding: utf-8 -*-
3447+##############################################################################
3448+#
3449+# Copyright (C) 2014 Andrea Cometa - Perito informatico
3450+# All Rights Reserved
3451+#
3452+# This program is free software: you can redistribute it and/or modify
3453+# it under the terms of the GNU Affero General Public License as published
3454+# by the Free Software Foundation, either version 3 of the License, or
3455+# (at your option) any later version.
3456+#
3457+# This program is distributed in the hope that it will be useful,
3458+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3459+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3460+# GNU Affero General Public License for more details.
3461+#
3462+# You should have received a copy of the GNU Affero General Public License
3463+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3464+#
3465+##############################################################################
3466+
3467+from osv import fields, osv
3468+
3469+
3470+class ir_sequence_recovery(osv.osv):
3471+
3472+ _name = "ir.sequence_recovery"
3473+ _description = "ir.sequence_recovery"
3474+
3475+ _columns = {
3476+ 'name': fields.char('Class Name', size=32),
3477+ 'sequence_id': fields.many2one('ir.sequence', 'Sequence'),
3478+ 'sequence': fields.char('Sequence Number', size=32),
3479+ 'date': fields.date('Date'),
3480+ }
3481+
3482+ _defaults = {
3483+ 'date': fields.date.context_today,
3484+ }
3485+
3486+ _order = "date, sequence asc"
3487+
3488+ def set(self, cr, uid, ids, class_name, sequence_field='name',
3489+ sequence_code='', sequence_id=False, context=None):
3490+ # ----- init
3491+ class_obj = self.pool.get(class_name)
3492+ recovery_ids = []
3493+ # ----- Extract the sequence id if it's not passed
3494+ seq_id = sequence_id
3495+ if sequence_code and not sequence_id:
3496+ sequence_code_ids = self.pool.get('ir.sequence').search(
3497+ cr, uid, [('name', '=', sequence_code)])
3498+ if sequence_code_ids:
3499+ seq_id = sequence_code_ids[0]
3500+ # ----- For each record deleted save the parameters
3501+ for id in ids:
3502+ o = class_obj.browse(cr, uid, id)
3503+ sequence = o[sequence_field]
3504+ if sequence:
3505+ vals = {
3506+ 'name': class_name,
3507+ 'sequence': sequence,
3508+ 'sequence_id': seq_id,
3509+ }
3510+ recovery_id = self.create(cr, uid, vals, context)
3511+ recovery_ids.append(recovery_id)
3512+ return recovery_ids
3513+
3514+ir_sequence_recovery()
3515+
3516+
3517+class ir_sequence(osv.osv):
3518+
3519+ _name = "ir.sequence"
3520+ _inherit = "ir.sequence"
3521+
3522+ def next_by_id(self, cr, uid, sequence_id, context=None):
3523+ recovery_obj = self.pool.get('ir.sequence_recovery')
3524+ recovery_ids = recovery_obj.search(
3525+ cr, uid, [('sequence_id', '=', sequence_id)])
3526+ if recovery_ids:
3527+ # ----- If found it, it recoveries the sequence and return it
3528+ recovery_id = recovery_ids[0]
3529+ sequence = recovery_obj.browse(cr, uid, recovery_id).sequence
3530+ recovery_obj.unlink(cr, uid, recovery_id)
3531+ return sequence
3532+ else:
3533+ return super(ir_sequence, self).next_by_id(
3534+ cr, uid, sequence_id, context)
3535+
3536+ def next_by_code(self, cr, uid, sequence_code, context=None):
3537+ recovery_obj = self.pool.get('ir.sequence_recovery')
3538+ recovery_ids = recovery_obj.search(cr, uid,
3539+ [('name', '=', sequence_code)])
3540+ if recovery_ids:
3541+ # ----- If found it, it recoveries the sequence and return it
3542+ recovery_id = recovery_ids[0]
3543+ sequence = recovery_obj.browse(cr, uid, recovery_id).sequence
3544+ recovery_obj.unlink(cr, uid, recovery_id)
3545+ return sequence
3546+ else:
3547+ return super(ir_sequence, self).next_by_code(
3548+ cr, uid, sequence_code, context)
3549+
3550+ir_sequence()
3551
3552=== added file 'sequence_recovery/base/sequence_view.xml'
3553--- sequence_recovery/base/sequence_view.xml 1970-01-01 00:00:00 +0000
3554+++ sequence_recovery/base/sequence_view.xml 2014-03-28 12:10:25 +0000
3555@@ -0,0 +1,45 @@
3556+<?xml version="1.0" encoding="utf-8"?>
3557+<openerp>
3558+ <data>
3559+ <record id="sequence_recovery_tree_view" model="ir.ui.view">
3560+ <field name="name">ir.sequence_recovery.tree</field>
3561+ <field name="model">ir.sequence_recovery</field>
3562+ <field name="type">form</field>
3563+ <field name="arch" type="xml">
3564+ <tree string="Sequence Recovery" editable="top">
3565+ <field name="name"/>
3566+ <field name="sequence_id" />
3567+ <field name="sequence"/>
3568+ <field name="date"/>
3569+ </tree>
3570+ </field>
3571+ </record>
3572+
3573+ <record id="sequence_recovery_search" model="ir.ui.view">
3574+ <field name="name">ir.sequence_recovery.search</field>
3575+ <field name="model">ir.sequence_recovery</field>
3576+ <field name="type">search</field>
3577+ <field name="arch" type="xml">
3578+ <search string="Sequence Recovery">
3579+ <field name="name" select="1"/>
3580+ <field name="sequence_id" select="1"/>
3581+ <field name="sequence" select="1"/>
3582+ <field name="date" select="1"/>
3583+ </search>
3584+ </field>
3585+ </record>
3586+
3587+ <record id="action_sequence_recovery" model="ir.actions.act_window">
3588+ <field name="name">Sequence Recovery</field>
3589+ <field name="type">ir.actions.act_window</field>
3590+ <field name="res_model">ir.sequence_recovery</field>
3591+ <field name="view_type">form</field>
3592+ <field name="view_mode">tree,form</field>
3593+ <field name="view_id" ref="sequence_recovery_tree_view"/>
3594+ <field name="search_view_id" ref="sequence_recovery_search"/>
3595+ <field name="context">{}</field>
3596+ </record>
3597+
3598+ <menuitem string="Sequence Recovery" action="action_sequence_recovery" id="menu_sequence_recovery" parent="base.next_id_5"/>
3599+ </data>
3600+</openerp>
3601
3602=== added directory 'sequence_recovery/security'
3603=== added file 'sequence_recovery/security/ir.model.access.csv'
3604--- sequence_recovery/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
3605+++ sequence_recovery/security/ir.model.access.csv 2014-03-28 12:10:25 +0000
3606@@ -0,0 +1,4 @@
3607+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
3608+
3609+SR_ir_sequence_recovery_user,ir_sequence_recovery user,model_ir_sequence_recovery,group_sequence_recovery,1,0,1,1
3610+SR_ir_sequence_recovery_manager,ir_sequence_recovery manager,model_ir_sequence_recovery,group_sequence_recovery,1,0,1,1
3611
3612=== added file 'sequence_recovery/security/sequence_recovery_security.xml'
3613--- sequence_recovery/security/sequence_recovery_security.xml 1970-01-01 00:00:00 +0000
3614+++ sequence_recovery/security/sequence_recovery_security.xml 2014-03-28 12:10:25 +0000
3615@@ -0,0 +1,10 @@
3616+<?xml version="1.0" encoding="utf-8"?>
3617+<openerp>
3618+ <data>
3619+
3620+ <record id="group_sequence_recovery" model="res.groups">
3621+ <field name="name">Sequence Recovery/User</field>
3622+ </record>
3623+
3624+ </data>
3625+</openerp>

Subscribers

People subscribed via source and target branches