commit
bc33c13e56
|
@ -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),
|
||||
|
|
|
@ -86,6 +86,9 @@
|
|||
<wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General ledger"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_general_ledger" id="menu_general_ledger" parent="account.menu_generic_report" type="wizard"/>
|
||||
|
||||
<wizard id="wizard_print_journal" menu="False" model="account.journal.period" name="account.print.journal.report" string="Print journal"/>
|
||||
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -11,8 +11,16 @@
|
|||
<field name="name" select="1"/>
|
||||
<field name="company_id"/>
|
||||
<newline/>
|
||||
<field name="account_tax" select="2"/>
|
||||
<field name="account_supplier_tax" select="2"/>
|
||||
<field name="tax_ids" colspan="4">
|
||||
<tree string="Taxes Mapping" editable="bottom">
|
||||
<field name="tax_src_id"/>
|
||||
<field name="tax_dest_id"/>
|
||||
</tree>
|
||||
<form string="Taxes Mapping">
|
||||
<field name="tax_src_id"/>
|
||||
<field name="tax_dest_id"/>
|
||||
</form>
|
||||
</field>
|
||||
<field name="account_ids" colspan="4">
|
||||
<tree string="Accounts Mapping" editable="bottom">
|
||||
<field name="account_src_id"/>
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -0,0 +1,191 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
<header>
|
||||
<pageGraphics>
|
||||
<!--logo-->
|
||||
<!--<fill color="darkblue"/>-->
|
||||
<!--<stroke color="darkblue"/>-->
|
||||
|
||||
<!--TITLE COMPANY-->
|
||||
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
|
||||
|
||||
<setFont name="Helvetica-Bold" size="9"/>
|
||||
|
||||
|
||||
<!--COL 1-->
|
||||
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
|
||||
<drawRightString x="20cm" y="28.1cm">Print Journal - [[ company.currency_id.name ]]</drawRightString>
|
||||
|
||||
|
||||
<!-- Header -->
|
||||
|
||||
|
||||
<setFont name="Helvetica" size="9"/>
|
||||
<drawString x="1.0cm" y="1cm"> [[ time.strftime("%Y-%m-%d %H:%M", time.localtime()) ]]</drawString>
|
||||
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
|
||||
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
|
||||
|
||||
|
||||
<lineMode width="0.7"/>
|
||||
<lines>1cm 27.7cm 20cm 27.7cm</lines>
|
||||
<setFont name="Helvetica" size="8"/>
|
||||
</pageGraphics>
|
||||
</header>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table1">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table2">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table3">
|
||||
<blockAlignment value="LEFT"/>
|
||||
|
||||
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="P1" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P2" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P5" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P6" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10a" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P10b" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P11a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="P13" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER"/>
|
||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Footer" fontName="Times-Roman"/>
|
||||
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
|
||||
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="65.0,62.0,58.0,62.0,174.0,57.0,61.0" style="Table1" repeatRows="1">
|
||||
<para style="terp_default_8">[[repeatIn(lines(data['form']['period_id'][0][2],data['form']['journal_id'][0][2],data['form']['sort_selection']), 'line') ]]</para>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10a">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">Voucher No</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10">A/c No.</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10a">Third party</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10a">Entry label</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10b">Debit</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P10b">Credit</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P11">[[line[0].period_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P11a">[[line[0].journal_id.code ]]</para></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ '%.2f' % sum_debit(line[0].period_id.id, line[0].journal_id.id) or '0.00' ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ '%.2f' % sum_credit(line[0].period_id.id, line[0].journal_id.id) or '0.00' ]]</u></para>
|
||||
</td>
|
||||
</tr >
|
||||
<tr>
|
||||
<para style="terp_default_8">[[repeatIn(line,'l')]]</para>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ l.date ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ l.ref ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ l.account_id.code ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ l.partner_id and l.partner_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ l.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ l.debit and '%.2f' % l.debit or '0.00' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ l.credit and '%.2f' % l.credit or '0.00' ]]</para>
|
||||
</td>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
|
@ -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
|
||||
|
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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 = '''<?xml version="1.0"?>
|
||||
<form string="Print Journal">
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<field name="sort_selection"/>
|
||||
</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:
|
||||
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Chart template of l10n_be -->
|
||||
<!-- Account template definition -->
|
||||
<record id="a_root" model="account.account.template">
|
||||
|
@ -6434,7 +6433,7 @@
|
|||
|
||||
<!-- Tax Code Configuration -->
|
||||
<record id="vat_code_chart_root" model="account.tax.code.template">
|
||||
<field name="name">Plan de Taxe Belge</field>
|
||||
<field name="name">Plan de Taxes Belge</field>
|
||||
</record>
|
||||
<record id="vat_code_op_base" model="account.tax.code.template">
|
||||
<field name="name">I. Valeur des operations</field>
|
||||
|
|
|
@ -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",
|
||||
],
|
||||
|
|
|
@ -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%"
|
|
|
@ -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
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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'])
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue