diff --git a/addons/account/account.py b/addons/account/account.py index 1f8428527ae..00d2ec3dcba 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1032,6 +1032,7 @@ class account_tax_code(osv.osv): _name = 'account.tax.code' _description = 'Tax Code' + _rec_name = 'code' _columns = { 'name': fields.char('Tax Case Name', size=64, required=True), 'code': fields.char('Case Code', size=16), @@ -1681,6 +1682,7 @@ class account_tax_code_template(osv.osv): _name = 'account.tax.code.template' _description = 'Tax Code Template' _order = 'code' + _rec_name = 'code' _columns = { 'name': fields.char('Tax Case Name', size=64, required=True), 'code': fields.char('Case Code', size=16), diff --git a/addons/account/account_wizard.xml b/addons/account/account_wizard.xml index 7be194e2f65..96a2c417739 100644 --- a/addons/account/account_wizard.xml +++ b/addons/account/account_wizard.xml @@ -86,6 +86,9 @@ + + + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 4b9ab3f10d5..73642c15c2e 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -857,26 +857,11 @@ class account_invoice_line(osv.osv): taxep=None lang=self.pool.get('res.partner').read(cr, uid, [partner_id])[0]['lang'] tax_obj = self.pool.get('account.tax') + part = self.pool.get('res.partner').browse(cr, uid, partner_id) if type in ('out_invoice', 'out_refund'): - part = self.pool.get('res.partner').browse(cr, uid, partner_id) - taxep = part.property_account_position and part.property_account_position.account_tax - if not taxep or not taxep.id: - tax_id = map(lambda x: x.id, res.taxes_id) - else: - tax_id = [taxep.id] - for t in res.taxes_id: - if not t.tax_group==taxep.tax_group: - tax_id.append(t.id) + tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, part, res.taxes_id) else: - part = self.pool.get('res.partner').browse(cr, uid, partner_id) - taxep = part.property_account_position and part.property_account_position.account_supplier_tax - if not taxep or not taxep.id: - tax_id = map(lambda x: x.id, res.supplier_taxes_id) - else: - tax_id = [taxep.id] - for t in res.supplier_taxes_id: - if not t.tax_group==taxep.tax_group: - tax_id.append(t.id) + tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, part, res.supplier_taxes_id) if type in ('in_invoice', 'in_refund'): result = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit, qty, address_invoice_id, product, partner_id, context=context) else: diff --git a/addons/account/partner.py b/addons/account/partner.py index fbb4839f452..6049e4df483 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -37,16 +37,24 @@ class account_fiscal_position(osv.osv): _columns = { 'name': fields.char('Fiscal Position', size=64, translate=True, required=True), 'company_id': fields.many2one('res.company', 'Company'), - 'account_tax': fields.many2one( - 'account.tax', 'Customer Tax', - help="This account will be used as the receivable account for partners in this position", - ), - 'account_supplier_tax': fields.many2one( - 'account.tax', 'Supplier Tax', - help="This account will be used as the payable account for partners in this position", - ), - 'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Accounts Mapping') + 'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Accounts Mapping'), + 'tax_ids': fields.one2many('account.fiscal.position.tax', 'position_id', 'Taxes Mapping') } + def map_tax(self, cr, uid, partner, taxes, context={}): + if (not partner) or (not partner.property_account_position) : + return taxes + result = [] + for t in taxes: + ok = False + for tax in partner.property_account_position.tax_ids: + if tax.tax_src_id.id==t.id: + if tax.tax_dest_id: + result.append(tax.tax_dest_id.id) + ok=True + if not ok: + result.append(t.id) + return result + def map_account(self, cr, uid, partner, account_id, context={}): if (not partner) or (not partner.property_account_position) : return account_id @@ -58,6 +66,18 @@ class account_fiscal_position(osv.osv): account_fiscal_position() +class account_fiscal_position_tax(osv.osv): + _name = 'account.fiscal.position.tax' + _description = 'Fiscal Position Taxes Mapping' + _rec_name = 'position_id' + _columns = { + 'position_id': fields.many2one('account.fiscal.position', 'Fiscal Position', required=True, ondelete='cascade'), + 'tax_src_id': fields.many2one('account.tax', 'Tax Source', required=True), + 'tax_dest_id': fields.many2one('account.tax', 'Replacement Tax') + } +account_fiscal_position_tax() + + class account_fiscal_position_account(osv.osv): _name = 'account.fiscal.position.account' _description = 'Fiscal Position Accounts Mapping' diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index bfe4e80ced0..d99175f1c30 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -11,8 +11,16 @@ - - + + + + + +
+ + + + diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index 5076fbaba87..11252b0707a 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -45,12 +45,28 @@ class journal_print(report_sxw.rml_parse): 'sum_credit': self._sum_credit }) - def lines(self, period_id, journal_id, *args): + def lines(self, period_id, journal_id, sort_selection='date', *args): + if type(period_id)==type([]): + ids_final = [] + for journal in journal_id: + for period in period_id: + ids_journal_period = self.pool.get('account.journal.period').search(self.cr,self.uid, [('journal_id','=',journal),('period_id','=',period)]) + if ids_journal_period: + self.cr.execute('update account_journal_period set state=%s where journal_id=%d and period_id=%d and state=%s', ('printed',journal,period,'draft')) + self.cr.commit() + self.cr.execute('select id from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\' order by ('+ sort_selection +'),id', (period, journal)) + ids = map(lambda x: x[0], self.cr.fetchall()) + ids_final.append(ids) + line_ids = [] + for line_id in ids_final: + a = self.pool.get('account.move.line').browse(self.cr, self.uid, line_id ) + line_ids.append(a) + return line_ids self.cr.execute('update account_journal_period set state=%s where journal_id=%d and period_id=%d and state=%s', ('printed',journal_id,period_id,'draft')) self.cr.commit() self.cr.execute('select id from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\' order by date,id', (period_id, journal_id)) ids = map(lambda x: x[0], self.cr.fetchall()) - return self.pool.get('account.move.line').browse(self.cr, self.uid, ids) + return self.pool.get('account.move.line').browse(self.cr, self.uid, ids ) def _sum_debit(self, period_id, journal_id): self.cr.execute('select sum(debit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id)) @@ -60,7 +76,7 @@ class journal_print(report_sxw.rml_parse): self.cr.execute('select sum(credit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id)) return self.cr.fetchone()[0] or 0.0 report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print,header=False) - +report_sxw.report_sxw('report.account.journal.period.print.wiz', 'account.journal.period', 'addons/account/report/wizard_account_journal.rml', parser=journal_print,header=False) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/wizard_account_journal.rml b/addons/account/report/wizard_account_journal.rml new file mode 100644 index 00000000000..def6acbecb8 --- /dev/null +++ b/addons/account/report/wizard_account_journal.rml @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[ repeatIn(objects, 'o') ]] + + [[repeatIn(lines(data['form']['period_id'][0][2],data['form']['journal_id'][0][2],data['form']['sort_selection']), 'line') ]] + + + Date + + + Voucher No + + + A/c No. + + + Third party + + + Entry label + + + Debit + + + Credit + + + + + [[line[0].period_id.name ]] + + + [[line[0].journal_id.code ]] + + + + + [[ '%.2f' % sum_debit(line[0].period_id.id, line[0].journal_id.id) or '0.00' ]] + + + [[ '%.2f' % sum_credit(line[0].period_id.id, line[0].journal_id.id) or '0.00' ]] + + + + [[repeatIn(line,'l')]] + + [[ l.date ]] + + + [[ l.ref ]] + + + [[ l.account_id.code ]] + + + [[ l.partner_id and l.partner_id.name ]] + + + [[ l.name ]] + + + [[ l.debit and '%.2f' % l.debit or '0.00' ]] + + + [[ l.credit and '%.2f' % l.credit or '0.00' ]] + + + + + + + + \ No newline at end of file diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index 18183dd0313..c8d0c7d5cae 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -76,6 +76,8 @@ "access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0 "access_account_journal_product_manager","account.journal product manager","model_account_journal","product.group_product_manager",1,0,0,0 "access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,1,1,1 "access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0 +"access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,1,1,1 +"access_account_fiscal_position_tax","account.fiscal.position.tax all","model_account_fiscal_position_tax","base.group_user",1,0,0,0 +"access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,1,1,1 "access_account_fiscal_position_account","account.fiscal.position all","model_account_fiscal_position_account","base.group_user",1,0,0,0 diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py index 6ecd2040756..3cae8e78a95 100644 --- a/addons/account/wizard/__init__.py +++ b/addons/account/wizard/__init__.py @@ -64,6 +64,7 @@ import wizard_use_model import wizard_state_open import wizard_statement_from_invoice +import wizard_print_journal # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/wizard_print_journal.py b/addons/account/wizard/wizard_print_journal.py new file mode 100644 index 00000000000..d9440a8a231 --- /dev/null +++ b/addons/account/wizard/wizard_print_journal.py @@ -0,0 +1,71 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved. +# +# $Id$ +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsability of assessing all potential +# consequences resulting from its eventual inadequacies and bugs +# End users who are looking for a ready-to-use solution with commercial +# garantees and support are strongly adviced to contract a Free Software +# Service Company +# +# This program is Free Software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################## + +import wizard +import pooler + +form = ''' +
+ + + +''' + +fields = { + 'journal_id': {'string': 'Journal', 'type': 'many2many', 'relation': 'account.journal', 'required': True}, + 'period_id': {'string': 'Period', 'type': 'many2many', 'relation': 'account.period', 'required': True}, + 'sort_selection':{ + 'string':"Entries Sorted By", + 'type':'selection', + 'selection':[('date','By date'),('ref','Reference Number')], + 'required':True, + 'default': lambda *a: 'date', + }, + +} + +def print_journal(self, cr, uid, data, context): + return {} + +class wizard_print_journal(wizard.interface): + states = { + 'init': { + 'actions': [], + 'result': {'type': 'form', 'arch': form, 'fields': fields, 'state': (('end', 'Cancel'), ('print', 'Print'))}, + }, + 'print': { + 'actions': [print_journal], + 'result': {'type':'print', 'report':'account.journal.period.print.wiz', 'state':'end'}, + }, + } +wizard_print_journal('account.print.journal.report') + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py index 2fc73c68649..203f249178b 100644 --- a/addons/account_report/report/print_indicator.py +++ b/addons/account_report/report/print_indicator.py @@ -164,7 +164,6 @@ class accounting_report_indicator(report_sxw.rml_parse): def test1(self,data,object,intercall=False): - obj_history=self.pool.get('account.report.history') if data['select_base']=='year': @@ -233,13 +232,13 @@ class accounting_report_indicator(report_sxw.rml_parse): # drawing.save(formats=['png'],fnRoot=path+str(self.count),title="helo") # renderPM.drawToFile(drawing1, 'example1.jpg','jpg') import os - dirname ='Temp_images' - path=os.path.join(tools.config['root_path'],dirname,"Image") + path=tools.config['addons_path']+"/account_report/tmp_images/image" - if not os.path.isdir(tools.config['root_path']+ "/"+dirname + '/'): - os.mkdir(tools.config['root_path'] +"/"+ dirname + '/') - os.path.join(tools.config['root_path'],dirname,"/") - can = canvas.init('Image'+str(self.count)+".png") + dirname =tools.config['addons_path']+'/account_report/tmp_images/' + if not os.path.isdir(dirname): + os.mkdir(dirname) + + can = canvas.init('image'+str(self.count)+".png") # can.clip(0,0,600,400) data=zip(self.header_name,self.header_val) @@ -252,8 +251,8 @@ class accounting_report_indicator(report_sxw.rml_parse): ar.draw() can.close() - os.system('cp '+'Image'+str(self.count)+'.png ' +path+str(self.count)+'.png') - os.system('rm '+'Image'+str(self.count)+'.png') + os.system('cp '+'image'+str(self.count)+'.png ' +path+str(self.count)+'.png') + os.system('rm '+'image'+str(self.count)+'.png') # can.endclip() return path+str(self.count)+'.png' diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py index b85180df04a..5b1ab81decc 100644 --- a/addons/delivery/stock.py +++ b/addons/delivery/stock.py @@ -85,25 +85,13 @@ class stock_picking(osv.osv): taxes = self.pool.get('account.tax').browse(cursor, user, [x.id for x in picking.carrier_id.product_id.taxes_id]) - taxep = None partner_id=picking.address_id.partner_id and picking.address_id.partner_id.id or False + taxes_ids = [x.id for x in picking.carrier_id.product_id.taxes_id] if partner_id: - print 'Found Partner' partner = picking.address_id.partner_id taxep = partner.property_account_position and partner.property_account_position.account_tax - print account_id account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, partner, account_id) - print account_id - - if not taxep or not taxep.id: - taxes_ids = [x.id for x in picking.carrier_id.product_id.taxes_id] - else: - res5 = [taxep.id] - for t in taxes: - if not t.tax_group==taxep.tax_group: - res5.append(t.id) - taxes_ids = res5 - + taxes_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, partner, picking.carrier_id.product_id.taxes_id) invoice_line_obj.create(cursor, user, { 'name': picking.carrier_id.name, diff --git a/addons/l10n_be/account_pcmn_belgium.xml b/addons/l10n_be/account_pcmn_belgium.xml index d7252313333..1951975d618 100644 --- a/addons/l10n_be/account_pcmn_belgium.xml +++ b/addons/l10n_be/account_pcmn_belgium.xml @@ -59,7 +59,6 @@ none - @@ -6434,7 +6433,7 @@ - Plan de Taxe Belge + Plan de Taxes Belge I. Valeur des operations diff --git a/addons/l10n_lu/__terp__.py b/addons/l10n_lu/__terp__.py index 1391158f678..49761b3fdb5 100644 --- a/addons/l10n_lu/__terp__.py +++ b/addons/l10n_lu/__terp__.py @@ -12,9 +12,11 @@ This module install: *the main taxes used in Luxembourg""", "depends" : ["account","account_report","base_vat","base_iban"], "init_xml" : [ ], - "demo_xml" : [ "account.report.report.csv" ], + "demo_xml" : ["account.report.report.csv"], "update_xml" : [ + "account.tax.code.template.csv", "l10n_lu_data.xml", + "account.tax.template.csv", "l10n_lu_wizard.xml", "l10n_lu_report.xml", ], diff --git a/addons/l10n_lu/account.tax.code.template.csv b/addons/l10n_lu/account.tax.code.template.csv new file mode 100644 index 00000000000..eea68172e6c --- /dev/null +++ b/addons/l10n_lu/account.tax.code.template.csv @@ -0,0 +1,90 @@ +"parent_id:id","code","sign","id","name" +,,1,"account_tax_code_template_1","Plan de Taxes Luxembourgeois" +"account_tax_code_template_1",76,1,"account_tax_code_template_73","Solde à verser" +"account_tax_code_template_1",10,-1,"account_tax_code_template_8","Prestations de services (art 26)" +"account_tax_code_template_1",46,1,"account_tax_code_template_37","Total Base intracommunautaire" +"account_tax_code_template_1",52,1,"account_tax_code_template_50","Acquisition triangulaire" +"account_tax_code_template_1",61,1,"account_tax_code_template_63","Total Base Importation" +"account_tax_code_template_1",74,1,"account_tax_code_template_71","Excédent de taxe" +"account_tax_code_template_1",9,1,"account_tax_code_template_2","Total du chiffre d'affaires" +"account_tax_code_template_2",5,1,"account_tax_code_template_5","Prélèvements privés de services (art 16)" +"account_tax_code_template_2",4,1,"account_tax_code_template_4","Prélèvements privés de biens (art 13 a)" +"account_tax_code_template_2",8,1,"account_tax_code_template_7","Point 5" +"account_tax_code_template_2",3,1,"account_tax_code_template_3","1. Ventes ou recettes" +"account_tax_code_template_2",6,1,"account_tax_code_template_6","Affectation de biens (art 13 b)" +"account_tax_code_template_3","Exo",1,"account_tax_code_template_90","Total Exoneration" +"account_tax_code_template_3",22,1,"account_tax_code_template_17","Chiffre d'affaires imposable (sans TVA)" +"account_tax_code_template_8",422,1,"account_tax_code_template_87","Base des prestations de services (art.26/1/c et d)" +"account_tax_code_template_8",92,1,"account_tax_code_template_78","Livraisons de biens (art. 26) 6%" +"account_tax_code_template_17",33,1,"account_tax_code_template_28","Base CA 6%" +"account_tax_code_template_17",32,1,"account_tax_code_template_27","Base CA 15%" +"account_tax_code_template_17",82,1,"account_tax_code_template_31","Base CA au taux indéfini" +"account_tax_code_template_17",35,1,"account_tax_code_template_30","Base CA 12%" +"account_tax_code_template_17",34,1,"account_tax_code_template_29","Base CA 3%" +"account_tax_code_template_37",44,1,"account_tax_code_template_40","Base intracom. 3%" +"account_tax_code_template_37",85,1,"account_tax_code_template_42","Base intracom. exonérée" +"account_tax_code_template_37",43,1,"account_tax_code_template_39","Base intracom. 6%" +"account_tax_code_template_37",42,1,"account_tax_code_template_38","Base intracom. 15%" +"account_tax_code_template_37",45,1,"account_tax_code_template_41","Base intracom. 12%" +"account_tax_code_template_73",97,1,"account_tax_code_template_82","Taxe livraisons de biens (art. 26) 6%" +"account_tax_code_template_90",19,1,"account_tax_code_template_16","Point 7" +"account_tax_code_template_90",17,1,"account_tax_code_template_15","Autres opérations réalisées à l'étranger" +"account_tax_code_template_90",13,1,"account_tax_code_template_11","Autres exonérations (art 43)" +"account_tax_code_template_90",14,1,"account_tax_code_template_12","Autres exonérations (art 44)" +"account_tax_code_template_90",11,1,"account_tax_code_template_9","Livraisons intracommunautaires de biens" +"account_tax_code_template_90",12,1,"account_tax_code_template_10","Exportations (art 43)" +"account_tax_code_template_90",15,1,"account_tax_code_template_13","Tabacs fabriqués" +"account_tax_code_template_90",16,1,"account_tax_code_template_14","Livraisons / aquisitions intracom." +"account_tax_code_template_71",73,-1,"account_tax_code_template_70","Taxe en amont déductible" +"account_tax_code_template_71",98,1,"account_tax_code_template_83","Total de la taxe à payer" +"account_tax_code_template_83",72,1,"account_tax_code_template_69","Total de la taxe" +"account_tax_code_template_70",31,1,"account_tax_code_template_26","Taxe en amont déductible" +"account_tax_code_template_26",27,1,"account_tax_code_template_22","Taxe déclarée comme débiteur" +"account_tax_code_template_26",28,1,"account_tax_code_template_23","Taxe acquittée comme caution solidaire" +"account_tax_code_template_26",29,-1,"account_tax_code_template_24","Taxe non déductible / op. exonérée" +"account_tax_code_template_26",30,-1,"account_tax_code_template_25","Taxe non déductible (art 50)" +"account_tax_code_template_26",23,1,"account_tax_code_template_18","Achat de B. et S. à l'intérieur du pays" +"account_tax_code_template_26",24,1,"account_tax_code_template_19","Acquisitions intracom. de biens" +"account_tax_code_template_26",26,1,"account_tax_code_template_21","Affectations de biens" +"account_tax_code_template_26",25,1,"account_tax_code_template_20","Importations de biens" +"account_tax_code_template_69",70,1,"account_tax_code_template_59","Total Taxe Importation (entr.)" +"account_tax_code_template_69",219,1,"account_tax_code_template_88","Taxe des prestations de services (art.26/1/c et d)" +"account_tax_code_template_69",87,1,"account_tax_code_template_44","Report" +"account_tax_code_template_44",86,1,"account_tax_code_template_43","A reporter" +"account_tax_code_template_43",51,1,"account_tax_code_template_49","Total Taxe intracom." +"account_tax_code_template_49",47,1,"account_tax_code_template_45","Taxe intracom. 15%" +"account_tax_code_template_49",81,1,"account_tax_code_template_53","Base à un taux exonéré" +"account_tax_code_template_49",59,1,"account_tax_code_template_62","Base Importation (privées) 3%" +"account_tax_code_template_49",50,1,"account_tax_code_template_48","Taxe intracom. 12%" +"account_tax_code_template_49",48,1,"account_tax_code_template_46","taxe intracom. 6%" +"account_tax_code_template_49",49,1,"account_tax_code_template_47","Taxe intracom. 3%" +"account_tax_code_template_49",65,1,"account_tax_code_template_58","Taxe Importation (entr.) 12%" +"account_tax_code_template_69",71,1,"account_tax_code_template_68","Total Taxe Importation (privées)" +"account_tax_code_template_58",63,1,"account_tax_code_template_84","Taxe importation (entr.) 6%" +"account_tax_code_template_58",64,1,"account_tax_code_template_57","Taxe Importation (entr.) 3%" +"account_tax_code_template_58",62,1,"account_tax_code_template_56","Taxe Importation (entr.) 15%" +"account_tax_code_template_63",58,1,"account_tax_code_template_61","Base Importation (privées) 6%" +"account_tax_code_template_63",54,1,"account_tax_code_template_52","Base Importation (entr.) 6%" +"account_tax_code_template_63",57,1,"account_tax_code_template_60","Base Importation (privées) 15%" +"account_tax_code_template_63",56,1,"account_tax_code_template_55","Base Importation (entr.) 12%" +"account_tax_code_template_63",55,1,"account_tax_code_template_54","Base Importation (entr.) 3%" +"account_tax_code_template_63",53,1,"account_tax_code_template_51","Base importation (entr.) 15%" +"account_tax_code_template_63",60,1,"account_tax_code_template_85","Base importation (privées.) 12%" +"account_tax_code_template_68",68,1,"account_tax_code_template_66","Taxe Importation (privées) 3%" +"account_tax_code_template_68",69,1,"account_tax_code_template_67","Taxe Importation (privées) 12%" +"account_tax_code_template_68",67,1,"account_tax_code_template_65","Taxe Importation (privées) 6%" +"account_tax_code_template_68",66,1,"account_tax_code_template_64","Taxe Importation (privées) 15%" +"account_tax_code_template_87",89,1,"account_tax_code_template_75","Prestations de services (art. 26) 6%" +"account_tax_code_template_87",88,1,"account_tax_code_template_74","Prestations de services (art. 26) 15%" +"account_tax_code_template_87",91,1,"account_tax_code_template_77","Prestations de services (art. 26) 12%" +"account_tax_code_template_87",90,1,"account_tax_code_template_76","Prestations de services (art. 26) 3%" +"account_tax_code_template_88",94,1,"account_tax_code_template_79","Taxe prestations de services (art. 26) 6%" +"account_tax_code_template_88",93,1,"account_tax_code_template_86","Taxe prestation de services (Art.26) 15%" +"account_tax_code_template_88",96,1,"account_tax_code_template_81","Taxe prestations de services (art. 26) 12%" +"account_tax_code_template_88",95,1,"account_tax_code_template_80","Taxe prestations de services (art. 26) 3%" +"account_tax_code_template_43",41,1,"account_tax_code_template_89",41 +"account_tax_code_template_89",40,1,"account_tax_code_template_35","Taxes CA 12%" +"account_tax_code_template_89",83,1,"account_tax_code_template_36","Taxe au taux indéfini" +"account_tax_code_template_89",39,1,"account_tax_code_template_34","Taxe CA 3%" +"account_tax_code_template_89",37,1,"account_tax_code_template_32","Taxe CA 15%" +"account_tax_code_template_89",38,1,"account_tax_code_template_33","Taxe CA 6%" diff --git a/addons/l10n_lu/account.tax.template.csv b/addons/l10n_lu/account.tax.template.csv new file mode 100644 index 00000000000..93b4aaa28ea --- /dev/null +++ b/addons/l10n_lu/account.tax.template.csv @@ -0,0 +1,35 @@ +"ref_base_code_id:id","ref_base_sign","name","ref_tax_code_id:id","account_collected_id:id","amount","chart_template_id:id","tax_code_id:id","child_depend","include_base_amount","parent_id:id","tax_sign","account_paid_id:id","base_code_id:id","id","ref_tax_sign" +"account_tax_code_template_9",-1,"Intra Travail à façon 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_1",1 +"account_tax_code_template_9",-1,"Intra Livraison avec installation 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_2",1 +"account_tax_code_template_9",-1,"Intra transfert de biens 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_9","account_tax_template_3",1 +"account_tax_code_template_13",-1,"Vente de tabacs 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_13","account_tax_template_9",1 +"account_tax_code_template_10",-1,"Exportations 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,"account_tax_code_template_10","account_tax_template_10",1 +,1,"Achats frais généraux 0%",,,"0.0000","l10nlu_chart_template",,0,0,,1,,,"account_tax_template_11",1 +"account_tax_code_template_29",-1,"Ventes 3%","account_tax_code_template_34","account_451000","0.0300","l10nlu_chart_template","account_tax_code_template_34",0,0,,1,"account_451000","account_tax_code_template_29","account_tax_template_5",-1 +"account_tax_code_template_28",-1,"Ventes 6%","account_tax_code_template_33","account_451000","0.0600","l10nlu_chart_template","account_tax_code_template_33",0,0,,1,"account_451000","account_tax_code_template_28","account_tax_template_6",-1 +"account_tax_code_template_30",-1,"Ventes 12%","account_tax_code_template_35","account_451000","0.1200","l10nlu_chart_template","account_tax_code_template_35",0,0,,1,"account_451000","account_tax_code_template_30","account_tax_template_7",-1 +"account_tax_code_template_27",-1,"Ventes 15%","account_tax_code_template_32","account_451000","0.1500","l10nlu_chart_template","account_tax_code_template_32",0,0,,1,"account_451000","account_tax_code_template_27","account_tax_template_8",-1 +,1,"Achats frais généraux 15%","account_tax_code_template_18","account_411000","0.1500","l10nlu_chart_template","account_tax_code_template_18",0,0,,1,"account_411000",,"account_tax_template_12",-1 +,1,"Achats Intra-Co",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_13",1 +,1,"Achats de Services Art.26",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_18",1 +,1,"Ventes de Services Art.26",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_21",1 +,1,"Livraison de Biens Triangulaire 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,,1,"account_411000","account_tax_code_template_38","account_tax_template_26",1 +,1,"Livraisons de biens triangulaire 2",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,,-1,"account_451000",,"account_tax_template_25",1 +,1,"Importations a des fins de l'entreprise",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_30",1 +,1,"Importations a des fins privées",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_33",1 +,1,"Livraisons de Biens Art.26",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_36",1 +,1,"Livraison de Biens triangulaire",,,1,"l10nlu_chart_template",,1,0,,1,,"account_tax_code_template_38","account_tax_template_24",1 +,1,"Livraisons de biens triangulaire 2",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_24",-1,"account_451000",,"account_tax_template_22",1 +,1,"Livraison de Biens Triangulaire 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_24",1,"account_411000","account_tax_code_template_38","account_tax_template_23",1 +,1,"Importations Intra-Co2",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_56",0,0,"account_tax_template_30",-1,"account_411000","account_tax_code_template_51","account_tax_template_28",1 +,1,"Importations Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_20",0,0,"account_tax_template_30",1,"account_411000",,"account_tax_template_29",1 +,1,"Importations Fins Privées",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_64",0,0,"account_tax_template_33",-1,"account_411000","account_tax_code_template_60","account_tax_template_31",1 +,1,"Importations Fins Privées",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_20",0,0,"account_tax_template_33",1,"account_411000",,"account_tax_template_32",1 +,1,"Livraison de Biens Art26",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_36",-1,"account_451000",,"account_tax_template_34",1 +,1,"Livraisons de Biens Art26",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_82",0,0,"account_tax_template_36",1,"account_411000","account_tax_code_template_78","account_tax_template_35",1 +,1,"Achats Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_19",0,0,"account_tax_template_13",1,"account_411000","account_tax_code_template_38","account_tax_template_14",1 +,1,"Achats Intra-CO2",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_13",-1,"account_411000",,"account_tax_template_15",1 +,1,"Services Intra-Co2",,"account_451000","-0.1500","l10nlu_chart_template","account_tax_code_template_45",0,0,"account_tax_template_18",-1,"account_411000",,"account_tax_template_17",1 +,1,"Services Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_18",1,"account_411000","account_tax_code_template_38","account_tax_template_16",1 +,1,"Services Intra-Co2",,"account_411000","-0.1500","l10nlu_chart_template","account_tax_code_template_22",0,0,"account_tax_template_21",-1,"account_451000",,"account_tax_template_19",1 +,1,"Services Intra-Co 1",,"account_411500","0.1500","l10nlu_chart_template","account_tax_code_template_86",0,0,"account_tax_template_21",1,"account_411000","account_tax_code_template_74","account_tax_template_20",1 diff --git a/addons/l10n_lu/l10n_lu_data.xml b/addons/l10n_lu/l10n_lu_data.xml index ed23a24df70..ce071ad4cc5 100644 --- a/addons/l10n_lu/l10n_lu_data.xml +++ b/addons/l10n_lu/l10n_lu_data.xml @@ -1,7 +1,6 @@ - @@ -20,6 +19,11 @@ liability balance + + Créances + creances + balance + Equity equity @@ -41,543 +45,6 @@ balance - - - Plan de Taxes Luxembourgeois - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2614,9 +2081,11 @@ 401000 Effets à recevoir - clients - + True + - other + receivable + 403000 @@ -2624,7 +2093,7 @@ - other + receivable 404000 @@ -2637,10 +2106,10 @@ 406000 Acomptes versés aux fournisseurs - + - other + payable 407000 @@ -2677,15 +2146,15 @@ 411000 T.v.a en amont - - + + True other 411100 T.v.a soumise à l'origine amont - + other @@ -2693,7 +2162,7 @@ 411500 Compte courant tva - + other @@ -2709,7 +2178,7 @@ 413100 Autres créances sur entrepr. liées - + other @@ -2910,7 +2379,8 @@ 441000 Effets à payer - + True + other @@ -2918,7 +2388,8 @@ 442000 Factures à recevoir - + True + other @@ -2950,7 +2421,8 @@ 451000 T.v.a en aval - + True + other @@ -2958,7 +2430,8 @@ 451100 T.v.a soumise à l'origine aval - + True + other @@ -2966,7 +2439,8 @@ 451200 T.v.a intracom - + True + other @@ -3310,7 +2784,8 @@ 580000 Virements internes - + True + other @@ -4296,478 +3771,14 @@ PCMN for Luxembourg - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 2e05c1f62b1..5fbda6cb9f2 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -437,20 +437,9 @@ class purchase_order_line(osv.osv): res = {'value': {'price_unit': price, 'name':prod_name, 'taxes_id':prod['supplier_taxes_id'], 'date_planned': dt,'notes':prod['description_purchase'], 'product_uom': uom}} domain = {} - + partner = partner_obj.browse(cr, uid, partner_id) taxes = self.pool.get('account.tax').browse(cr, uid,prod['supplier_taxes_id']) - taxep = None - if partner_id: - partner = self.pool.get('res.partner').browse(cr, uid, partner_id) - taxep = partner.property_account_position and partner.property_account_position.account_supplier_tax - if not taxep or not taxep.id: - res['value']['taxes_id'] = prod['supplier_taxes_id'] - else: - res5 = [taxep.id] - for t in taxes: - if not t.tax_group==taxep.tax_group: - res5.append(t.id) - res['value']['taxes_id'] = res5 + res['value']['taxes_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, partner, taxes) res2 = self.pool.get('product.uom').read(cr, uid, [uom], ['category_id']) res3 = self.pool.get('product.uom').read(cr, uid, [prod_uom_po], ['category_id']) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index be89c2dbd73..3be1db928ea 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -837,20 +837,8 @@ class sale_order_line(osv.osv): if update_tax: #The quantity only have changed result['delay'] = (product_obj.sale_delay or 0.0) - taxes = self.pool.get('account.tax').browse(cr, uid, - [x.id for x in product_obj.taxes_id]) - taxep = None - if partner_id: - partner = partner_obj.browse(cr, uid, partner_id) - taxep = partner.property_account_position and partner.property_account_position.account_tax - if not taxep or not taxep.id: - result['tax_id'] = [x.id for x in product_obj.taxes_id] - else: - res5 = [taxep.id] - for t in taxes: - if not t.tax_group==taxep.tax_group: - res5.append(t.id) - result['tax_id'] = res5 + partner = partner_obj.browse(cr, uid, partner_id) + result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, partner, product_obj.taxes_id) result['name'] = product_obj.partner_ref