Merge lp:~agilebg/openobject-italia/adding_l10n_it_bill_of_entry into lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0

Proposed by Lorenzo Battistini
Status: Merged
Merged at revision: 228
Proposed branch: lp:~agilebg/openobject-italia/adding_l10n_it_bill_of_entry
Merge into: lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0
Diff against target: 662 lines (+609/-0)
10 files modified
l10n_it_bill_of_entry/AUTHORS.txt (+3/-0)
l10n_it_bill_of_entry/__init__.py (+26/-0)
l10n_it_bill_of_entry/__openerp__.py (+78/-0)
l10n_it_bill_of_entry/account_invoice.py (+139/-0)
l10n_it_bill_of_entry/account_invoice_view.xml (+50/-0)
l10n_it_bill_of_entry/company.py (+41/-0)
l10n_it_bill_of_entry/company_view.xml (+25/-0)
l10n_it_bill_of_entry/i18n/it.po (+181/-0)
l10n_it_bill_of_entry/wizard/__init__.py (+24/-0)
l10n_it_bill_of_entry/wizard/select_template.py (+42/-0)
To merge this branch: bzr merge lp:~agilebg/openobject-italia/adding_l10n_it_bill_of_entry
Reviewer Review Type Date Requested Status
Davide Corio (community) Approve
Review via email: mp+193422@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Davide Corio (enlightx-deactivatedaccount) wrote :

limitatamente al lato funzionale, per me il modulo è ok.
non ho approfondito l'aspetto tecnico.

review: Approve
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Apps mi dice

l10n_it_bill_of_entry: unmet dependency account_invoice_template for series 7.0

Dovremmo velocizzare il processo di merge del relativo modulo:
https://code.launchpad.net/~agilebg/account-invoicing/7.0-add_account_invoice_template/+merge/194733

Vi invito quindi a fare review

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'l10n_it_bill_of_entry'
2=== added file 'l10n_it_bill_of_entry/AUTHORS.txt'
3--- l10n_it_bill_of_entry/AUTHORS.txt 1970-01-01 00:00:00 +0000
4+++ l10n_it_bill_of_entry/AUTHORS.txt 2013-10-31 14:05:17 +0000
5@@ -0,0 +1,3 @@
6+Alex Comba <alex.comba@agilebg.com>
7+Lorenzo Battistini <lorenzo.battistini@agilebg.com>
8+
9
10=== added file 'l10n_it_bill_of_entry/__init__.py'
11--- l10n_it_bill_of_entry/__init__.py 1970-01-01 00:00:00 +0000
12+++ l10n_it_bill_of_entry/__init__.py 2013-10-31 14:05:17 +0000
13@@ -0,0 +1,26 @@
14+# -*- encoding: utf-8 -*-
15+##############################################################################
16+#
17+# Copyright (C) 2013 Agile Business Group sagl
18+# (<http://www.agilebg.com>)
19+# Copyright (C) 2013
20+# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
21+#
22+# This program is free software: you can redistribute it and/or modify
23+# it under the terms of the GNU Affero General Public License as published by
24+# the Free Software Foundation, either version 3 of the License, or
25+# (at your option) any later version.
26+#
27+# This program is distributed in the hope that it will be useful,
28+# but WITHOUT ANY WARRANTY; without even the implied warranty of
29+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30+# GNU General Public License for more details.
31+#
32+# You should have received a copy of the GNU General Public License
33+# along with this program. If not, see <http://www.gnu.org/licenses/>.
34+#
35+##############################################################################
36+
37+import account_invoice
38+import wizard
39+import company
40
41=== added file 'l10n_it_bill_of_entry/__openerp__.py'
42--- l10n_it_bill_of_entry/__openerp__.py 1970-01-01 00:00:00 +0000
43+++ l10n_it_bill_of_entry/__openerp__.py 2013-10-31 14:05:17 +0000
44@@ -0,0 +1,78 @@
45+# -*- coding: utf-8 -*-
46+##############################################################################
47+#
48+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
49+# Copyright (C) 2013
50+# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
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 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+ 'name': 'Italian Localisation - Bill of Entry',
68+ 'version': '0.1',
69+ 'category': 'Localisation/Italy',
70+ 'description': """
71+Bolle doganali
72+===============
73+
74+Specifiche
75+----------
76+
77+http://wiki.openerp-italia.org/doku.php/area_utente/requisiti/extraue
78+
79+Ci sono 3 documenti coinvolti:
80+
81+ - Fattura fornitore
82+ - Fattura spedizioniere
83+ - Bolla doganale
84+
85+Le relazioni:
86+
87+N bolle doganali -> N fatture fornitore
88+1 fattura spedizioniere -> N bolle doganali
89+
90+Configurazione
91+--------------
92+
93+E' necessario configurare in contabilità il sezionale da utilizzare per il
94+giroconto di chiusura.
95+
96+Utilizzo
97+--------
98+
99+Dalla bolla doganale è possibile collegare manualmente la (o le) fattura(e)
100+fornitore corrispondente.
101+
102+Dalla fattura spedizioniere è possibile generare la (o le) bolla(e) doganale(i)
103+tramite il bottone 'genera bolla'. Per questa operazione bisogna prima configurare
104+un template di fattura (usato per la bolla doganale).
105+
106+Nella fattura spedizioniere bisogna indicare quale (o quali) riga (righe)
107+rappresenti(no) l'IVA anticipata alla dogana.
108+
109+Alla conferma della fattura spedizioniere, verrà generata la scrittura contabile di giroconto per chiudere la bolla doganale.
110+
111+""",
112+ 'author': 'Agile Business Group',
113+ 'website': 'http://www.agilebg.com',
114+ 'license': 'AGPL-3',
115+ "depends": ['base', 'account_invoice_template'],
116+ "data": [
117+ 'account_invoice_view.xml',
118+ 'company_view.xml',
119+ ],
120+ "demo": [],
121+ "installable": True
122+}
123
124=== added file 'l10n_it_bill_of_entry/account_invoice.py'
125--- l10n_it_bill_of_entry/account_invoice.py 1970-01-01 00:00:00 +0000
126+++ l10n_it_bill_of_entry/account_invoice.py 2013-10-31 14:05:17 +0000
127@@ -0,0 +1,139 @@
128+# -*- coding: utf-8 -*-
129+##############################################################################
130+#
131+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
132+# Copyright (C) 2013
133+# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
134+#
135+# This program is free software: you can redistribute it and/or modify
136+# it under the terms of the GNU Affero General Public License as published
137+# by the Free Software Foundation, either version 3 of the License, or
138+# (at your option) any later version.
139+#
140+# This program is distributed in the hope that it will be useful,
141+# but WITHOUT ANY WARRANTY; without even the implied warranty of
142+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
143+# GNU General Public License for more details.
144+#
145+# You should have received a copy of the GNU Affero General Public License
146+# along with this program. If not, see <http://www.gnu.org/licenses/>.
147+#
148+##############################################################################
149+
150+from openerp.osv import fields, orm
151+from openerp.tools.translate import _
152+
153+
154+class account_invoice(orm.Model):
155+ _inherit = "account.invoice"
156+
157+ _columns = {
158+ 'customs_doc_type': fields.selection([
159+ ('bill_of_entry', 'Bill of Entry'),
160+ ('supplier_invoice', 'Supplier Invoice'),
161+ ('forwarder_invoice', 'Forwarder Invoice'),
162+ ], 'Customs Doc Type', readonly=True),
163+ 'supplier_bill_of_entry_ids': fields.many2many('account.invoice', 'sboe_invoice_rel', 'sboe_id', 'invoice_id', 'Supplier Bill of Entries', readonly=True),
164+ 'supplier_invoice_ids': fields.many2many('account.invoice', 'sboe_invoice_rel', 'invoice_id', 'sboe_id', 'Supplier Invoices'),
165+ 'forwarder_invoice_id': fields.many2one('account.invoice', 'Forwarder Invoice'),
166+ 'forwarder_bill_of_entry_ids': fields.one2many('account.invoice', 'forwarder_invoice_id', 'Forward Bill of Entries', readonly=True),
167+ 'bill_of_entry_storno_id': fields.many2one('account.move', 'Bill of Entry Storno', readonly=True),
168+ }
169+
170+ def action_move_create(self, cr, uid, ids, context=None):
171+ res = super(account_invoice,self).action_move_create(cr, uid, ids, context=context)
172+ move_obj = self.pool.get('account.move')
173+ move_line_obj = self.pool.get('account.move.line')
174+ period_obj = self.pool.get('account.period')
175+ for invoice in self.browse(cr, uid, ids, context):
176+ if invoice.customs_doc_type == 'forwarder_invoice':
177+ for bill_of_entry in invoice.forwarder_bill_of_entry_ids:
178+ if bill_of_entry.state not in ('open', 'paid'):
179+ raise orm.except_orm(_('Error'), _('Bill of entry %s is in state %s')
180+ % (bill_of_entry.partner_id.name, bill_of_entry.state))
181+ advance_customs_vat_line = False
182+ if invoice.forwarder_bill_of_entry_ids:
183+ for line in invoice.invoice_line:
184+ if line.advance_customs_vat:
185+ advance_customs_vat_line = True
186+ break
187+ if not advance_customs_vat_line:
188+ raise orm.except_orm(_('Error'),
189+ _("Forwarder invoice %s does not have lines with 'Adavance Customs Vat'")
190+ % invoice.number)
191+ if not invoice.company_id.bill_of_entry_journal_id:
192+ raise orm.except_orm(_('Error'), _('No Bill of entry Storno journal configured'))
193+ period_ids = period_obj.find(cr, uid, dt=invoice.date_invoice, context=context)
194+ move_vals = {
195+ 'period_id': period_ids and period_ids[0] or False,
196+ 'journal_id': invoice.company_id.bill_of_entry_journal_id.id,
197+ 'date': invoice.date_invoice,
198+ }
199+ move_lines = []
200+ for inv_line in invoice.invoice_line:
201+ if inv_line.advance_customs_vat:
202+ move_lines.append((0, 0, {
203+ 'name': _("Customs expenses"),
204+ 'account_id': inv_line.account_id.id,
205+ 'debit': 0.0,
206+ 'credit': inv_line.price_subtotal,
207+ }))
208+ for bill_of_entry in invoice.forwarder_bill_of_entry_ids:
209+ move_lines.append((0, 0, {
210+ 'name': _("Customs supplier"),
211+ 'account_id': bill_of_entry.account_id.id,
212+ 'debit': bill_of_entry.amount_total,
213+ 'credit': 0.0,
214+ 'partner_id': bill_of_entry.partner_id.id,
215+ }))
216+ for boe_line in bill_of_entry.invoice_line:
217+ tax_code_id = False
218+ if boe_line.invoice_line_tax_id:
219+ if len(boe_line.invoice_line_tax_id) > 1:
220+ raise osv.except_osv(_('Error'),
221+ _("Can't handle more than 1 tax for line %s") % boe_line.name)
222+ tax_code_id = (boe_line.invoice_line_tax_id[0].base_code_id
223+ and boe_line.invoice_line_tax_id[0].base_code_id.id or False)
224+ line_vals = {
225+ 'name': _("Extra CEE expenses"),
226+ 'account_id': boe_line.account_id.id,
227+ 'debit': 0.0,
228+ 'credit': boe_line.price_subtotal,
229+ }
230+ if tax_code_id:
231+ line_vals['tax_code_id'] = tax_code_id
232+ line_vals['tax_amount'] = boe_line.price_subtotal
233+ move_lines.append((0, 0, line_vals))
234+ move_vals['line_id'] = move_lines
235+ move_id = move_obj.create(cr, uid, move_vals, context=context)
236+ invoice.write({'bill_of_entry_storno_id': move_id}, context=context)
237+
238+ reconcile_ids = []
239+ for move_line in move_obj.browse(cr, uid, move_id, context).line_id:
240+ for bill_of_entry in invoice.forwarder_bill_of_entry_ids:
241+ if move_line.account_id.id == bill_of_entry.account_id.id:
242+ reconcile_ids.append(move_line.id)
243+ for boe_move_line in bill_of_entry.move_id.line_id:
244+ if boe_move_line.account_id.id == bill_of_entry.account_id.id:
245+ reconcile_ids.append(boe_move_line.id)
246+ move_line_obj.reconcile_partial(cr, uid, reconcile_ids, type='auto',
247+ context=context)
248+ return res
249+
250+ def action_cancel(self, cr, uid, ids, context=None):
251+ account_move_obj = self.pool.get('account.move')
252+ res = super(account_invoice,self).action_cancel(cr, uid, ids, context=context)
253+ for invoice in self.browse(cr, uid, ids, context):
254+ if invoice.bill_of_entry_storno_id:
255+ account_move_obj.button_cancel(cr, uid, [invoice.bill_of_entry_storno_id.id],
256+ context=context)
257+ account_move_obj.unlink(cr, uid, [invoice.bill_of_entry_storno_id.id],
258+ context=context)
259+ return res
260+
261+class account_invoice_line(orm.Model):
262+ _inherit = "account.invoice.line"
263+
264+ _columns = {
265+ 'advance_customs_vat': fields.boolean("Advance Customs Vat"),
266+ }
267
268=== added file 'l10n_it_bill_of_entry/account_invoice_view.xml'
269--- l10n_it_bill_of_entry/account_invoice_view.xml 1970-01-01 00:00:00 +0000
270+++ l10n_it_bill_of_entry/account_invoice_view.xml 2013-10-31 14:05:17 +0000
271@@ -0,0 +1,50 @@
272+<?xml version="1.0" encoding="utf-8"?>
273+<openerp>
274+ <data>
275+
276+ <record model="ir.ui.view" id="invoice_supplier_form">
277+ <field name="name">account.invoice.supplier.form</field>
278+ <field name="model">account.invoice</field>
279+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
280+ <field name="arch" type="xml">
281+ <xpath expr="//field[@name='journal_id']" position="after">
282+ <field name="customs_doc_type" attrs="{'readonly': ['|',('state', '!=', 'draft'), ('forwarder_bill_of_entry_ids', '!=', [])]}"/>
283+ </xpath>
284+ <xpath expr="//notebook/page[@string='Payments']" position="after">
285+ <page string="Customs" attrs="{'invisible': [('customs_doc_type','=', False)]}">
286+ <separator string="Bill of entries" colspan="4" attrs="{'invisible': [('customs_doc_type','!=', 'supplier_invoice')]}"></separator>
287+ <field name="supplier_bill_of_entry_ids" attrs="{'invisible': [('customs_doc_type','!=', 'supplier_invoice')]}" />
288+ <separator string="Supplier invoices" colspan="4" attrs="{'invisible': [('customs_doc_type','!=', 'bill_of_entry')]}"></separator>
289+ <field name="supplier_invoice_ids" attrs="{'invisible': [('customs_doc_type','!=', 'bill_of_entry')]}" domain="[('customs_doc_type', '=', 'supplier_invoice')]" context="{'default_customs_doc_type': 'supplier_invoice'}"/>
290+ <group>
291+ <field name="forwarder_invoice_id" attrs="{'invisible': [('customs_doc_type','!=', 'bill_of_entry')]}" domain="[('customs_doc_type','=', 'forwarder_invoice')]" context="{'default_customs_doc_type': 'forwarder_invoice'}"/>
292+ </group>
293+ <separator string="Bill of entries" colspan="4" attrs="{'invisible': [('customs_doc_type','!=', 'forwarder_invoice')]}"></separator>
294+ <field name="forwarder_bill_of_entry_ids" attrs="{'invisible': [('customs_doc_type','!=', 'forwarder_invoice')]}"/>
295+ <group>
296+ <field name="bill_of_entry_storno_id" attrs="{'invisible': [('customs_doc_type','!=', 'forwarder_invoice')]}"/>
297+ </group>
298+ <button string="Make Bill of Entry" name="%(account_invoice_template.action_wizard_select_template)d" type="action" class="oe_highlight" attrs="{'invisible': ['|',('customs_doc_type','!=', 'forwarder_invoice'),('state','!=','draft')]}"/>
299+ </page>
300+ </xpath>
301+ <xpath expr="//notebook/page[@string='Invoice']/field[@name='invoice_line']/tree/field[@name='price_subtotal']" position="after">
302+ <!--It seems attrs doesn't work -->
303+ <field name="advance_customs_vat"/>
304+ </xpath>
305+ </field>
306+ </record>
307+ <record model="ir.ui.view" id="invoice_form_boe">
308+ <field name="name">account.invoice.form.boe</field>
309+ <field name="model">account.invoice.line</field>
310+ <field name="inherit_id" ref="account.view_invoice_line_form"/>
311+ <field name="arch" type="xml">
312+ <field name="name" position="after">
313+ <group>
314+ <field name="advance_customs_vat"/>
315+ </group>
316+ </field>
317+ </field>
318+ </record>
319+
320+ </data>
321+</openerp>
322
323=== added file 'l10n_it_bill_of_entry/company.py'
324--- l10n_it_bill_of_entry/company.py 1970-01-01 00:00:00 +0000
325+++ l10n_it_bill_of_entry/company.py 2013-10-31 14:05:17 +0000
326@@ -0,0 +1,41 @@
327+# -*- coding: utf-8 -*-
328+##############################################################################
329+#
330+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
331+# Copyright (C) 2013
332+# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
333+#
334+# This program is free software: you can redistribute it and/or modify
335+# it under the terms of the GNU Affero General Public License as published
336+# by the Free Software Foundation, either version 3 of the License, or
337+# (at your option) any later version.
338+#
339+# This program is distributed in the hope that it will be useful,
340+# but WITHOUT ANY WARRANTY; without even the implied warranty of
341+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
342+# GNU General Public License for more details.
343+#
344+# You should have received a copy of the GNU Affero General Public License
345+# along with this program. If not, see <http://www.gnu.org/licenses/>.
346+#
347+##############################################################################
348+
349+from openerp.osv import fields, orm
350+
351+class res_company(orm.Model):
352+ _inherit = 'res.company'
353+ _columns = {
354+ 'bill_of_entry_journal_id': fields.many2one('account.journal','Bill of entry Storno journal',
355+ help="Journal used for reconciliation of customs supplier"),
356+ }
357+
358+class account_config_settings(orm.TransientModel):
359+ _inherit = 'account.config.settings'
360+ _columns = {
361+ 'bill_of_entry_journal_id': fields.related(
362+ 'company_id', 'bill_of_entry_journal_id',
363+ type='many2one',
364+ relation="account.journal",
365+ string="Bill of entry Storno journal",
366+ help='Journal used for reconciliation of customs supplier'),
367+ }
368
369=== added file 'l10n_it_bill_of_entry/company_view.xml'
370--- l10n_it_bill_of_entry/company_view.xml 1970-01-01 00:00:00 +0000
371+++ l10n_it_bill_of_entry/company_view.xml 2013-10-31 14:05:17 +0000
372@@ -0,0 +1,25 @@
373+<?xml version="1.0" encoding="utf-8"?>
374+<openerp>
375+ <data>
376+
377+ <record id="view_account_config_settings" model="ir.ui.view">
378+ <field name="name">view_account_config_settings</field>
379+ <field name="model">account.config.settings</field>
380+ <field name="inherit_id" ref="account.view_account_config_settings"/>
381+ <field name="arch" type="xml">
382+ <xpath expr="/form/group[6]" position="after">
383+ <separator string="Bill of entry"/>
384+ <group name="Bill of entry">
385+ <label for="id" string="Configuration"/>
386+ <div>
387+ <div>
388+ <label for="bill_of_entry_journal_id"/>
389+ <field name="bill_of_entry_journal_id" class="oe_inline"/>
390+ </div>
391+ </div>
392+ </group>
393+ </xpath>
394+ </field>
395+ </record>
396+ </data>
397+</openerp>
398
399=== added directory 'l10n_it_bill_of_entry/i18n'
400=== added file 'l10n_it_bill_of_entry/i18n/it.po'
401--- l10n_it_bill_of_entry/i18n/it.po 1970-01-01 00:00:00 +0000
402+++ l10n_it_bill_of_entry/i18n/it.po 2013-10-31 14:05:17 +0000
403@@ -0,0 +1,181 @@
404+# Translation of OpenERP Server.
405+# This file contains the translation of the following modules:
406+# * l10n_it_bill_of_entry
407+#
408+msgid ""
409+msgstr ""
410+"Project-Id-Version: OpenERP Server 7.0\n"
411+"Report-Msgid-Bugs-To: \n"
412+"POT-Creation-Date: 2013-07-18 18:13+0000\n"
413+"PO-Revision-Date: 2013-07-18 20:17+0100\n"
414+"Last-Translator: Lorenzo Battistini <lorenzo.battistini@agilebg.com>\n"
415+"Language-Team: \n"
416+"MIME-Version: 1.0\n"
417+"Content-Type: text/plain; charset=UTF-8\n"
418+"Content-Transfer-Encoding: 8bit\n"
419+"Plural-Forms: \n"
420+"X-Generator: Poedit 1.5.4\n"
421+
422+#. module: l10n_it_bill_of_entry
423+#: view:account.invoice:0
424+msgid "Supplier invoices"
425+msgstr "Fatture fornitore"
426+
427+#. module: l10n_it_bill_of_entry
428+#: field:account.invoice,customs_doc_type:0
429+msgid "Customs Doc Type"
430+msgstr "Tipo documento doganale"
431+
432+#. module: l10n_it_bill_of_entry
433+#: model:ir.model,name:l10n_it_bill_of_entry.model_account_config_settings
434+msgid "account.config.settings"
435+msgstr "account.config.settings"
436+
437+#. module: l10n_it_bill_of_entry
438+#: selection:account.invoice,customs_doc_type:0
439+msgid "Supplier Invoice"
440+msgstr "Fattura fornitore"
441+
442+#. module: l10n_it_bill_of_entry
443+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:62
444+#, python-format
445+msgid "Forwarder invoice %s does not have lines with 'Adavance Customs Vat'"
446+msgstr "La fattura fornitore %s non ha riga con 'IVA anticipata'"
447+
448+#. module: l10n_it_bill_of_entry
449+#: field:account.invoice,bill_of_entry_storno_id:0
450+msgid "Bill of Entry Storno"
451+msgstr "Storno bolla doganale"
452+
453+#. module: l10n_it_bill_of_entry
454+#: selection:account.invoice,customs_doc_type:0
455+msgid "Bill of Entry"
456+msgstr "Bolla doganale"
457+
458+#. module: l10n_it_bill_of_entry
459+#: field:account.invoice,supplier_invoice_ids:0
460+msgid "Supplier Invoices"
461+msgstr "Fatture fornitore"
462+
463+#. module: l10n_it_bill_of_entry
464+#: view:account.invoice:0
465+msgid "Make Bill of Entry"
466+msgstr "Genera bolla doganale"
467+
468+#. module: l10n_it_bill_of_entry
469+#: field:account.invoice,supplier_bill_of_entry_ids:0
470+msgid "Supplier Bill of Entries"
471+msgstr "Bolle doganali fornitore"
472+
473+#. module: l10n_it_bill_of_entry
474+#: view:account.invoice:0
475+msgid "Customs"
476+msgstr "Dogana"
477+
478+#. module: l10n_it_bill_of_entry
479+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:98
480+#, python-format
481+msgid "Extra CEE expenses"
482+msgstr "Uscite extra CEE"
483+
484+#. module: l10n_it_bill_of_entry
485+#: view:account.invoice:0
486+msgid "Bill of entries"
487+msgstr "Bolle doganali"
488+
489+#. module: l10n_it_bill_of_entry
490+#: view:account.config.settings:0
491+msgid "Configuration"
492+msgstr "Configurazione"
493+
494+#. module: l10n_it_bill_of_entry
495+#: view:account.config.settings:0
496+msgid "Bill of entry"
497+msgstr "Bolla doganale"
498+
499+#. module: l10n_it_bill_of_entry
500+#: field:account.config.settings,bill_of_entry_journal_id:0
501+#: field:res.company,bill_of_entry_journal_id:0
502+msgid "Bill of entry Storno journal"
503+msgstr "Sezionale di storno bolla doganale"
504+
505+#. module: l10n_it_bill_of_entry
506+#: model:ir.model,name:l10n_it_bill_of_entry.model_res_company
507+msgid "Companies"
508+msgstr "Aziende"
509+
510+#. module: l10n_it_bill_of_entry
511+#: help:account.config.settings,bill_of_entry_journal_id:0
512+#: help:res.company,bill_of_entry_journal_id:0
513+msgid "Journal used for reconciliation of customs supplier"
514+msgstr "Sezionale usato per la riconciliazione del fotnirore dogana"
515+
516+#. module: l10n_it_bill_of_entry
517+#: field:account.invoice,forwarder_bill_of_entry_ids:0
518+msgid "Forward Bill of Entries"
519+msgstr "Bolla doganale spedizioniere"
520+
521+#. module: l10n_it_bill_of_entry
522+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:52
523+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:61
524+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:65
525+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:93
526+#, python-format
527+msgid "Error"
528+msgstr "Errore"
529+
530+#. module: l10n_it_bill_of_entry
531+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:83
532+#, python-format
533+msgid "Customs supplier"
534+msgstr "Fornitore dogana"
535+
536+#. module: l10n_it_bill_of_entry
537+#: selection:account.invoice,customs_doc_type:0
538+#: field:account.invoice,forwarder_invoice_id:0
539+msgid "Forwarder Invoice"
540+msgstr "Fatture spedizioniere"
541+
542+#. module: l10n_it_bill_of_entry
543+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:52
544+#, python-format
545+msgid "Bill of entry %s is in state %s"
546+msgstr "La bolla doganale %s è in stato %s"
547+
548+#. module: l10n_it_bill_of_entry
549+#: model:ir.model,name:l10n_it_bill_of_entry.model_account_invoice_line
550+msgid "Invoice Line"
551+msgstr "Righe Fattura"
552+
553+#. module: l10n_it_bill_of_entry
554+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:76
555+#, python-format
556+msgid "Customs expenses"
557+msgstr "Spese doganali"
558+
559+#. module: l10n_it_bill_of_entry
560+#: model:ir.model,name:l10n_it_bill_of_entry.model_wizard_select_invoice_template
561+msgid "wizard.select.invoice.template"
562+msgstr "wizard.select.invoice.template"
563+
564+#. module: l10n_it_bill_of_entry
565+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:94
566+#, python-format
567+msgid "Can't handle more than 1 tax for line %s"
568+msgstr "Impossibile gestire più di un'imposta per la riga %s"
569+
570+#. module: l10n_it_bill_of_entry
571+#: model:ir.model,name:l10n_it_bill_of_entry.model_account_invoice
572+msgid "Invoice"
573+msgstr "Fattura"
574+
575+#. module: l10n_it_bill_of_entry
576+#: field:account.invoice.line,advance_customs_vat:0
577+msgid "Advance Customs Vat"
578+msgstr "IVA doganale anticipata"
579+
580+#. module: l10n_it_bill_of_entry
581+#: code:addons/l10n_it_bill_of_entry/account_invoice.py:65
582+#, python-format
583+msgid "No Bill of entry Storno journal configured"
584+msgstr "Nessun sezionale di storno bolla doganale configurato"
585
586=== added directory 'l10n_it_bill_of_entry/security'
587=== added directory 'l10n_it_bill_of_entry/wizard'
588=== added file 'l10n_it_bill_of_entry/wizard/__init__.py'
589--- l10n_it_bill_of_entry/wizard/__init__.py 1970-01-01 00:00:00 +0000
590+++ l10n_it_bill_of_entry/wizard/__init__.py 2013-10-31 14:05:17 +0000
591@@ -0,0 +1,24 @@
592+# -*- encoding: utf-8 -*-
593+##############################################################################
594+#
595+# Copyright (C) 2013 Agile Business Group sagl
596+# (<http://www.agilebg.com>)
597+# Copyright (C) 2013
598+# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
599+#
600+# This program is free software: you can redistribute it and/or modify
601+# it under the terms of the GNU Affero General Public License as published by
602+# the Free Software Foundation, either version 3 of the License, or
603+# (at your option) any later version.
604+#
605+# This program is distributed in the hope that it will be useful,
606+# but WITHOUT ANY WARRANTY; without even the implied warranty of
607+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
608+# GNU General Public License for more details.
609+#
610+# You should have received a copy of the GNU General Public License
611+# along with this program. If not, see <http://www.gnu.org/licenses/>.
612+#
613+##############################################################################
614+
615+import select_template
616
617=== added file 'l10n_it_bill_of_entry/wizard/select_template.py'
618--- l10n_it_bill_of_entry/wizard/select_template.py 1970-01-01 00:00:00 +0000
619+++ l10n_it_bill_of_entry/wizard/select_template.py 2013-10-31 14:05:17 +0000
620@@ -0,0 +1,42 @@
621+# -*- coding: utf-8 -*-
622+##############################################################################
623+#
624+# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
625+# Copyright (C) 2013
626+# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
627+#
628+# This program is free software: you can redistribute it and/or modify
629+# it under the terms of the GNU Affero General Public License as published
630+# by the Free Software Foundation, either version 3 of the License, or
631+# (at your option) any later version.
632+#
633+# This program is distributed in the hope that it will be useful,
634+# but WITHOUT ANY WARRANTY; without even the implied warranty of
635+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
636+# GNU General Public License for more details.
637+#
638+# You should have received a copy of the GNU Affero General Public License
639+# along with this program. If not, see <http://www.gnu.org/licenses/>.
640+#
641+##############################################################################
642+
643+from openerp.osv import fields, osv, orm
644+from openerp.tools.translate import _
645+
646+
647+class wizard_select_invoice_template(orm.TransientModel):
648+ _inherit = "wizard.select.invoice.template"
649+
650+ def load_template(self, cr, uid, ids, context=None):
651+ res = super(wizard_select_invoice_template, self).load_template(cr, uid, ids, context=context)
652+ if context.get('active_model') == 'account.invoice':
653+ invoice = self.pool.get('account.invoice').browse(cr, uid,
654+ context.get('active_id'), context=context)
655+ if invoice and invoice.customs_doc_type == 'forwarder_invoice':
656+ invoice_id = res['res_id']
657+ invoice_obj = self.pool.get('account.invoice')
658+ invoice_obj.write(cr, uid, invoice_id, {
659+ 'customs_doc_type': 'bill_of_entry',
660+ 'forwarder_invoice_id': context.get('active_id')
661+ }, context=context)
662+ return res

Subscribers

People subscribed via source and target branches