[MERGE] Merged lp:openobject-addons.

bzr revid: psa@tinyerp.com-20131021055621-l0dw112tf8535j7q
This commit is contained in:
Paramjit Singh Sahota 2013-10-21 11:26:21 +05:30
commit 7f8f78cc4f
63 changed files with 1684 additions and 418 deletions

View File

@ -155,12 +155,11 @@ for a particular financial year and for preparation of vouchers there is a modul
'test/account_period_close.yml',
'test/account_use_model.yml',
'test/account_validate_account_move.yml',
'test/account_fiscalyear_close.yml',
#'test/account_bank_statement.yml',
#'test/account_cash_statement.yml',
'test/test_edi_invoice.yml',
'test/account_report.yml',
'test/account_fiscalyear_close_state.yml', #last test, as it will definitively close the demo fiscalyear
'test/account_fiscalyear_close.yml', #last test, as it will definitively close the demo fiscalyear
],
'installable': True,
'auto_install': False,

View File

@ -3047,6 +3047,20 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sales and purchase rates or use the usual m2o fields. This last choice assumes that the set of tax defined for the chosen template is complete'),
}
def _get_chart_parent_ids(self, cr, uid, chart_template, context=None):
""" Returns the IDs of all ancestor charts, including the chart itself.
(inverse of child_of operator)
:param browse_record chart_template: the account.chart.template record
:return: the IDS of all ancestor charts, including the chart itself.
"""
result = [chart_template.id]
while chart_template.parent_id:
chart_template = chart_template.parent_id
result.append(chart_template.id)
return result
def onchange_tax_rate(self, cr, uid, ids, rate=False, context=None):
return {'value': {'purchase_tax_rate': rate or False}}
@ -3060,12 +3074,17 @@ class wizard_multi_charts_accounts(osv.osv_memory):
res['value'].update({'complete_tax_set': data.complete_tax_set, 'currency_id': currency_id})
if data.complete_tax_set:
# default tax is given by the lowest sequence. For same sequence we will take the latest created as it will be the case for tax created while isntalling the generic chart of account
sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
, "=", chart_template_id), ('type_tax_use', 'in', ('sale','all'))], order="sequence, id desc")
purchase_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
, "=", chart_template_id), ('type_tax_use', 'in', ('purchase','all'))], order="sequence, id desc")
res['value'].update({'sale_tax': sale_tax_ids and sale_tax_ids[0] or False, 'purchase_tax': purchase_tax_ids and purchase_tax_ids[0] or False})
chart_ids = self._get_chart_parent_ids(cr, uid, data, context=context)
base_tax_domain = [("chart_template_id", "in", chart_ids), ('parent_id', '=', False)]
sale_tax_domain = base_tax_domain + [('type_tax_use', 'in', ('sale','all'))]
purchase_tax_domain = base_tax_domain + [('type_tax_use', 'in', ('purchase','all'))]
sale_tax_ids = tax_templ_obj.search(cr, uid, sale_tax_domain, order="sequence, id desc")
purchase_tax_ids = tax_templ_obj.search(cr, uid, purchase_tax_domain, order="sequence, id desc")
res['value'].update({'sale_tax': sale_tax_ids and sale_tax_ids[0] or False,
'purchase_tax': purchase_tax_ids and purchase_tax_ids[0] or False})
res.setdefault('domain', {})
res['domain']['sale_tax'] = repr(sale_tax_domain)
res['domain']['purchase_tax'] = repr(purchase_tax_domain)
if data.code_digits:
res['value'].update({'code_digits': data.code_digits})
return res
@ -3073,6 +3092,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
def default_get(self, cr, uid, fields, context=None):
res = super(wizard_multi_charts_accounts, self).default_get(cr, uid, fields, context=context)
tax_templ_obj = self.pool.get('account.tax.template')
account_chart_template = self.pool['account.chart.template']
if 'bank_accounts_id' in fields:
res.update({'bank_accounts_id': [{'acc_name': _('Cash'), 'account_type': 'cash'},{'acc_name': _('Bank'), 'account_type': 'bank'}]})
@ -3086,23 +3106,28 @@ class wizard_multi_charts_accounts(osv.osv_memory):
currency_id = company_obj.on_change_country(cr, uid, company_id, country_id, context=context)['value']['currency_id']
res.update({'currency_id': currency_id})
ids = self.pool.get('account.chart.template').search(cr, uid, [('visible', '=', True)], context=context)
ids = account_chart_template.search(cr, uid, [('visible', '=', True)], context=context)
if ids:
#in order to set default chart which was last created set max of ids.
chart_id = max(ids)
if context.get("default_charts"):
model_data = self.pool.get('ir.model.data').search_read(cr, uid, [('model','=','account.chart.template'),('module','=',context.get("default_charts"))], ['res_id'], context=context)
if model_data:
chart_id = model_data[0]['res_id']
chart = account_chart_template.browse(cr, uid, chart_id, context=context)
chart_hierarchy_ids = self._get_chart_parent_ids(cr, uid, chart, context=context)
if 'chart_template_id' in fields:
#in order to get set default chart which was last created set max of ids.
chart_id = max(ids)
if context.get("default_charts"):
model_data = self.pool.get('ir.model.data').search_read(cr, uid, [('model','=','account.chart.template'),('module','=',context.get("default_charts"))], ['res_id'], context=context)
if model_data:
chart_id = model_data[0]['res_id']
res.update({'only_one_chart_template': len(ids) == 1, 'chart_template_id': chart_id})
res.update({'only_one_chart_template': len(ids) == 1,
'chart_template_id': chart_id})
if 'sale_tax' in fields:
sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
, "=", ids[0]), ('type_tax_use', 'in', ('sale','all'))], order="sequence")
sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id", "in", chart_hierarchy_ids),
('type_tax_use', 'in', ('sale','all'))],
order="sequence")
res.update({'sale_tax': sale_tax_ids and sale_tax_ids[0] or False})
if 'purchase_tax' in fields:
purchase_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
, "=", ids[0]), ('type_tax_use', 'in', ('purchase','all'))], order="sequence")
purchase_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id", "in", chart_hierarchy_ids),
('type_tax_use', 'in', ('purchase','all'))],
order="sequence")
res.update({'purchase_tax': purchase_tax_ids and purchase_tax_ids[0] or False})
res.update({
'purchase_tax_rate': 15.0,
@ -3370,12 +3395,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
obj_tax_temp = self.pool.get('account.tax.template')
chart_template = obj_wizard.chart_template_id
vals = {}
# get the ids of all the parents of the selected account chart template
current_chart_template = chart_template
all_parents = [current_chart_template.id]
while current_chart_template.parent_id:
current_chart_template = current_chart_template.parent_id
all_parents.append(current_chart_template.id)
all_parents = self._get_chart_parent_ids(cr, uid, chart_template, context=context)
# create tax templates and tax code templates from purchase_tax_rate and sale_tax_rate fields
if not chart_template.complete_tax_set:
value = obj_wizard.sale_tax_rate

View File

@ -463,7 +463,7 @@
<separator/>
<filter domain="[('user_id','=',uid)]" help="My Invoices"/>
<group expand="0" string="Group By...">
<filter name="partner_id" string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter name="group_by_partner_id" string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter name="commercial_partner_id" string="Commercial Partner" domain="[]" context="{'group_by':'commercial_partner_id'}"/>
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>

View File

@ -113,7 +113,8 @@ class res_partner(osv.osv):
LEFT JOIN account_account a ON (l.account_id=a.id)
WHERE a.type IN ('receivable','payable')
AND l.partner_id IN %s
AND l.reconcile_id IS NULL
AND (l.reconcile_id IS NULL OR
reconcile_id in (SELECT id FROM account_move_reconcile WHERE opening_reconciliation is TRUE))
AND """ + query + """
GROUP BY l.partner_id, a.type
""",

View File

@ -84,7 +84,7 @@ openerp.account.quickadd = function (instance) {
},
search_by_journal_period: function() {
var self = this;
var domain = ['|',['debit', '!=', 0], ['credit', '!=', 0]];
var domain = [];
if (self.current_journal !== null) domain.push(["journal_id", "=", self.current_journal]);
if (self.current_period !== null) domain.push(["period_id", "=", self.current_period]);
self.last_context["journal_id"] = self.current_journal === null ? false : self.current_journal;

View File

@ -17,7 +17,20 @@
fiscalyear_id: account_fiscalyear_fiscalyear0
name: !eval "'OP %s' %(datetime.now().year+1)"
special: 1
-
I create a new account invoice a the partner in current fiscalyear
-
!record {model: account.invoice, id: account_invoice_current1}:
partner_id: base.res_partner_2
invoice_line:
- partner_id: base.res_partner_2
quantity: 1.0
price_unit: 15.00
name: Bying stuff
-
I validate it the invoice
-
!workflow {model: account.invoice, action: invoice_open, ref: account.account_invoice_current1}
-
I made modification in journal so it can move entries
-
@ -41,9 +54,30 @@
report_name: End of Fiscal Year Entry
-
I clicked on create Button
-
!python {model: account.fiscalyear.close}: |
self.data_save(cr, uid, [ref("account_fiscalyear_close_0")], {"lang": 'en_US',
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close")],
"tz": False, "active_id": ref("account.menu_wizard_fy_close"), })
"tz": False, "active_id": ref("account.menu_wizard_fy_close"), })
-
I close the previous fiscalyear
-
!record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}:
fy_id: data_fiscalyear
-
I clicked on Close States Button to close fiscalyear
-
!python {model: account.fiscalyear.close.state}: |
self.data_save(cr, uid, [ref("account_fiscalyear_close_state_0")], {"lang": 'en_US',
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close_state")],
"tz": False, "active_id": ref("account.menu_wizard_fy_close_state"), })
-
I check that the fiscalyear state is now "Done"
-
!assert {model: account.fiscalyear, id: data_fiscalyear, string: Fiscal Year is in Done state}:
- state == 'done'
-
I check that the past accounts are taken into account in partner credit
-
!assert {model: res.partner, id: base.res_partner_2}:
- credit == 15.0, "Total Receivable does not takes unreconciled previous moves"

View File

@ -1,19 +0,0 @@
-
I run the Close a Fiscalyear wizard to close the demo fiscalyear
-
!record {model: account.fiscalyear.close.state, id: account_fiscalyear_close_state_0}:
fy_id: data_fiscalyear
-
I clicked on Close States Button to close fiscalyear
-
!python {model: account.fiscalyear.close.state}: |
self.data_save(cr, uid, [ref("account_fiscalyear_close_state_0")], {"lang": 'en_US',
"active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_fy_close_state")],
"tz": False, "active_id": ref("account.menu_wizard_fy_close_state"), })
-
I check that the fiscalyear state is now "Done"
-
!assert {model: account.fiscalyear, id: data_fiscalyear, string: Fiscal Year is in Done state}:
- state == 'done'

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2013-01-30 03:58+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2013-10-18 02:59+0000\n"
"Last-Translator: padola <padola@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 05:47+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-10-19 04:59+0000\n"
"X-Generator: Launchpad (build 16807)\n"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -67,6 +67,10 @@ msgid ""
"to\n"
" define the customer invoice price rate."
msgstr ""
"当发票符合计工单OpenERP将使用\n"
" 合同使用价目表价格\n"
" 产品设置应用到每个员工\n"
" 指定客户发票价格率。"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -144,6 +148,15 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击以确立一个新合同\n"
" </p><p>\n"
" 你将发现合同已经更新,由于已过期或者工作流\n"
" 授权超过最大数\n"
" </p><p>\n"
" OpenERP会自动更新挂起状态的合同,商谈结束,\n"
" 销售员必须关闭或更新挂起的合同.\n"
" "
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -153,7 +166,7 @@ msgstr "截止日期"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Account Manager"
msgstr "会计经理"
msgstr "分管会计"
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_hours_to_invoice:0
@ -595,7 +608,7 @@ msgstr "总时间"
#: model:res.groups,comment:account_analytic_analysis.group_template_required
msgid ""
"the field template of the analytic accounts and contracts will be required."
msgstr ""
msgstr "这个分析账户和合同的字段模板是必填的"
#. module: account_analytic_analysis
#: field:account.analytic.account,invoice_on_timesheets:0

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-10-15 04:41+0000\n"
"X-Launchpad-Export-Date: 2013-10-16 04:37+0000\n"
"X-Generator: Launchpad (build 16799)\n"
#. module: account_bank_statement_extensions

View File

@ -185,7 +185,7 @@ class res_partner(osv.osv):
return {}
data['partner_ids'] = wizard_partner_ids
datas = {
'ids': [],
'ids': wizard_partner_ids,
'model': 'account_followup.followup',
'form': data
}

View File

@ -50,9 +50,9 @@ class account_followup_stat_by_partner(osv.osv):
# to send him follow-ups separately . An assumption that the number of companies will not
# reach 10 000 records is made, what should be enough for a time.
cr.execute("""
create or replace view account_followup_stat_by_partner as (
create view account_followup_stat_by_partner as (
SELECT
l.partner_id * 10000 + l.company_id as id,
l.partner_id * 10000::bigint + l.company_id as id,
l.partner_id AS partner_id,
min(l.date) AS date_move,
max(l.date) AS date_move_last,
@ -67,11 +67,10 @@ class account_followup_stat_by_partner(osv.osv):
a.active AND
a.type = 'receivable' AND
l.reconcile_id is NULL AND
l.partner_id IS NOT NULL AND
(l.blocked = False)
l.partner_id IS NOT NULL
GROUP BY
l.partner_id, l.company_id
)""") #Blocked is to take into account litigation
)""")
class account_followup_sending_results(osv.osv_memory):

View File

@ -130,7 +130,7 @@
<separator/>
<filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('state','=','posted'), ('audit','=',False)]" help="To Review"/>
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
<field name="journal_id" context="{'journal_id': self, 'set_visible':False}" />
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" /> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>

View File

@ -12,7 +12,7 @@
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
<field name="partner_id" string="Customer" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
@ -35,7 +35,7 @@
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
<field name="partner_id" string="Supplier" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('bank','cash'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>

View File

@ -11,7 +11,7 @@
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
<field name="partner_id" string="Supplier" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('purchase','purchase_refund'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
@ -33,7 +33,7 @@
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
<field name="partner_id" string="Customer" filter_domain="[('partner_id','child_of',self)]"/>
<field name="journal_id" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/>
<field name="journal_id" widget="selection" context="{'journal_id': self, 'set_visible':False}" domain="[('type','in',('sale','sale_refund'))]"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="period_id"/>
<group expand="0" string="Group By...">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>

View File

@ -22,7 +22,7 @@
<record id="reset_password_email" model="email.template">
<field name="name">Reset Password</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
<field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email or user.email}>]]></field>
<field name="email_to">${object.email}</field>
<field name="subject">Password reset</field>
<field name="body_html"><![CDATA[
@ -37,7 +37,7 @@
<record id="set_password_email" model="email.template">
<field name="name">OpenERP Enterprise Connection</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
<field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email or user.email}>]]></field>
<field name="email_to">${object.email}</field>
<field name="subject"><![CDATA[${object.company_id.name} invitation to connect on OpenERP]]></field>
<field name="body_html">

View File

@ -63,7 +63,10 @@ class base_action_rule(osv.osv):
'sequence': fields.integer('Sequence',
help="Gives the sequence order when displaying a list of rules."),
'kind': fields.selection(
[('on_create', 'On Creation'), ('on_write', 'On Update'), ('on_time', 'Based on Timed Condition')],
[('on_create', 'On Creation'),
('on_write', 'On Update'),
('on_create_or_write', 'On Creation & Update'),
('on_time', 'Based on Timed Condition')],
string='When to Run'),
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
help="When should the condition be triggered. If present, will be checked by the scheduler. If empty, will be checked at creation and update.",
@ -97,9 +100,9 @@ class base_action_rule(osv.osv):
def onchange_kind(self, cr, uid, ids, kind, context=None):
clear_fields = []
if kind == 'on_create':
if kind in ['on_create', 'on_create_or_write']:
clear_fields = ['filter_pre_id', 'trg_date_id', 'trg_date_range', 'trg_date_range_type']
elif kind == 'on_write':
elif kind in ['on_write', 'on_create_or_write']:
clear_fields = ['trg_date_id', 'trg_date_range', 'trg_date_range_type']
elif kind == 'on_time':
clear_fields = ['filter_pre_id']
@ -156,7 +159,7 @@ class base_action_rule(osv.osv):
new_id = old_create(cr, uid, vals, context=context)
# retrieve the action rules to run on creation
action_dom = [('model', '=', model), ('kind', '=', 'on_create')]
action_dom = [('model', '=', model), ('kind', 'in', ['on_create', 'on_create_or_write'])]
action_ids = self.search(cr, uid, action_dom, context=context)
# check postconditions, and execute actions on the records that satisfy them
@ -180,7 +183,7 @@ class base_action_rule(osv.osv):
ids = [ids] if isinstance(ids, (int, long, str)) else ids
# retrieve the action rules to run on update
action_dom = [('model', '=', model), ('kind', '=', 'on_write')]
action_dom = [('model', '=', model), ('kind', 'in', ['on_write', 'on_create_or_write'])]
action_ids = self.search(cr, uid, action_dom, context=context)
actions = self.browse(cr, uid, action_ids, context=context)

View File

@ -1,12 +1,10 @@
# -*- coding: utf-8 -*-
import simplejson
import openerp
from openerp.addons.web.http import Controller, route
class ImportController(openerp.addons.web.http.Controller):
_cp_path = '/base_import'
@openerp.addons.web.http.httprequest
class ImportController(Controller):
@route('/base_import/set_file')
def set_file(self, req, file, import_id, jsonp='callback'):
import_id = int(import_id)

View File

@ -224,12 +224,13 @@ class ir_import(orm.TransientModel):
headers, matches = self._match_headers(rows, fields, options)
# Match should have consumed the first row (iif headers), get
# the ``count`` next rows for preview
preview = itertools.islice(rows, count)
preview = list(itertools.islice(rows, count))
assert preview, "CSV file seems to have no content"
return {
'fields': fields,
'matches': matches or False,
'headers': headers or False,
'preview': list(preview),
'preview': preview,
}
except Exception, e:
# Due to lazy generators, UnicodeDecodeError (for

View File

@ -0,0 +1,37 @@
# Latvian translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-10-16 19:12+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Latvian <lv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-10-17 05:33+0000\n"
"X-Generator: Launchpad (build 16799)\n"
#. module: contacts
#: model:ir.actions.act_window,help:contacts.action_contacts
msgid ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to add a contact in your address book.\n"
" </p><p>\n"
" OpenERP helps you easily track all activities related to\n"
" a customer; discussions, history of business opportunities,\n"
" documents, etc.\n"
" </p>\n"
" "
msgstr ""
#. module: contacts
#: model:ir.actions.act_window,name:contacts.action_contacts
#: model:ir.ui.menu,name:contacts.menu_contacts
msgid "Contacts"
msgstr "Kontakti"

View File

@ -235,9 +235,12 @@ class MergePartnerAutomatic(osv.TransientModel):
record_ids = proxy.search(cr, openerp.SUPERUSER_ID, domain, context=context)
for record in proxy.browse(cr, openerp.SUPERUSER_ID, record_ids, context=context):
proxy_model = self.pool[record.model]
field_type = proxy_model._columns.get(record.name).__class__._type
try:
proxy_model = self.pool[record.model]
field_type = proxy_model._columns[record.name].__class__._type
except KeyError:
# unknown model or field => skip
continue
if field_type == 'function':
continue

View File

@ -352,10 +352,14 @@ class crm_lead(format_address, osv.osv):
"""
if isinstance(cases, (int, long)):
cases = self.browse(cr, uid, cases, context=context)
if context is None:
context = {}
# check whether we should try to add a condition on type
avoid_add_type_term = any([term for term in domain if len(term) == 3 if term[0] == 'type'])
# collect all section_ids
section_ids = set()
types = ['both']
if not cases:
if not cases and context.get('default_type'):
ctx_type = context.get('default_type')
types += [ctx_type]
if section_id:
@ -373,7 +377,8 @@ class crm_lead(format_address, osv.osv):
search_domain.append(('section_ids', '=', section_id))
search_domain.append(('case_default', '=', True))
# AND with cases types
search_domain.append(('type', 'in', types))
if not avoid_add_type_term:
search_domain.append(('type', 'in', types))
# AND with the domain in parameter
search_domain += list(domain)
# perform search, return the first found
@ -607,10 +612,12 @@ class crm_lead(format_address, osv.osv):
opportunities = self.browse(cr, uid, ids, context=context)
sequenced_opps = []
# Sorting the leads/opps according to the confidence level of its stage, which relates to the probability of winning it
# The confidence level increases with the stage sequence, except when the stage probability is 0.0 (Lost cases)
# An Opportunity always has higher confidence level than a lead, unless its stage probability is 0.0
for opportunity in opportunities:
sequence = -1
# TDE: was "if opportunity.stage_id and opportunity.stage_id.state != 'cancel':"
if opportunity.probability == 0 and opportunity.stage_id and opportunity.stage_id.sequence != 1 and opportunity.stage_id.fold:
if opportunity.stage_id and (opportunity.stage_id.probability != 0 or opportunity.stage_id.sequence == 1):
sequence = opportunity.stage_id.sequence
sequenced_opps.append(((int(sequence != -1 and opportunity.type == 'opportunity'), sequence, -opportunity.id), opportunity))

View File

@ -8,7 +8,7 @@
<field name="arch" type="xml">
<data>
<xpath expr="//notebook/page[@string='Lead']" position="after">
<page string="Assigned Partner" groups="base.group_sale_manager">
<page string="Assigned Partner" groups="base.group_sale_salesman">
<group name="partner_assign_group">
<group string="Partner Assignation" col="3" colspan="1">
<label for="partner_latitude" string="Geolocation" />
@ -78,7 +78,7 @@
<field name="arch" type="xml">
<data>
<xpath expr="//notebook/page[@string='Extra Info']" position="after">
<page string="Assigned Partner" groups="base.group_sale_manager">
<page string="Assigned Partner" groups="base.group_sale_salesman">
<group name="partner_assign_group">
<group string="Partner Assignation" col="3">
<label for="partner_latitude" string="Geolocation" />

View File

@ -59,6 +59,10 @@
<field name="description" nolabel="1" colspan="2"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread" readonly="1"/>
</div>
</form>
</field>
</record>
@ -145,6 +149,10 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread" readonly="1"/>
</div>
</form>
</field>
</record>

View File

@ -138,6 +138,7 @@
<field name="create_date"/>
<field name="name"/>
<field name="type"/>
<field name="probability" invisible="1"/>
<field name="stage_id"/>
<field name="section_id"
invisible="context.get('invisible_section', True)"
@ -146,7 +147,8 @@
<button string="Convert to Opportunity"
name="convert_opportunity"
type="object"
attrs="{'invisible':[('type','=','opportunity'),('probability', '=', 100)]}" />
icon="gtk-convert"
attrs="{'invisible':[('type','=','opportunity')]}" />
<button name="case_escalate" string="Escalate"
type="object"
icon="gtk-go-up"

View File

@ -32,23 +32,22 @@ class google_service(osv.osv_memory):
_name = 'google.service'
def generate_refresh_token(self, cr, uid, service, authorization_code, context=None):
if authorization_code:
ir_config = self.pool['ir.config_parameter']
client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_id' % service)
client_secret = ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_secret' % service)
redirect_uri = ir_config.get_param(cr, SUPERUSER_ID, 'google_redirect_uri')
ir_config = self.pool['ir.config_parameter']
client_id = ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_id' % service)
client_secret = ir_config.get_param(cr, SUPERUSER_ID, 'google_%s_client_secret' % service)
redirect_uri = ir_config.get_param(cr, SUPERUSER_ID, 'google_redirect_uri')
#Get the Refresh Token From Google And store it in ir.config_parameter
headers = {"Content-type": "application/x-www-form-urlencoded"}
data = dict(code=authorization_code, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri, grant_type="authorization_code")
data = urllib.urlencode(data)
try:
req = urllib2.Request("https://accounts.google.com/o/oauth2/token", data, headers)
content = urllib2.urlopen(req).read()
except urllib2.HTTPError:
raise self.pool.get('res.config.settings').get_config_warning(cr, _("Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired"), context=context)
#Get the Refresh Token From Google And store it in ir.config_parameter
headers = {"Content-type": "application/x-www-form-urlencoded"}
data = dict(code=authorization_code, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri, grant_type="authorization_code")
data = urllib.urlencode(data)
try:
req = urllib2.Request("https://accounts.google.com/o/oauth2/token", data, headers)
content = urllib2.urlopen(req).read()
except urllib2.HTTPError:
raise self.pool.get('res.config.settings').get_config_warning(cr, _("Something went wrong during your token generation. Maybe your Authorization Code is invalid or already expired"), context=context)
content = simplejson.loads(content)
content = simplejson.loads(content)
return content.get('refresh_token')
def _get_google_token_uri(self, cr, uid, service, scope, context=None):

View File

@ -31,7 +31,7 @@ import re
_logger = logging.getLogger(__name__)
class config(osv.osv):
class config(osv.Model):
_name = 'google.drive.config'
_description = "Google Drive templates config"
@ -116,8 +116,26 @@ class config(osv.osv):
attach_pool = self.pool.get("ir.attachment")
attach_vals = {'res_model': res_model, 'name': name_gdocs, 'res_id': res_id, 'type': 'url', 'url': content['alternateLink']}
res['id'] = attach_pool.create(cr, uid, attach_vals)
# Commit in order to attach the document to the current object instance, even if the permissions has not been written.
cr.commit()
res['url'] = content['alternateLink']
return res
key = self._get_key_from_url(res['url'])
request_url = "https://www.googleapis.com/drive/v2/files/%s/permissions?emailMessage=This+is+a+drive+file+created+by+OpenERP&sendNotificationEmails=false&access_token=%s" % (key, access_token)
data = {'role': 'reader', 'type': 'anyone', 'value': '', 'withLink': True}
try:
req = urllib2.Request(request_url, json.dumps(data), headers)
urllib2.urlopen(req)
except urllib2.HTTPError:
raise self.pool.get('res.config.settings').get_config_warning(cr, _("The permission 'reader' for 'anyone with the link' has not been written on the document"), context=context)
user = self.pool['res.users'].browse(cr, uid, uid, context=context)
if user.email:
data = {'role': 'writer', 'type': 'user', 'value': user.email}
try:
req = urllib2.Request(request_url, json.dumps(data), headers)
urllib2.urlopen(req)
except urllib2.HTTPError:
raise self.pool.get('res.config.settings').get_config_warning(cr, _("The permission 'writer' for your email '%s' has not been written on the document. Is this email a valid Google Account ?" % user.email), context=context)
return res
def get_google_drive_config(self, cr, uid, res_model, res_id, context=None):
'''
@ -151,12 +169,18 @@ class config(osv.osv):
configs.append({'id': config.id, 'name': config.name})
return configs
def _get_key_from_url(self, url):
mo = re.search("(key=|/d/)([A-Za-z0-9-_]+)", url)
if mo:
return mo.group(2)
return None
def _resource_get(self, cr, uid, ids, name, arg, context=None):
result = {}
for data in self.browse(cr, uid, ids, context):
mo = re.search("(key=|/d/)([A-Za-z0-9-_]+)", data.google_drive_template_url)
mo = self._get_key_from_url(data.google_drive_template_url)
if mo:
result[data.id] = mo.group(2)
result[data.id] = mo
else:
raise osv.except_osv(_('Incorrect URL!'), _("Please enter a valid Google Document URL."))
return result
@ -205,12 +229,10 @@ class config(osv.osv):
]
def get_google_scope(self):
return 'https://www.googleapis.com/auth/drive'
config()
return 'https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file'
class base_config_settings(osv.osv):
class base_config_settings(osv.TransientModel):
_inherit = "base.config.settings"
_columns = {
@ -219,9 +241,14 @@ class base_config_settings(osv.osv):
}
_defaults = {
'google_drive_uri': lambda s, cr, uid, c: s.pool['google.service']._get_google_token_uri(cr, uid, 'drive', scope=s.pool['google.drive.config'].get_google_scope(), context=c),
'google_drive_authorization_code': lambda s, cr, uid, c: s.pool['ir.config_parameter'].get_param(cr, uid, 'google_drive_authorization_code', context=c),
}
def set_google_authorization_code(self, cr, uid, ids, context=None):
ir_config_param = self.pool['ir.config_parameter']
config = self.browse(cr, uid, ids[0], context)
refresh_token = self.pool['google.service'].generate_refresh_token(cr, uid, 'drive', config.google_drive_authorization_code, context=context)
self.pool['ir.config_parameter'].set_param(cr, uid, 'google_drive_refresh_token', refresh_token)
auth_code = config.google_drive_authorization_code
if auth_code and auth_code != ir_config_param.get_param(cr, uid, 'google_drive_authorization_code', context=context):
refresh_token = self.pool['google.service'].generate_refresh_token(cr, uid, 'drive', config.google_drive_authorization_code, context=context)
ir_config_param.set_param(cr, uid, 'google_drive_authorization_code', auth_code)
ir_config_param.set_param(cr, uid, 'google_drive_refresh_token', refresh_token)

View File

@ -60,7 +60,7 @@ class config(osv.osv):
user = self.pool['res.users'].read(cr, uid, uid, ['login', 'password'], context=context)
username = user['login']
password = user['password']
if self.pool['ir.module.module'].search_count(cr, SUPERUSER_ID, ['&', ('name', '=', 'auth_crypt'), ('state', '=', 'installed')]) == 1:
if not password:
config_formula = '=oe_settings("%s";"%s")' % (url, dbname)
else:
config_formula = '=oe_settings("%s";"%s";"%s";"%s")' % (url, dbname, username, password)

View File

@ -135,6 +135,7 @@
<record model="ir.ui.view" id="hr_kanban_view_employees">
<field name="name">HR - Employess Kanban</field>
<field name="model">hr.employee</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<kanban>
<field name="last_login"/>

View File

@ -26,6 +26,7 @@ import math
import time
from operator import attrgetter
from openerp.exceptions import Warning
from openerp import tools
from openerp.osv import fields, osv
from openerp.tools.translate import _
@ -149,6 +150,8 @@ class hr_holidays(osv.osv):
return False
return True
_check_holidays = lambda self, cr, uid, ids, context=None: self.check_holidays(cr, uid, ids, context=context)
_columns = {
'name': fields.char('Description', size=64),
'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
@ -188,6 +191,7 @@ class hr_holidays(osv.osv):
}
_constraints = [
(_check_date, 'You can not have 2 leaves that overlaps on same day!', ['date_from','date_to']),
(_check_holidays, 'The number of remaining leaves is not sufficient for this leave type', ['state','number_of_days_temp'])
]
_sql_constraints = [
@ -314,7 +318,6 @@ class hr_holidays(osv.osv):
context = {}
context = dict(context, mail_create_nolog=True)
hol_id = super(hr_holidays, self).create(cr, uid, values, context=context)
self.check_holidays(cr, uid, [hol_id], context=context)
return hol_id
def holidays_reset(self, cr, uid, ids, context=None):
@ -333,7 +336,6 @@ class hr_holidays(osv.osv):
return True
def holidays_first_validate(self, cr, uid, ids, context=None):
self.check_holidays(cr, uid, ids, context=context)
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
manager = ids2 and ids2[0] or False
@ -341,7 +343,6 @@ class hr_holidays(osv.osv):
return self.write(cr, uid, ids, {'state':'validate1', 'manager_id': manager})
def holidays_validate(self, cr, uid, ids, context=None):
self.check_holidays(cr, uid, ids, context=context)
obj_emp = self.pool.get('hr.employee')
ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
manager = ids2 and ids2[0] or False
@ -393,7 +394,6 @@ class hr_holidays(osv.osv):
return True
def holidays_confirm(self, cr, uid, ids, context=None):
self.check_holidays(cr, uid, ids, context=context)
for record in self.browse(cr, uid, ids, context=context):
if record.employee_id and record.employee_id.parent_id and record.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [record.id], user_ids=[record.employee_id.parent_id.user_id.id], context=context)
@ -429,12 +429,10 @@ class hr_holidays(osv.osv):
if record.holiday_type != 'employee' or record.type != 'remove' or not record.employee_id or record.holiday_status_id.limit:
continue
leave_days = self.pool.get('hr.holidays.status').get_days(cr, uid, [record.holiday_status_id.id], record.employee_id.id, context=context)[record.holiday_status_id.id]
if leave_days['remaining_leaves'] < record.number_of_days_temp:
raise osv.except_osv(_('Warning!'),
_('There are not enough remaining days available in %s for employee %s.') % (record.holiday_status_id.name, record.employee_id.name))
if leave_days['virtual_remaining_leaves'] < record.number_of_days_temp:
raise osv.except_osv(_('Warning!'),
_('Other pending requests already book too much days in %s for employee %s.') % (record.holiday_status_id.name, record.employee_id.name))
if leave_days['remaining_leaves'] < 0 or leave_days['virtual_remaining_leaves'] < 0:
# Raising a warning gives a more user-friendly feedback than the default constraint error
raise Warning(_('The number of remaining leaves is not sufficient for this leave type.\n'
'Please verify also the leaves waiting for validation.'))
return True
# -----------------------------

View File

@ -23,6 +23,7 @@
<record model="workflow.activity" id="act_draft"> <!-- draft -->
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">draft</field>
<field name="flow_start" eval="False"/>
<field name="kind">function</field>
<field name="action">holidays_reset()</field>
</record>
@ -30,7 +31,7 @@
<record model="workflow.activity" id="act_confirm"> <!-- submitted -->
<field name="wkf_id" ref="wkf_holidays" />
<field name="name">confirm</field>
<field name="flow_start">True</field>
<field name="flow_start" eval="True"/>
<field name="kind">function</field>
<field name="action">holidays_confirm()</field>
<field name="split_mode">OR</field>

View File

@ -23,6 +23,7 @@ from datetime import datetime
from dateutil.relativedelta import relativedelta
from openerp.addons.hr_holidays.tests.common import TestHrHolidaysBase
from openerp.exceptions import Warning
from openerp.osv.orm import except_orm
from openerp.tools import mute_logger
@ -203,5 +204,5 @@ class TestHolidaysFlow(TestHrHolidaysBase):
'date_to': (datetime.today() + relativedelta(days=7)),
'number_of_days_temp': 4,
})
with self.assertRaises(except_orm):
with self.assertRaises(Warning):
self.hr_holidays.signal_confirm(cr, self.user_hrmanager_id, [hol2_id])

View File

@ -79,7 +79,15 @@
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0")]})
action_result = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {
"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0")]
})
invoice_pool = self.pool.get('account.invoice')
invoice_domain = action_result['domain']
invoice_ids = invoice_pool.search(cr, uid, invoice_domain)
invoice_pool.write(cr, uid, invoice_ids, {'origin': 'test-hrtsic0_id_'+str( ref("hr_timesheet_invoice_create_0")) \
+ '_aaldyfhrm0_id_'+str( ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0") ) })
-
I check that Invoice is created for this timesheet.
-
@ -90,7 +98,9 @@
partner = aline.account_id.partner_id.id
invoice_obj = self.pool.get('account.invoice')
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner)])
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner),
('origin', '=', 'test-hrtsic0_id_'+str( ref("hr_timesheet_invoice_create_0")) + '_aaldyfhrm0_id_'+str( ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0") ))
])
invoice_id = invoice_obj.browse(cr, uid, invoice_ids)[0]
for invoice in invoice_id.invoice_line:
@ -102,4 +112,4 @@
assert aline.invoice_id, "Invoice created, but analytic line wasn't updated."
assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line"
assert invoice_id.amount_untaxed == 187.5, "Invoice amount mismatch: %s" % invoice_id.amount_untaxed
assert invoice_id.amount_tax == 50, "Invoice tax mismatch: %s" % invoice_id.amount_tax
assert invoice_id.amount_tax == 50, "Invoice tax mismatch: %s" % invoice_id.amount_tax

View File

@ -78,7 +78,14 @@
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule1")]})
action_result = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {
"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule1")]
})
invoice_pool = self.pool.get('account.invoice')
invoice_domain = action_result['domain']
invoice_ids = invoice_pool.search(cr, uid, invoice_domain)
invoice_pool.write(cr, uid, invoice_ids, {'origin': 'test-hrtsic0_id_'+str( ref("hr_timesheet_invoice_create_0"))\
+ '_aaldyfhrm1_id_'+str( ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule1") ) })
-
I check that Invoice is created for this timesheet.
-
@ -89,7 +96,10 @@
partner = aline.account_id.partner_id.id
invoice_obj = self.pool.get('account.invoice')
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner)])
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner),
('origin', '=', 'test-hrtsic0_id_'+str( ref("hr_timesheet_invoice_create_0")) + '_aaldyfhrm1_id_'+str( ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule1") ))
])
invoice_id = invoice_obj.browse(cr, uid, invoice_ids)[0]
for invoice in invoice_id.invoice_line:
@ -101,4 +111,4 @@
assert aline.invoice_id, "Invoice created, but analytic line wasn't updated."
assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line"
assert invoice_id.amount_untaxed == 187.5, "Invoice amount mismatch: %s" % invoice_id.amount_untaxed
assert invoice_id.amount_tax == 40, "Invoice tax mismatch: %s" % invoice_id.amount_tax
assert invoice_id.amount_tax == 40, "Invoice tax mismatch: %s" % invoice_id.amount_tax

View File

@ -242,6 +242,22 @@
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_out_ipi24" model="account.tax.template">
<field name="description">IPI 24%</field>
<field name="name">IPI Saída 24%</field>
<field name="amount">0.24</field>
<field name="type_tax_use">sale</field>
<field ref="account_template_201010301" name="account_collected_id"/>
<field ref="account_template_101050502" name="account_paid_id"/>
<field eval="0" name="price_include"/>
<field eval="0" name="tax_discount"/>
<field ref="l10n_br_account_chart_template" name="chart_template_id"/>
<field ref="tax_code_template_ipi" name="base_code_id"/>
<field ref="tax_code_template_ipi" name="tax_code_id"/>
<field ref="tax_code_template_ipi" name="ref_base_code_id"/>
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_out_ipi25" model="account.tax.template">
<field name="description">IPI 25%</field>
<field name="name">IPI Saída 25%</field>
@ -386,6 +402,22 @@
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_out_ipi300" model="account.tax.template">
<field name="description">IPI 300%</field>
<field name="name">IPI Saída 300%</field>
<field name="amount">3.00</field>
<field name="type_tax_use">sale</field>
<field ref="account_template_201010301" name="account_collected_id"/>
<field ref="account_template_101050502" name="account_paid_id"/>
<field eval="0" name="price_include"/>
<field eval="0" name="tax_discount"/>
<field ref="l10n_br_account_chart_template" name="chart_template_id"/>
<field ref="tax_code_template_ipi" name="base_code_id"/>
<field ref="tax_code_template_ipi" name="tax_code_id"/>
<field ref="tax_code_template_ipi" name="ref_base_code_id"/>
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_out_ipi330" model="account.tax.template">
<field name="description">IPI 330%</field>
<field name="name">IPI Saída 330%</field>
@ -642,6 +674,22 @@
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_in_ipi24" model="account.tax.template">
<field name="description">IPI 24%</field>
<field name="name">IPI Entrada 24%</field>
<field name="amount">0.24</field>
<field name="type_tax_use">purchase</field>
<field ref="account_template_101050502" name="account_collected_id"/>
<field ref="account_template_201010301" name="account_paid_id"/>
<field eval="0" name="price_include"/>
<field eval="0" name="tax_discount"/>
<field ref="l10n_br_account_chart_template" name="chart_template_id"/>
<field ref="tax_code_template_ipi" name="base_code_id"/>
<field ref="tax_code_template_ipi" name="tax_code_id"/>
<field ref="tax_code_template_ipi" name="ref_base_code_id"/>
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_in_ipi25" model="account.tax.template">
<field name="description">IPI 25%</field>
<field name="name">IPI Entrada 25%</field>
@ -786,6 +834,22 @@
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_in_ipi300" model="account.tax.template">
<field name="description">IPI 300%</field>
<field name="name">IPI Entrada 300%</field>
<field name="amount">3.00</field>
<field name="type_tax_use">purchase</field>
<field ref="account_template_101050502" name="account_collected_id"/>
<field ref="account_template_201010301" name="account_paid_id"/>
<field eval="0" name="price_include"/>
<field eval="0" name="tax_discount"/>
<field ref="l10n_br_account_chart_template" name="chart_template_id"/>
<field ref="tax_code_template_ipi" name="base_code_id"/>
<field ref="tax_code_template_ipi" name="tax_code_id"/>
<field ref="tax_code_template_ipi" name="ref_base_code_id"/>
<field ref="tax_code_template_ipi" name="ref_tax_code_id"/>
</record>
<record id="tax_template_in_ipi330" model="account.tax.template">
<field name="description">IPI 330%</field>
<field name="name">IPI Entrada 330%</field>

View File

@ -28,38 +28,53 @@
<!-- Zone Intracommunautaire B2B -->
<!-- ventes -->
<!-- 19,6% -->
<!-- Taux Normal -->
<record id="fp_tax_template_intraeub2b_vt_normale" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_normale" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- 8,5% -->
<record id="fp_tax_template_intraeub2b_vt_normale_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_normale_temp" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- Taux DOM-TOM -->
<record id="fp_tax_template_intraeub2b_vt_specifique" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_specifique" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- 7% -->
<record id="fp_tax_template_intraeub2b_vt_specifique_1" model="account.fiscal.position.tax.template">
<!-- Taux Intermédiaire -->
<record id="fp_tax_template_intraeub2b_vt_intermediaire" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_specifique_1" />
<field name="tax_src_id" ref="tva_intermediaire" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- 5,5% -->
<record id="fp_tax_template_intraeub2b_vt_intermediaire_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_intermediaire_temp" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- Taux réduit -->
<record id="fp_tax_template_intraeub2b_vt_reduite" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_reduite" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- 2,1% -->
<record id="fp_tax_template_intraeub2b_vt_reduite_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_reduite_temp" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- Taux super réduit -->
<record id="fp_tax_template_intraeub2b_vt_super_reduite" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_super_reduite" />
<field name="tax_dest_id" ref="tva_intra_0" />
</record>
<!-- achats -->
<!-- 19,6% -->
<!-- Taux Normal -->
<record id="fp_tax_template_intraeub2b_ha_normale_deduc" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_normale" />
@ -70,7 +85,18 @@
<field name="tax_src_id" ref="tva_acq_normale" />
<field name="tax_dest_id" ref="tva_acq_intra_normale" />
</record>
<!-- 8,5% -->
<record id="fp_tax_template_intraeub2b_ha_normale_deduc_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_normale_temp" />
<field name="tax_dest_id" ref="tva_intra_normale_temp" />
</record>
<record id="fp_tax_template_intraeub2b_ha_normale_acq_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_normale_temp" />
<field name="tax_dest_id" ref="tva_acq_intra_normale_temp" />
</record>
<!-- Taux DOM-TOM -->
<record id="fp_tax_template_intraeub2b_ha_specifique_deduc" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_specifique" />
@ -81,18 +107,29 @@
<field name="tax_src_id" ref="tva_acq_specifique" />
<field name="tax_dest_id" ref="tva_acq_intra_specifique" />
</record>
<!-- 7% -->
<record id="fp_tax_template_intraeub2b_ha_specifique_1_deduc" model="account.fiscal.position.tax.template">
<!-- Taux Intermédiaire -->
<record id="fp_tax_template_intraeub2b_ha_intermediaire_deduc" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_specifique_1" />
<field name="tax_dest_id" ref="tva_intra_specifique_1" />
<field name="tax_src_id" ref="tva_acq_intermediaire" />
<field name="tax_dest_id" ref="tva_intra_intermediaire" />
</record>
<record id="fp_tax_template_intraeub2b_ha_specifique_1_acq" model="account.fiscal.position.tax.template">
<record id="fp_tax_template_intraeub2b_ha_intermediaire_acq" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_specifique_1" />
<field name="tax_dest_id" ref="tva_acq_intra_specifique_1" />
<field name="tax_src_id" ref="tva_acq_intermediaire" />
<field name="tax_dest_id" ref="tva_acq_intra_intermediaire" />
</record>
<!-- 5,5% -->
<record id="fp_tax_template_intraeub2b_ha_intermediaire_deduc_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_intermediaire_temp" />
<field name="tax_dest_id" ref="tva_intra_intermediaire_temp" />
</record>
<record id="fp_tax_template_intraeub2b_ha_intermediaire_acq_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_intermediaire_temp" />
<field name="tax_dest_id" ref="tva_acq_intra_intermediaire_temp" />
</record>
<!-- Taux réduit -->
<record id="fp_tax_template_intraeub2b_ha_reduite_deduc" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_reduite" />
@ -103,7 +140,18 @@
<field name="tax_src_id" ref="tva_acq_reduite" />
<field name="tax_dest_id" ref="tva_acq_intra_reduite" />
</record>
<!-- 2,1% -->
<record id="fp_tax_template_intraeub2b_ha_reduite_deduc_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_reduite_temp" />
<field name="tax_dest_id" ref="tva_intra_reduite_temp" />
</record>
<record id="fp_tax_template_intraeub2b_ha_reduite_acq_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_reduite_temp" />
<field name="tax_dest_id" ref="tva_acq_intra_reduite_temp" />
</record>
<!-- Taux super réduit -->
<record id="fp_tax_template_intraeub2b_ha_super_reduite_deduc" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_intraeub2b" />
<field name="tax_src_id" ref="tva_acq_super_reduite" />
@ -117,31 +165,46 @@
<!-- Import/Export + DOM/TOM -->
<!-- ventes -->
<!-- 19,6% -->
<!-- Taux Normal -->
<record id="fp_tax_template_impexp_vt_normale" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_normale" />
<field name="tax_dest_id" ref="tva_export_0" />
</record>
<!-- 8,5% -->
<record id="fp_tax_template_impexp_vt_normale_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_normale_temp" />
<field name="tax_dest_id" ref="tva_export_0" />
</record>
<!-- Taux DOM-TOM -->
<record id="fp_tax_template_impexp_vt_specifique" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_specifique" />
<field name="tax_dest_id" ref="tva_export_0" />
</record>
<!-- 7% -->
<record id="fp_tax_template_impexp_vt_specifique_1" model="account.fiscal.position.tax.template">
<!-- Taux Intermédiare -->
<record id="fp_tax_template_impexp_vt_intermediaire" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_specifique_1" />
<field name="tax_src_id" ref="tva_intermediaire" />
<field name="tax_dest_id" ref="tva_export_0" />
</record>
<!-- 5,5% -->
<record id="fp_tax_template_impexp_vt_intermediaire_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_intermediaire_temp" />
<field name="tax_dest_id" ref="tva_export_0" />
</record>
<!-- Taux Réduit -->
<record id="fp_tax_template_impexp_vt_reduite" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_reduite" />
<field name="tax_dest_id" ref="tva_export_0" />
</record>
<!-- 2,1% -->
<record id="fp_tax_template_impexp_vt_reduite_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_reduite_temp" />
<field name="tax_dest_id" ref="tva_export_0" />
</record>
<!-- Taux super réduit -->
<record id="fp_tax_template_impexp_vt_super_reduite" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_super_reduite" />
@ -149,31 +212,47 @@
</record>
<!-- achats -->
<!-- 19,6% -->
<!-- Taux Normal -->
<record id="fp_tax_template_impexp_ha_normale" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_normale" />
<field name="tax_dest_id" ref="tva_import_0" />
</record>
<!-- 8,5% -->
<record id="fp_tax_template_impexp_ha_normale_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_normale_temp" />
<field name="tax_dest_id" ref="tva_import_0" />
</record>
<!-- Taux DOM-TOM -->
<record id="fp_tax_template_impexp_ha_specifique" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_specifique" />
<field name="tax_dest_id" ref="tva_import_0" />
</record>
<!-- 7% -->
<record id="fp_tax_template_impexp_ha_specifique_1" model="account.fiscal.position.tax.template">
<!-- Taux Intermédiare -->
<record id="fp_tax_template_impexp_ha_intermediaire" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_specifique_1" />
<field name="tax_src_id" ref="tva_acq_intermediaire" />
<field name="tax_dest_id" ref="tva_import_0" />
</record>
<!-- 5,5% -->
<record id="fp_tax_template_impexp_ha_intermediaire_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_intermediaire_temp" />
<field name="tax_dest_id" ref="tva_import_0" />
</record>
<!-- Taux Réduit -->
<record id="fp_tax_template_impexp_ha_reduite" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_reduite" />
<field name="tax_dest_id" ref="tva_import_0" />
</record>
<!-- 2,1% -->
<record id="fp_tax_template_impexp_ha_reduite_temp" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_reduite_temp" />
<field name="tax_dest_id" ref="tva_import_0" />
</record>
<!-- Taux super réduit -->
<record id="fp_tax_template_impexp_ha_super_reduite" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_import_export" />
<field name="tax_src_id" ref="tva_acq_super_reduite" />

View File

@ -4,11 +4,11 @@
<!--
Définition des Tax Codes
Version du fichier : 07-05-2012
Version du fichier : 30-09-2013
-->
<!--
Tax Code Configuration (version générique)
Tax Code Configuration
-->
<record id="vat_code_chart_root" model="account.tax.code.template">
<field name="name">Plan de Taxes France</field>
@ -20,24 +20,42 @@
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record model="account.tax.code.template" id="tax_col_200_ht">
<field name="name">Base H.T. 20.0%</field>
<field name="code">TVA collectée 20.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_col_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_196_ht">
<field name="name">Base H.T. 19.6%</field>
<field name="code">TVA collectée 19.6% (Base H.T.)</field>
<field name="parent_id" ref="tax_col_ht"/>
<field name="sign">1.00</field>
</record>
</record>
<record model="account.tax.code.template" id="tax_col_85_ht">
<field name="name">Base H.T. 8.5%</field>
<field name="code">TVA collectée 8.5% (Base H.T.)</field>
<field name="parent_id" ref="tax_col_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_100_ht">
<field name="name">Base H.T. 10.0%</field>
<field name="code">TVA collectée 10.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_col_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_70_ht">
<field name="name">Base H.T. 7.0%</field>
<field name="code">TVA collectée 7.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_col_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_50_ht">
<field name="name">Base H.T. 5.0%</field>
<field name="code">TVA collectée 5.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_col_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_55_ht">
<field name="name">Base H.T. 5.5%</field>
<field name="code">TVA collectée 5.5% (Base H.T.)</field>
@ -57,6 +75,12 @@
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record model="account.tax.code.template" id="tax_col_200">
<field name="name">TVA 20.0%</field>
<field name="code">TVA collectée 20.0%</field>
<field name="parent_id" ref="tax_col"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_196">
<field name="name">TVA 19.6%</field>
<field name="code">TVA collectée 19.6%</field>
@ -68,6 +92,12 @@
<field name="code">TVA collectée 8.5%</field>
<field name="parent_id" ref="tax_col"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_100">
<field name="name">TVA 10.0%</field>
<field name="code">TVA collectée 10.0%</field>
<field name="parent_id" ref="tax_col"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_70">
<field name="name">TVA 7.0%</field>
@ -75,6 +105,12 @@
<field name="parent_id" ref="tax_col"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_50">
<field name="name">TVA 5.0%</field>
<field name="code">TVA collectée 5.0%</field>
<field name="parent_id" ref="tax_col"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_col_55">
<field name="name">TVA 5.5%</field>
<field name="code">TVA collectée 5.5%</field>
@ -88,14 +124,18 @@
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_ht">
<field name="name">Base H.T. TVA acquittée</field>
<field name="code">c)</field>
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record model="account.tax.code.template" id="tax_acq_200_ht">
<field name="name">Base H.T. 20.0%</field>
<field name="code">TVA acquittée 20.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_196_ht">
<field name="name">Base H.T. 19.6%</field>
<field name="code">TVA acquittée 19.6% (Base H.T.)</field>
@ -108,12 +148,24 @@
<field name="parent_id" ref="tax_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_100_ht">
<field name="name">Base H.T. 10.0%</field>
<field name="code">TVA acquittée 10.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_70_ht">
<field name="name">Base H.T. 7.0%</field>
<field name="code">TVA acquittée 7.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_50_ht">
<field name="name">Base H.T. 5.0%</field>
<field name="code">TVA acquittée 5.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_55_ht">
<field name="name">Base H.T. 5.5%</field>
<field name="code">TVA acquittée 5.5% (Base H.T.)</field>
@ -133,6 +185,12 @@
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
<record model="account.tax.code.template" id="tax_acq_200">
<field name="name">TVA 20.0%</field>
<field name="code">TVA acquittée 20.0%</field>
<field name="parent_id" ref="tax_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_196">
<field name="name">TVA 19.6%</field>
<field name="code">TVA acquittée 19.6%</field>
@ -145,12 +203,24 @@
<field name="parent_id" ref="tax_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_100">
<field name="name">TVA 10.0%</field>
<field name="code">TVA acquittée 10.0%</field>
<field name="parent_id" ref="tax_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_70">
<field name="name">TVA 7.0%</field>
<field name="code">TVA acquittée 7.0%</field>
<field name="parent_id" ref="tax_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_50">
<field name="name">TVA 5.0%</field>
<field name="code">TVA acquittée 5.0%</field>
<field name="parent_id" ref="tax_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_acq_55">
<field name="name">TVA 5.5%</field>
<field name="code">TVA acquittée 5.5%</field>
@ -171,7 +241,13 @@
<field name="code">e)</field>
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
</record>
<record model="account.tax.code.template" id="tax_imm_200_ht">
<field name="name">Base H.T. 20.0%</field>
<field name="code">TVA acquittée sur immobilisations 20.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_imm_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_196_ht">
<field name="name">Base H.T. 19.6%</field>
<field name="code">TVA acquittée sur immobilisations 19.6% (Base H.T.)</field>
@ -184,12 +260,24 @@
<field name="parent_id" ref="tax_imm_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_100_ht">
<field name="name">Base H.T. 10.0%</field>
<field name="code">TVA acquittée sur immobilisations 10.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_imm_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_70_ht">
<field name="name">Base H.T. 7.0%</field>
<field name="code">TVA acquittée sur immobilisations 7.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_imm_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_50_ht">
<field name="name">Base H.T. 5.0%</field>
<field name="code">TVA acquittée sur immobilisations 5.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_imm_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_55_ht">
<field name="name">Base H.T. 5.5%</field>
<field name="code">TVA acquittée sur immobilisations 5.5% (Base H.T.)</field>
@ -209,7 +297,13 @@
<field name="code">f)</field>
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
</record>
<record model="account.tax.code.template" id="tax_imm_200">
<field name="name">TVA 20.0%</field>
<field name="code">TVA acquittée sur immobilisations 20.0%</field>
<field name="parent_id" ref="tax_imm"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_196">
<field name="name">TVA 19.6%</field>
<field name="code">TVA acquittée sur immobilisations 19.6%</field>
@ -222,12 +316,24 @@
<field name="parent_id" ref="tax_imm"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_100">
<field name="name">TVA 10.0%</field>
<field name="code">TVA acquittée sur immobilisations 10.0%</field>
<field name="parent_id" ref="tax_imm"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_70">
<field name="name">TVA 7.0%</field>
<field name="code">TVA acquittée sur immobilisations 7.0%</field>
<field name="parent_id" ref="tax_imm"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_50">
<field name="name">TVA 5.0%</field>
<field name="code">TVA acquittée sur immobilisations 5.0%</field>
<field name="parent_id" ref="tax_imm"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_imm_55">
<field name="name">TVA 5.5%</field>
<field name="code">TVA acquittée sur immobilisations 5.5%</field>
@ -246,7 +352,13 @@
<field name="code">g)</field>
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
</record>
<record model="account.tax.code.template" id="tax_intra_200_ht">
<field name="name">Base H.T. 20.0%</field>
<field name="code">TVA due intracommunautaire 20.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_196_ht">
<field name="name">Base H.T. 19.6%</field>
<field name="code">TVA due intracommunautaire 19.6% (Base H.T.)</field>
@ -259,12 +371,24 @@
<field name="parent_id" ref="tax_intra_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_100_ht">
<field name="name">Base H.T. 10.0%</field>
<field name="code">TVA due intracommunautaire 10.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_70_ht">
<field name="name">Base H.T. 7.0%</field>
<field name="code">TVA due intracommunautaire 7.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_50_ht">
<field name="name">Base H.T. 5.0%</field>
<field name="code">TVA due intracommunautaire 5.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_55_ht">
<field name="name">Base H.T. 5.5%</field>
<field name="code">TVA due intracommunautaire 5.5% (Base H.T.)</field>
@ -283,7 +407,13 @@
<field name="code">h)</field>
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
</record>
<record model="account.tax.code.template" id="tax_intra_200">
<field name="name">TVA 20.0%</field>
<field name="code">TVA due intracommunautaire 20.0%</field>
<field name="parent_id" ref="tax_intra"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_196">
<field name="name">TVA 19.6%</field>
<field name="code">TVA due intracommunautaire 19.6%</field>
@ -296,12 +426,24 @@
<field name="parent_id" ref="tax_intra"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_100">
<field name="name">TVA 10.0%</field>
<field name="code">TVA due intracommunautaire 10.0%</field>
<field name="parent_id" ref="tax_intra"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_70">
<field name="name">TVA 7.0%</field>
<field name="code">TVA due intracommunautaire 7.0%</field>
<field name="parent_id" ref="tax_intra"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_50">
<field name="name">TVA 5.0%</field>
<field name="code">TVA due intracommunautaire 5.0%</field>
<field name="parent_id" ref="tax_intra"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_55">
<field name="name">TVA 5.5%</field>
<field name="code">TVA due intracommunautaire 5.5%</field>
@ -321,7 +463,13 @@
<field name="code">i)</field>
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_200_ht">
<field name="name">Base H.T. 20.0%</field>
<field name="code">TVA déductible intracommunautaire 20.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_196_ht">
<field name="name">Base H.T. 19.6%</field>
<field name="code">TVA déductible intracommunautaire 19.6% (Base H.T.)</field>
@ -334,12 +482,24 @@
<field name="parent_id" ref="tax_intra_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_100_ht">
<field name="name">Base H.T. 10.0%</field>
<field name="code">TVA déductible intracommunautaire 10.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_70_ht">
<field name="name">Base H.T. 7.0%</field>
<field name="code">TVA déductible intracommunautaire 7.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_50_ht">
<field name="name">Base H.T. 5.0%</field>
<field name="code">TVA déductible intracommunautaire 5.0% (Base H.T.)</field>
<field name="parent_id" ref="tax_intra_acq_ht"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_55_ht">
<field name="name">Base H.T. 5.5%</field>
<field name="code">TVA déductible intracommunautaire 5.5% (Base H.T.)</field>
@ -358,7 +518,13 @@
<field name="code">j)</field>
<field name="sign">1.00</field>
<field name="parent_id" ref="vat_code_chart_root"/>
</record>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_200">
<field name="name">TVA 20.0%</field>
<field name="code">TVA déductible intracommunautaire 20.0%</field>
<field name="parent_id" ref="tax_intra_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_196">
<field name="name">TVA 19.6%</field>
<field name="code">TVA déductible intracommunautaire 19.6%</field>
@ -371,12 +537,24 @@
<field name="parent_id" ref="tax_intra_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_100">
<field name="name">TVA 10.0%</field>
<field name="code">TVA déductible intracommunautaire 10.0%</field>
<field name="parent_id" ref="tax_intra_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_70">
<field name="name">TVA 7.0%</field>
<field name="code">TVA déductible intracommunautaire 7.0%</field>
<field name="parent_id" ref="tax_intra_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_50">
<field name="name">TVA 5.0%</field>
<field name="code">TVA déductible intracommunautaire 5.0%</field>
<field name="parent_id" ref="tax_intra_acq"/>
<field name="sign">1.00</field>
</record>
<record model="account.tax.code.template" id="tax_intra_acq_55">
<field name="name">TVA 5.5%</field>
<field name="code">TVA déductible intracommunautaire 5.5%</field>

View File

@ -9,6 +9,28 @@
<!-- VENTES Tax excluded from price -->
<record model="account.tax.template" id="tva_normale">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA collectée (vente) 20,0%</field>
<field name="description">20.0</field>
<field name="amount" eval="0.200"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_col_200_ht"/>
<field name="base_sign" eval="1"/>
<field name="tax_code_id" ref="tax_col_200"/>
<field name="tax_sign" eval="1"/>
<field name="account_collected_id" ref="pcg_445711"/>
<field name="account_paid_id" ref="pcg_445711"/>
<field name="ref_base_code_id" ref="tax_col_200_ht"/>
<field name="ref_base_sign" eval="-1"/>
<field name="ref_tax_code_id" ref="tax_col_200"/>
<field name="ref_tax_sign" eval="-1"/>
<field name="sequence" eval="1"/>
<field name="type_tax_use">sale</field>
</record>
<record model="account.tax.template" id="tva_normale_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA collectée (vente) 19,6%</field>
<field name="description">19.6</field>
@ -26,7 +48,7 @@
<field name="ref_base_sign" eval="-1"/>
<field name="ref_tax_code_id" ref="tax_col_196"/>
<field name="ref_tax_sign" eval="-1"/>
<field name="sequence" eval="0"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">sale</field>
</record>
@ -52,7 +74,29 @@
<field name="type_tax_use">sale</field>
</record>
<record model="account.tax.template" id="tva_specifique_1">
<record model="account.tax.template" id="tva_intermediaire">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA collectée (vente) 10,0%</field>
<field name="description">10.0</field>
<field name="amount" eval="0.10"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_col_100_ht"/>
<field name="base_sign" eval="1"/>
<field name="tax_code_id" ref="tax_col_100"/>
<field name="tax_sign" eval="1"/>
<field name="account_collected_id" ref="pcg_445712"/>
<field name="account_paid_id" ref="pcg_445712"/>
<field name="ref_base_code_id" ref="tax_col_100_ht"/>
<field name="ref_base_sign" eval="-1"/>
<field name="ref_tax_code_id" ref="tax_col_100"/>
<field name="ref_tax_sign" eval="-1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">sale</field>
</record>
<record model="account.tax.template" id="tva_intermediaire_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA collectée (vente) 7,0%</field>
<field name="description">7.0</field>
@ -63,8 +107,8 @@
<field name="tax_code_id" ref="tax_col_70"/>
<field name="tax_sign" eval="1"/>
<field name="account_collected_id" ref="pcg_445713"/>
<field name="account_paid_id" ref="pcg_445713"/>
<field name="account_collected_id" ref="pcg_445712"/>
<field name="account_paid_id" ref="pcg_445712"/>
<field name="ref_base_code_id" ref="tax_col_70_ht"/>
<field name="ref_base_sign" eval="-1"/>
@ -75,6 +119,28 @@
</record>
<record model="account.tax.template" id="tva_reduite">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA collectée (vente) 5,0%</field>
<field name="description">5.0</field>
<field name="amount" eval="0.050"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_col_50_ht"/>
<field name="base_sign" eval="1"/>
<field name="tax_code_id" ref="tax_col_50"/>
<field name="tax_sign" eval="1"/>
<field name="account_collected_id" ref="pcg_445713"/>
<field name="account_paid_id" ref="pcg_445713"/>
<field name="ref_base_code_id" ref="tax_col_50_ht"/>
<field name="ref_base_sign" eval="-1"/>
<field name="ref_tax_code_id" ref="tax_col_50"/>
<field name="ref_tax_sign" eval="-1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">sale</field>
</record>
<record model="account.tax.template" id="tva_reduite_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA collectée (vente) 5,5%</field>
<field name="description">5.5</field>
@ -85,8 +151,8 @@
<field name="tax_code_id" ref="tax_col_55"/>
<field name="tax_sign" eval="1"/>
<field name="account_collected_id" ref="pcg_445712"/>
<field name="account_paid_id" ref="pcg_445712"/>
<field name="account_collected_id" ref="pcg_445713"/>
<field name="account_paid_id" ref="pcg_445713"/>
<field name="ref_base_code_id" ref="tax_col_55_ht"/>
<field name="ref_base_sign" eval="-1"/>
@ -121,6 +187,28 @@
<!-- ACHATS Tax excluded from price -->
<record model="account.tax.template" id="tva_acq_normale">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 20,0%</field>
<field name="description">ACH-20.0</field>
<field name="amount" eval="0.200"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_acq_200_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_acq_200"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44566"/>
<field name="account_paid_id" ref="pcg_44566"/>
<field name="ref_base_code_id" ref="tax_acq_200_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_acq_200"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="1"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_normale_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 19,6%</field>
<field name="description">ACH-19.6</field>
@ -138,7 +226,7 @@
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_acq_196"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="0"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
@ -164,7 +252,29 @@
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_specifique_1">
<record model="account.tax.template" id="tva_acq_intermediaire">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 10,0%</field>
<field name="description">ACH-10.0</field>
<field name="amount" eval="0.10"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_acq_100_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_acq_100"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44566"/>
<field name="account_paid_id" ref="pcg_44566"/>
<field name="ref_base_code_id" ref="tax_acq_100_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_acq_100"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_intermediaire_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 7,0%</field>
<field name="description">ACH-7.0</field>
@ -187,6 +297,28 @@
</record>
<record model="account.tax.template" id="tva_acq_reduite">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 5,0%</field>
<field name="description">ACH-5.0</field>
<field name="amount" eval="0.050"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_acq_50_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_acq_50"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44566"/>
<field name="account_paid_id" ref="pcg_44566"/>
<field name="ref_base_code_id" ref="tax_acq_50_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_acq_50"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_reduite_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 5,5%</field>
<field name="description">ACH-5.5</field>
@ -233,6 +365,29 @@
<!-- ACHATS Tax included in price -->
<record model="account.tax.template" id="tva_acq_normale_TTC">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 20,0% TTC</field>
<field name="description">ACH-20.0-TTC</field>
<field name="price_include" eval="1"/>
<field name="amount" eval="0.200"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_acq_200_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_acq_200"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44566"/>
<field name="account_paid_id" ref="pcg_44566"/>
<field name="ref_base_code_id" ref="tax_acq_200_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_acq_200"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_normale_TTC_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 19,6% TTC</field>
<field name="description">ACH-19.6-TTC</field>
@ -278,7 +433,30 @@
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_specifique_1_TTC">
<record model="account.tax.template" id="tva_acq_intermediaire_TTC">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 10,0% TTC</field>
<field name="description">ACH-10.0-TTC</field>
<field name="price_include" eval="1"/>
<field name="amount" eval="0.10"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_acq_100_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_acq_100"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44566"/>
<field name="account_paid_id" ref="pcg_44566"/>
<field name="ref_base_code_id" ref="tax_acq_100_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_acq_100"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_intermediaire_TTC_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 7,0% TTC</field>
<field name="description">ACH-7.0-TTC</field>
@ -302,6 +480,29 @@
</record>
<record model="account.tax.template" id="tva_acq_reduite_TTC">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 5,0% TTC</field>
<field name="description">ACH-5.0-TTC</field>
<field name="price_include" eval="1"/>
<field name="amount" eval="0.050"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_acq_50_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_acq_50"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44566"/>
<field name="account_paid_id" ref="pcg_44566"/>
<field name="ref_base_code_id" ref="tax_acq_50_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_acq_50"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_reduite_TTC_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déductible (achat) 5,5% TTC</field>
<field name="description">ACH-5.5-TTC</field>
@ -351,6 +552,28 @@
<!-- ImmoBILISATIONS (achats) -->
<record model="account.tax.template" id="tva_imm_normale">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd./immobilisation (achat) 20,0%</field>
<field name="description">IMMO-20.0</field>
<field name="amount" eval="0.200"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_imm_200_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_imm_200"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44562"/>
<field name="account_paid_id" ref="pcg_44562"/>
<field name="ref_base_code_id" ref="tax_imm_200_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_imm_200"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_imm_normale_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd./immobilisation (achat) 19,6%</field>
<field name="description">IMMO-19.6</field>
@ -394,7 +617,29 @@
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_imm_specifique_1">
<record model="account.tax.template" id="tva_imm_intermediaire">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd./immobilisation (achat) 10,0%</field>
<field name="description">IMMO-10.0</field>
<field name="amount" eval="0.10"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_imm_100_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_imm_100"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44562"/>
<field name="account_paid_id" ref="pcg_44562"/>
<field name="ref_base_code_id" ref="tax_imm_100_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_imm_100"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_imm_intermediaire_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd./immobilisation (achat) 7,0%</field>
<field name="description">IMMO-7.0</field>
@ -417,6 +662,28 @@
</record>
<record model="account.tax.template" id="tva_imm_reduite">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd./immobilisation (achat) 5,0%</field>
<field name="description">IMMO-5.0</field>
<field name="amount" eval="0.050"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_imm_50_ht"/>
<field name="base_sign" eval="-1"/>
<field name="tax_code_id" ref="tax_imm_50"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44562"/>
<field name="account_paid_id" ref="pcg_44562"/>
<field name="ref_base_code_id" ref="tax_imm_50_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_imm_50"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_imm_reduite_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd./immobilisation (achat) 5,5%</field>
<field name="description">IMMO-5.5</field>
@ -463,6 +730,28 @@
<!-- VENTES INTRACOMMUNAUTAIRE -->
<record model="account.tax.template" id="tva_intra_normale">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA due s/ acq. intracommunautaire (achat) 20,0%</field> <!-- ventes -->
<field name="description">ACH_UE_due-20.0</field>
<field name="amount" eval="-0.200"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_intra_200_ht"/>
<field name="base_sign" eval="-1" />
<field name="tax_code_id" ref="tax_intra_200"/>
<field name="tax_sign" eval="-1" />
<field name="account_collected_id" ref="pcg_445201"/>
<field name="account_paid_id" ref="pcg_445201"/>
<field name="ref_base_code_id" ref="tax_intra_200_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_intra_200"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_intra_normale_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA due s/ acq. intracommunautaire (achat) 19,6%</field> <!-- ventes -->
<field name="description">ACH_UE_due-19.6</field>
@ -506,7 +795,29 @@
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_intra_specifique_1">
<record model="account.tax.template" id="tva_intra_intermediaire">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA due s/ acq. intracommunautaire (achat) 10,0%</field>
<field name="description">ACH_UE_due-10.0</field>
<field name="amount" eval="-0.10"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_intra_100_ht"/>
<field name="base_sign" eval="-1" />
<field name="tax_code_id" ref="tax_intra_100"/>
<field name="tax_sign" eval="-1" />
<field name="account_collected_id" ref="pcg_445202"/>
<field name="account_paid_id" ref="pcg_445202"/>
<field name="ref_base_code_id" ref="tax_intra_100_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_intra_100"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_intra_intermediaire_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA due s/ acq. intracommunautaire (achat) 7,0%</field>
<field name="description">ACH_UE_due-7.0</field>
@ -517,8 +828,8 @@
<field name="tax_code_id" ref="tax_intra_70"/>
<field name="tax_sign" eval="-1" />
<field name="account_collected_id" ref="pcg_445203"/>
<field name="account_paid_id" ref="pcg_445203"/>
<field name="account_collected_id" ref="pcg_445202"/>
<field name="account_paid_id" ref="pcg_445202"/>
<field name="ref_base_code_id" ref="tax_intra_70_ht"/>
<field name="ref_base_sign" eval="1"/>
@ -529,6 +840,28 @@
</record>
<record model="account.tax.template" id="tva_intra_reduite">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA due s/ acq. intracommunautaire (achat) 5,0%</field>
<field name="description">ACH_UE_due-5.0</field>
<field name="amount" eval="-0.050"/>
<field name="type">percent</field>
<field name="base_code_id" ref="tax_intra_50_ht"/>
<field name="base_sign" eval="-1" />
<field name="tax_code_id" ref="tax_intra_50"/>
<field name="tax_sign" eval="-1" />
<field name="account_collected_id" ref="pcg_445203"/>
<field name="account_paid_id" ref="pcg_445203"/>
<field name="ref_base_code_id" ref="tax_intra_50_ht"/>
<field name="ref_base_sign" eval="1"/>
<field name="ref_tax_code_id" ref="tax_intra_50"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_intra_reduite_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA due s/ acq. intracommunautaire (achat) 5,5%</field>
<field name="description">ACH_UE_due-5.5</field>
@ -539,8 +872,8 @@
<field name="tax_code_id" ref="tax_intra_55"/>
<field name="tax_sign" eval="-1" />
<field name="account_collected_id" ref="pcg_445202"/>
<field name="account_paid_id" ref="pcg_445202"/>
<field name="account_collected_id" ref="pcg_445203"/>
<field name="account_paid_id" ref="pcg_445203"/>
<field name="ref_base_code_id" ref="tax_intra_55_ht"/>
<field name="ref_base_sign" eval="1"/>
@ -575,6 +908,24 @@
<!-- ACHATS INTRACOMMUNAUTAIRE -->
<record model="account.tax.template" id="tva_acq_intra_normale">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 20,0%</field>
<field name="description">ACH_UE_ded.-20.0</field>
<field name="amount" eval="0.200"/>
<field name="type">percent</field>
<field name="tax_code_id" ref="tax_intra_acq_200"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_445662"/>
<field name="account_paid_id" ref="pcg_445662"/>
<field name="ref_tax_code_id" ref="tax_intra_acq_200"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_intra_normale_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 19,6%</field>
<field name="description">ACH_UE_ded.-19.6</field>
@ -610,7 +961,25 @@
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_intra_specifique_1">
<record model="account.tax.template" id="tva_acq_intra_intermediaire">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 10,0%</field>
<field name="description">ACH_UE_ded.-10.0</field>
<field name="amount" eval="0.10"/>
<field name="type">percent</field>
<field name="tax_code_id" ref="tax_intra_acq_100"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_445662"/>
<field name="account_paid_id" ref="pcg_445662"/>
<field name="ref_tax_code_id" ref="tax_intra_acq_100"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_intra_intermediaire_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 7,0%</field>
<field name="description">ACH_UE_ded.-7.0</field>
@ -629,6 +998,24 @@
</record>
<record model="account.tax.template" id="tva_acq_intra_reduite">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 5,0%</field>
<field name="description">ACH_UE_ded.-5.0</field>
<field name="amount" eval="0.050"/>
<field name="type">percent</field>
<field name="tax_code_id" ref="tax_intra_acq_50"/>
<field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_445662"/>
<field name="account_paid_id" ref="pcg_445662"/>
<field name="ref_tax_code_id" ref="tax_intra_acq_50"/>
<field name="ref_tax_sign" eval="1"/>
<field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
</record>
<record model="account.tax.template" id="tva_acq_intra_reduite_temp">
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
<field name="name">TVA déd. s/ acq. intracommunautaire (achat) 5,5%</field>
<field name="description">ACH_UE_ded.-5.5</field>

View File

@ -3584,7 +3584,7 @@
</record>
<record id="pcg_445201" model="account.account.template">
<field name="name">TVA due intracommunautaire 19,6%</field>
<field name="name">TVA due intracommunautaire (Taux Normal)</field>
<field name="code">445201</field>
<field name="type">other</field>
<field name="user_type" ref="account.data_account_type_liability"/>
@ -3592,7 +3592,7 @@
</record>
<record id="pcg_445202" model="account.account.template">
<field name="name">TVA due intracommunautaire 5,5%</field>
<field name="name">TVA due intracommunautaire (Taux Intermédiaire)</field>
<field name="code">445202</field>
<field name="type">other</field>
<field name="user_type" ref="account.data_account_type_liability"/>
@ -3600,7 +3600,7 @@
</record>
<record id="pcg_445203" model="account.account.template">
<field name="name">TVA due intracommunautaire (autre taux)</field>
<field name="name">TVA due intracommunautaire (Autre taux)</field>
<field name="code">445203</field>
<field name="type">other</field>
<field name="user_type" ref="account.data_account_type_liability"/>
@ -3712,7 +3712,7 @@
</record>
<record id="pcg_445711" model="account.account.template">
<field name="name">TVA collectée 19,6%</field>
<field name="name">TVA collectée (Taux Normal)</field>
<field name="code">445711</field>
<field name="type">other</field>
<field name="user_type" ref="account.data_account_type_liability"/>
@ -3720,7 +3720,7 @@
</record>
<record id="pcg_445712" model="account.account.template">
<field name="name">TVA collectée 5,5%</field>
<field name="name">TVA collectée (Taux Intermédiaire)</field>
<field name="code">445712</field>
<field name="type">other</field>
<field name="user_type" ref="account.data_account_type_liability"/>
@ -3728,7 +3728,7 @@
</record>
<record id="pcg_445713" model="account.account.template">
<field name="name">TVA collectée (autre taux)</field>
<field name="name">TVA collectée (Autre taux)</field>
<field name="code">445713</field>
<field name="type">other</field>
<field name="user_type" ref="account.data_account_type_liability"/>

View File

@ -75,3 +75,21 @@ IVC21Idet40,template_impcode_pagata_21det40,IVA a credito 21% detraibile 40% (im
IVC21det50,template_ivacode_pagata_21det50,IVA a credito 21% detraibile 50%,template_ivacode_pagata
IVC21Ndet50,template_ivacode_pagata_21det50ind,IVA a credito 21% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC21Idet50,template_impcode_pagata_21det50,IVA a credito 21% detraibile 50% (imponibile),template_impcode_pagata
IVC22,template_ivacode_pagata_22,IVA a credito 22%,template_ivacode_pagata
IVC22I,template_impcode_pagata_22,IVA a credito 22% (imponibile),template_impcode_pagata
IVD22,template_ivacode_riscossa_22,IVA a debito 22%,template_ivacode_riscossa
IVD22I,template_impcode_riscossa_22,IVA a debito 22% (imponibile),template_impcode_riscossa
IVC22ind,template_ivacode_pagata_22ind,IVA a credito 22% indetraibile,template_ivacode_pagata_ind
IVC22Iind,template_impcode_pagata_22ind,IVA a credito 22% indetraibile (imponibile),template_impcode_pagata
IVC22det10,template_ivacode_pagata_22det10,IVA a credito 22% detraibile 10%,template_ivacode_pagata
IVC22Ndet10,template_ivacode_pagata_22det10ind,IVA a credito 22% detraibile 10% (indetraibile),template_ivacode_pagata_ind
IVC22Idet10,template_impcode_pagata_22det10,IVA a credito 22% detraibile 10% (imponibile),template_impcode_pagata
IVC22det15,template_ivacode_pagata_22det15,IVA a credito 22% detraibile 15%,template_ivacode_pagata
IVC22Ndet15,template_ivacode_pagata_22det15ind,IVA a credito 22% detraibile 15% (indetraibile),template_ivacode_pagata_ind
IVC22Idet15,template_impcode_pagata_22det15,IVA a credito 22% detraibile 15% (imponibile),template_impcode_pagata
IVC22det40,template_ivacode_pagata_22det40,IVA a credito 22% detraibile 40%,template_ivacode_pagata
IVC22Ndet40,template_ivacode_pagata_22det40ind,IVA a credito 22% detraibile 40% (indetraibile),template_ivacode_pagata_ind
IVC22Idet40,template_impcode_pagata_22det40,IVA a credito 22% detraibile 40% (imponibile),template_impcode_pagata
IVC22det50,template_ivacode_pagata_22det50,IVA a credito 22% detraibile 50%,template_ivacode_pagata
IVC22Ndet50,template_ivacode_pagata_22det50ind,IVA a credito 22% detraibile 50% (indetraibile),template_ivacode_pagata_ind
IVC22Idet50,template_impcode_pagata_22det50,IVA a credito 22% detraibile 50% (imponibile),template_impcode_pagata

1 code id name parent_id:id
75 IVC21det50 template_ivacode_pagata_21det50 IVA a credito 21% detraibile 50% template_ivacode_pagata
76 IVC21Ndet50 template_ivacode_pagata_21det50ind IVA a credito 21% detraibile 50% (indetraibile) template_ivacode_pagata_ind
77 IVC21Idet50 template_impcode_pagata_21det50 IVA a credito 21% detraibile 50% (imponibile) template_impcode_pagata
78 IVC22 template_ivacode_pagata_22 IVA a credito 22% template_ivacode_pagata
79 IVC22I template_impcode_pagata_22 IVA a credito 22% (imponibile) template_impcode_pagata
80 IVD22 template_ivacode_riscossa_22 IVA a debito 22% template_ivacode_riscossa
81 IVD22I template_impcode_riscossa_22 IVA a debito 22% (imponibile) template_impcode_riscossa
82 IVC22ind template_ivacode_pagata_22ind IVA a credito 22% indetraibile template_ivacode_pagata_ind
83 IVC22Iind template_impcode_pagata_22ind IVA a credito 22% indetraibile (imponibile) template_impcode_pagata
84 IVC22det10 template_ivacode_pagata_22det10 IVA a credito 22% detraibile 10% template_ivacode_pagata
85 IVC22Ndet10 template_ivacode_pagata_22det10ind IVA a credito 22% detraibile 10% (indetraibile) template_ivacode_pagata_ind
86 IVC22Idet10 template_impcode_pagata_22det10 IVA a credito 22% detraibile 10% (imponibile) template_impcode_pagata
87 IVC22det15 template_ivacode_pagata_22det15 IVA a credito 22% detraibile 15% template_ivacode_pagata
88 IVC22Ndet15 template_ivacode_pagata_22det15ind IVA a credito 22% detraibile 15% (indetraibile) template_ivacode_pagata_ind
89 IVC22Idet15 template_impcode_pagata_22det15 IVA a credito 22% detraibile 15% (imponibile) template_impcode_pagata
90 IVC22det40 template_ivacode_pagata_22det40 IVA a credito 22% detraibile 40% template_ivacode_pagata
91 IVC22Ndet40 template_ivacode_pagata_22det40ind IVA a credito 22% detraibile 40% (indetraibile) template_ivacode_pagata_ind
92 IVC22Idet40 template_impcode_pagata_22det40 IVA a credito 22% detraibile 40% (imponibile) template_impcode_pagata
93 IVC22det50 template_ivacode_pagata_22det50 IVA a credito 22% detraibile 50% template_ivacode_pagata
94 IVC22Ndet50 template_ivacode_pagata_22det50ind IVA a credito 22% detraibile 50% (indetraibile) template_ivacode_pagata_ind
95 IVC22Idet50 template_impcode_pagata_22det50 IVA a credito 22% detraibile 50% (imponibile) template_impcode_pagata

View File

@ -1,6 +1,8 @@
id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depend,type,account_collected_id:id,account_paid_id:id,type_tax_use,base_code_id:id,tax_code_id:id,ref_base_code_id:id,ref_tax_code_id:id,ref_base_sign,ref_tax_sign,price_include,base_sign,tax_sign
21v,21v,l10n_it_chart_template_generic,Iva al 21% (debito),1,0.21,,False,percent,2601,2601,sale,template_impcode_riscossa_21,template_ivacode_riscossa_21,template_impcode_riscossa_21,template_ivacode_riscossa_21,-1,-1,False,1,1
21a,21a,l10n_it_chart_template_generic,Iva al 21% (credito),2,0.21,,False,percent,1601,1601,purchase,template_impcode_pagata_21,template_ivacode_pagata_21,template_impcode_pagata_21,template_ivacode_pagata_21,1,1,False,-1,-1
22v,22v,l10n_it_chart_template_generic,Iva al 22% (debito),1,0.22,,False,percent,2601,2601,sale,template_impcode_riscossa_22,template_ivacode_riscossa_22,template_impcode_riscossa_22,template_ivacode_riscossa_22,-1,-1,False,1,1
22a,22a,l10n_it_chart_template_generic,Iva al 22% (credito),2,0.22,,False,percent,1601,1601,purchase,template_impcode_pagata_22,template_ivacode_pagata_22,template_impcode_pagata_22,template_ivacode_pagata_22,1,1,False,-1,-1
21v,21v,l10n_it_chart_template_generic,Iva al 21% (debito),3,0.21,,False,percent,2601,2601,sale,template_impcode_riscossa_21,template_ivacode_riscossa_21,template_impcode_riscossa_21,template_ivacode_riscossa_21,-1,-1,False,1,1
21a,21a,l10n_it_chart_template_generic,Iva al 21% (credito),4,0.21,,False,percent,1601,1601,purchase,template_impcode_pagata_21,template_ivacode_pagata_21,template_impcode_pagata_21,template_ivacode_pagata_21,1,1,False,-1,-1
20v,20v,l10n_it_chart_template_generic,Iva al 20% (debito),3,0.2,,False,percent,2601,2601,sale,template_impcode_riscossa_20,template_ivacode_riscossa_20,template_impcode_riscossa_20,template_ivacode_riscossa_20,-1,-1,False,1,1
20a,20a,l10n_it_chart_template_generic,Iva al 20% (credito),4,0.2,,False,percent,1601,1601,purchase,template_impcode_pagata_20,template_ivacode_pagata_20,template_impcode_pagata_20,template_ivacode_pagata_20,1,1,False,-1,-1
10v,10v,l10n_it_chart_template_generic,Iva al 10% (debito),5,0.1,,False,percent,2601,2601,sale,template_impcode_riscossa_10,template_ivacode_riscossa_10,template_impcode_riscossa_10,template_ivacode_riscossa_10,-1,-1,False,1,1
@ -25,8 +27,8 @@ id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depe
20I5,20I5,l10n_it_chart_template_generic,IVA al 20% detraibile al 50%,14,0.2,,True,percent,,,purchase,template_impcode_pagata_20det50,,template_impcode_pagata_20det50,,1,1,False,-1,-1
20I5b,20I5b,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (D),200,0,20I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_20det50,,template_ivacode_pagata_20det50,1,1,False,-1,-1
20I5a,20I5a,l10n_it_chart_template_generic,IVA al 20% detraibile al 50% (I),100,0.5,20I5,False,percent,,,purchase,,template_ivacode_pagata_20det50ind,,template_ivacode_pagata_20det50ind,1,1,False,-1,-1
22v,22v,l10n_it_chart_template_generic,Iva 2% (debito),15,0.02,,False,percent,2601,2601,sale,template_impcode_riscossa_2,template_ivacode_riscossa_2,template_impcode_riscossa_2,template_ivacode_riscossa_2,-1,-1,False,1,1
22a,22a,l10n_it_chart_template_generic,Iva 2% (credito),16,0.02,,False,percent,1601,1601,purchase,template_impcode_pagata_2,template_ivacode_pagata_2,template_impcode_pagata_2,template_ivacode_pagata_2,1,1,False,-1,-1
2v,2v,l10n_it_chart_template_generic,Iva 2% (debito),15,0.02,,False,percent,2601,2601,sale,template_impcode_riscossa_2,template_ivacode_riscossa_2,template_impcode_riscossa_2,template_ivacode_riscossa_2,-1,-1,False,1,1
2a,2a,l10n_it_chart_template_generic,Iva 2% (credito),16,0.02,,False,percent,1601,1601,purchase,template_impcode_pagata_2,template_ivacode_pagata_2,template_impcode_pagata_2,template_ivacode_pagata_2,1,1,False,-1,-1
4v,4v,l10n_it_chart_template_generic,Iva 4% (debito),17,0.04,,False,percent,2601,2601,sale,template_impcode_riscossa_4,template_ivacode_riscossa_4,template_impcode_riscossa_4,template_ivacode_riscossa_4,-1,-1,False,1,1
4a,4a,l10n_it_chart_template_generic,Iva 4% (credito),18,0.04,,False,percent,1601,1601,purchase,template_impcode_pagata_4,template_ivacode_pagata_4,template_impcode_pagata_4,template_ivacode_pagata_4,1,1,False,-1,-1
4AO,4AO,l10n_it_chart_template_generic,Iva al 4% indetraibile,19,0.04,,True,percent,,,purchase,template_impcode_pagata_4ind,,template_impcode_pagata_4ind,,1,1,False,-1,-1
@ -42,11 +44,12 @@ id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depe
00a,00a,l10n_it_chart_template_generic,Fuori Campo IVA (credito),23,0,,False,percent,1601,1601,purchase,template_impcode_pagata_0,template_ivacode_pagata_0,template_impcode_pagata_0,template_ivacode_pagata_0,1,1,False,-1,-1
00art15v,00art15v,l10n_it_chart_template_generic,Imponibile Escluso Art.15 (debito),22,0,,False,percent,2601,2601,sale,template_impcode_riscossa_art15,template_ivacode_riscossa_art15,template_impcode_riscossa_art15,template_ivacode_riscossa_art15,-1,-1,False,1,1
00art15a,00art15a,l10n_it_chart_template_generic,Imponibile Escluso Art.15 (credito),23,0,,False,percent,1601,1601,purchase,template_impcode_pagata_art15,template_ivacode_pagata_art15,template_impcode_pagata_art15,template_ivacode_pagata_art15,1,1,False,-1,-1
21v INC,21v INC,l10n_it_chart_template_generic,Iva al 21% (debito) INC,24,0.21,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,-1,-1,True,1,1
22v INC,22v INC,l10n_it_chart_template_generic,Iva al 22% (debito) INC,24,0.22,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_22,l10n_it.template_ivacode_riscossa_22,l10n_it.template_impcode_riscossa_22,l10n_it.template_ivacode_riscossa_22,-1,-1,True,1,1
21v INC,21v INC,l10n_it_chart_template_generic,Iva al 21% (debito) INC,25,0.21,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,l10n_it.template_impcode_riscossa_21,l10n_it.template_ivacode_riscossa_21,-1,-1,True,1,1
20v INC,20v INC,l10n_it_chart_template_generic,Iva al 20% (debito) INC,25,0.2,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,l10n_it.template_impcode_riscossa_20,l10n_it.template_ivacode_riscossa_20,-1,-1,True,1,1
10v INC,10v INC,l10n_it_chart_template_generic,Iva al 10% (debito) INC,26,0.1,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,l10n_it.template_impcode_riscossa_10,l10n_it.template_ivacode_riscossa_10,-1,-1,True,1,1
12v INC,12v INC,l10n_it_chart_template_generic,Iva 12% (debito) INC,27,0.12,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,l10n_it.template_impcode_riscossa_12,l10n_it.template_ivacode_riscossa_12,-1,-1,True,1,1
22v INC,22v INC,l10n_it_chart_template_generic,Iva 2% (debito) INC,28,0.02,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,-1,-1,True,1,1
2v INC,2v INC,l10n_it_chart_template_generic,Iva 2% (debito) INC,28,0.02,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,l10n_it.template_impcode_riscossa_2,l10n_it.template_ivacode_riscossa_2,-1,-1,True,1,1
4v INC,4v INC,l10n_it_chart_template_generic,Iva 4% (debito) INC,29,0.04,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,l10n_it.template_impcode_riscossa_4,l10n_it.template_ivacode_riscossa_4,-1,-1,True,1,1
00v INC,00v INC,l10n_it_chart_template_generic,Fuori Campo IVA (debito) INC,30,0,,False,percent,l10n_it.2601,l10n_it.2601,sale,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,l10n_it.template_impcode_riscossa_0,l10n_it.template_ivacode_riscossa_0,-1,-1,True,1,1
2110,2110,l10n_it_chart_template_generic,Iva al 21% detraibile 10%,31,0.21,,True,percent,,,purchase,template_impcode_pagata_21det10,,template_impcode_pagata_21det10,,1,1,False,-1,-1
@ -64,3 +67,18 @@ id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depe
21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,35,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,1,1,False,-1,-1
21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),200,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,1,1,False,-1,-1
21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),100,0.5,21I5,False,percent,,,purchase,,template_ivacode_pagata_21det50ind,,template_ivacode_pagata_21det50ind,1,1,False,-1,-1
2210,2210,l10n_it_chart_template_generic,Iva al 22% detraibile 10%,31,0.22,,True,percent,,,purchase,template_impcode_pagata_22det10,,template_impcode_pagata_22det10,,1,1,False,-1,-1
2210b,2210b,l10n_it_chart_template_generic,Iva al 22% detraibile 10% (D),200,0,2210,False,balance,1601,1601,purchase,,template_ivacode_pagata_22det10,,template_ivacode_pagata_22det10,1,1,False,-1,-1
2210a,2210a,l10n_it_chart_template_generic,Iva al 22% detraibile 10% (I),100,0.9,2210,False,percent,,,purchase,,template_ivacode_pagata_22det10ind,,template_ivacode_pagata_22det10ind,1,1,False,-1,-1
2215,2215,l10n_it_chart_template_generic,Iva al 22% detraibile 15%,32,0.22,,True,percent,,,purchase,template_impcode_pagata_22det15,,template_impcode_pagata_22det15,,1,1,False,-1,-1
2215b,2215b,l10n_it_chart_template_generic,Iva al 22% detraibile 15% (D),200,0,2215,False,balance,1601,1601,purchase,,template_ivacode_pagata_22det15,,template_ivacode_pagata_22det15,1,1,False,-1,-1
2215a,2215a,l10n_it_chart_template_generic,Iva al 22% detraibile 15% (I),100,0.85,2215,False,percent,,,purchase,,template_ivacode_pagata_22det15ind,,template_ivacode_pagata_22det15ind,1,1,False,-1,-1
2240,2240,l10n_it_chart_template_generic,Iva al 22% detraibile 40%,33,0.22,,True,percent,,,purchase,template_impcode_pagata_22det40,,template_impcode_pagata_22det40,,1,1,False,-1,-1
2240b,2240b,l10n_it_chart_template_generic,Iva al 22% detraibile 40% (D),200,0,2240,False,balance,1601,1601,purchase,,template_ivacode_pagata_22det40,,template_ivacode_pagata_22det40,1,1,False,-1,-1
2240a,2240a,l10n_it_chart_template_generic,Iva al 22% detraibile 40% (I),100,0.6,2240,False,percent,,,purchase,,template_ivacode_pagata_22det40ind,,template_ivacode_pagata_22det40ind,1,1,False,-1,-1
22AO,22AO,l10n_it_chart_template_generic,Iva al 22% indetraibile,34,0.22,,True,percent,,,purchase,template_impcode_pagata_22ind,,template_impcode_pagata_22ind,,1,1,False,-1,-1
22AOb,22AOb,l10n_it_chart_template_generic,Iva al 22% indetraibile (D),200,0,22AO,False,balance,1601,1601,purchase,,template_ivacode_pagata_22ind,,template_ivacode_pagata_22ind,1,1,False,-1,-1
22AOa,22AOa,l10n_it_chart_template_generic,Iva al 22% indetraibile (I),100,1,22AO,False,percent,,,purchase,,template_ivacode_pagata_22ind,,template_ivacode_pagata_22ind,1,1,False,-1,-1
22I5,22I5,l10n_it_chart_template_generic,IVA al 22% detraibile al 50%,35,0.22,,True,percent,,,purchase,template_impcode_pagata_22det50,,template_impcode_pagata_22det50,,1,1,False,-1,-1
22I5b,22I5b,l10n_it_chart_template_generic,IVA al 22% detraibile al 50% (D),200,0,22I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_22det50,,template_ivacode_pagata_22det50,1,1,False,-1,-1
22I5a,22I5a,l10n_it_chart_template_generic,IVA al 22% detraibile al 50% (I),100,0.5,22I5,False,percent,,,purchase,,template_ivacode_pagata_22det50ind,,template_ivacode_pagata_22det50ind,1,1,False,-1,-1

1 id description chart_template_id:id name sequence amount parent_id:id child_depend type account_collected_id:id account_paid_id:id type_tax_use base_code_id:id tax_code_id:id ref_base_code_id:id ref_tax_code_id:id ref_base_sign ref_tax_sign price_include base_sign tax_sign
2 21v 22v 21v 22v l10n_it_chart_template_generic Iva al 21% (debito) Iva al 22% (debito) 1 0.21 0.22 False percent 2601 2601 sale template_impcode_riscossa_21 template_impcode_riscossa_22 template_ivacode_riscossa_21 template_ivacode_riscossa_22 template_impcode_riscossa_21 template_impcode_riscossa_22 template_ivacode_riscossa_21 template_ivacode_riscossa_22 -1 -1 False 1 1
3 21a 22a 21a 22a l10n_it_chart_template_generic Iva al 21% (credito) Iva al 22% (credito) 2 0.21 0.22 False percent 1601 1601 purchase template_impcode_pagata_21 template_impcode_pagata_22 template_ivacode_pagata_21 template_ivacode_pagata_22 template_impcode_pagata_21 template_impcode_pagata_22 template_ivacode_pagata_21 template_ivacode_pagata_22 1 1 False -1 -1
4 21v 21v l10n_it_chart_template_generic Iva al 21% (debito) 3 0.21 False percent 2601 2601 sale template_impcode_riscossa_21 template_ivacode_riscossa_21 template_impcode_riscossa_21 template_ivacode_riscossa_21 -1 -1 False 1 1
5 21a 21a l10n_it_chart_template_generic Iva al 21% (credito) 4 0.21 False percent 1601 1601 purchase template_impcode_pagata_21 template_ivacode_pagata_21 template_impcode_pagata_21 template_ivacode_pagata_21 1 1 False -1 -1
6 20v 20v l10n_it_chart_template_generic Iva al 20% (debito) 3 0.2 False percent 2601 2601 sale template_impcode_riscossa_20 template_ivacode_riscossa_20 template_impcode_riscossa_20 template_ivacode_riscossa_20 -1 -1 False 1 1
7 20a 20a l10n_it_chart_template_generic Iva al 20% (credito) 4 0.2 False percent 1601 1601 purchase template_impcode_pagata_20 template_ivacode_pagata_20 template_impcode_pagata_20 template_ivacode_pagata_20 1 1 False -1 -1
8 10v 10v l10n_it_chart_template_generic Iva al 10% (debito) 5 0.1 False percent 2601 2601 sale template_impcode_riscossa_10 template_ivacode_riscossa_10 template_impcode_riscossa_10 template_ivacode_riscossa_10 -1 -1 False 1 1
27 20I5 20I5 l10n_it_chart_template_generic IVA al 20% detraibile al 50% 14 0.2 True percent purchase template_impcode_pagata_20det50 template_impcode_pagata_20det50 1 1 False -1 -1
28 20I5b 20I5b l10n_it_chart_template_generic IVA al 20% detraibile al 50% (D) 200 0 20I5 False balance 1601 1601 purchase template_ivacode_pagata_20det50 template_ivacode_pagata_20det50 1 1 False -1 -1
29 20I5a 20I5a l10n_it_chart_template_generic IVA al 20% detraibile al 50% (I) 100 0.5 20I5 False percent purchase template_ivacode_pagata_20det50ind template_ivacode_pagata_20det50ind 1 1 False -1 -1
30 22v 2v 22v 2v l10n_it_chart_template_generic Iva 2% (debito) 15 0.02 False percent 2601 2601 sale template_impcode_riscossa_2 template_ivacode_riscossa_2 template_impcode_riscossa_2 template_ivacode_riscossa_2 -1 -1 False 1 1
31 22a 2a 22a 2a l10n_it_chart_template_generic Iva 2% (credito) 16 0.02 False percent 1601 1601 purchase template_impcode_pagata_2 template_ivacode_pagata_2 template_impcode_pagata_2 template_ivacode_pagata_2 1 1 False -1 -1
32 4v 4v l10n_it_chart_template_generic Iva 4% (debito) 17 0.04 False percent 2601 2601 sale template_impcode_riscossa_4 template_ivacode_riscossa_4 template_impcode_riscossa_4 template_ivacode_riscossa_4 -1 -1 False 1 1
33 4a 4a l10n_it_chart_template_generic Iva 4% (credito) 18 0.04 False percent 1601 1601 purchase template_impcode_pagata_4 template_ivacode_pagata_4 template_impcode_pagata_4 template_ivacode_pagata_4 1 1 False -1 -1
34 4AO 4AO l10n_it_chart_template_generic Iva al 4% indetraibile 19 0.04 True percent purchase template_impcode_pagata_4ind template_impcode_pagata_4ind 1 1 False -1 -1
44 00a 00a l10n_it_chart_template_generic Fuori Campo IVA (credito) 23 0 False percent 1601 1601 purchase template_impcode_pagata_0 template_ivacode_pagata_0 template_impcode_pagata_0 template_ivacode_pagata_0 1 1 False -1 -1
45 00art15v 00art15v l10n_it_chart_template_generic Imponibile Escluso Art.15 (debito) 22 0 False percent 2601 2601 sale template_impcode_riscossa_art15 template_ivacode_riscossa_art15 template_impcode_riscossa_art15 template_ivacode_riscossa_art15 -1 -1 False 1 1
46 00art15a 00art15a l10n_it_chart_template_generic Imponibile Escluso Art.15 (credito) 23 0 False percent 1601 1601 purchase template_impcode_pagata_art15 template_ivacode_pagata_art15 template_impcode_pagata_art15 template_ivacode_pagata_art15 1 1 False -1 -1
47 21v INC 22v INC 21v INC 22v INC l10n_it_chart_template_generic Iva al 21% (debito) INC Iva al 22% (debito) INC 24 0.21 0.22 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_21 l10n_it.template_impcode_riscossa_22 l10n_it.template_ivacode_riscossa_21 l10n_it.template_ivacode_riscossa_22 l10n_it.template_impcode_riscossa_21 l10n_it.template_impcode_riscossa_22 l10n_it.template_ivacode_riscossa_21 l10n_it.template_ivacode_riscossa_22 -1 -1 True 1 1
48 21v INC 21v INC l10n_it_chart_template_generic Iva al 21% (debito) INC 25 0.21 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_21 l10n_it.template_ivacode_riscossa_21 l10n_it.template_impcode_riscossa_21 l10n_it.template_ivacode_riscossa_21 -1 -1 True 1 1
49 20v INC 20v INC l10n_it_chart_template_generic Iva al 20% (debito) INC 25 0.2 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_20 l10n_it.template_ivacode_riscossa_20 l10n_it.template_impcode_riscossa_20 l10n_it.template_ivacode_riscossa_20 -1 -1 True 1 1
50 10v INC 10v INC l10n_it_chart_template_generic Iva al 10% (debito) INC 26 0.1 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_10 l10n_it.template_ivacode_riscossa_10 l10n_it.template_impcode_riscossa_10 l10n_it.template_ivacode_riscossa_10 -1 -1 True 1 1
51 12v INC 12v INC l10n_it_chart_template_generic Iva 12% (debito) INC 27 0.12 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_12 l10n_it.template_ivacode_riscossa_12 l10n_it.template_impcode_riscossa_12 l10n_it.template_ivacode_riscossa_12 -1 -1 True 1 1
52 22v INC 2v INC 22v INC 2v INC l10n_it_chart_template_generic Iva 2% (debito) INC 28 0.02 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_2 l10n_it.template_ivacode_riscossa_2 l10n_it.template_impcode_riscossa_2 l10n_it.template_ivacode_riscossa_2 -1 -1 True 1 1
53 4v INC 4v INC l10n_it_chart_template_generic Iva 4% (debito) INC 29 0.04 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_4 l10n_it.template_ivacode_riscossa_4 l10n_it.template_impcode_riscossa_4 l10n_it.template_ivacode_riscossa_4 -1 -1 True 1 1
54 00v INC 00v INC l10n_it_chart_template_generic Fuori Campo IVA (debito) INC 30 0 False percent l10n_it.2601 l10n_it.2601 sale l10n_it.template_impcode_riscossa_0 l10n_it.template_ivacode_riscossa_0 l10n_it.template_impcode_riscossa_0 l10n_it.template_ivacode_riscossa_0 -1 -1 True 1 1
55 2110 2110 l10n_it_chart_template_generic Iva al 21% detraibile 10% 31 0.21 True percent purchase template_impcode_pagata_21det10 template_impcode_pagata_21det10 1 1 False -1 -1
67 21I5 21I5 l10n_it_chart_template_generic IVA al 21% detraibile al 50% 35 0.21 True percent purchase template_impcode_pagata_21det50 template_impcode_pagata_21det50 1 1 False -1 -1
68 21I5b 21I5b l10n_it_chart_template_generic IVA al 21% detraibile al 50% (D) 200 0 21I5 False balance 1601 1601 purchase template_ivacode_pagata_21det50 template_ivacode_pagata_21det50 1 1 False -1 -1
69 21I5a 21I5a l10n_it_chart_template_generic IVA al 21% detraibile al 50% (I) 100 0.5 21I5 False percent purchase template_ivacode_pagata_21det50ind template_ivacode_pagata_21det50ind 1 1 False -1 -1
70 2210 2210 l10n_it_chart_template_generic Iva al 22% detraibile 10% 31 0.22 True percent purchase template_impcode_pagata_22det10 template_impcode_pagata_22det10 1 1 False -1 -1
71 2210b 2210b l10n_it_chart_template_generic Iva al 22% detraibile 10% (D) 200 0 2210 False balance 1601 1601 purchase template_ivacode_pagata_22det10 template_ivacode_pagata_22det10 1 1 False -1 -1
72 2210a 2210a l10n_it_chart_template_generic Iva al 22% detraibile 10% (I) 100 0.9 2210 False percent purchase template_ivacode_pagata_22det10ind template_ivacode_pagata_22det10ind 1 1 False -1 -1
73 2215 2215 l10n_it_chart_template_generic Iva al 22% detraibile 15% 32 0.22 True percent purchase template_impcode_pagata_22det15 template_impcode_pagata_22det15 1 1 False -1 -1
74 2215b 2215b l10n_it_chart_template_generic Iva al 22% detraibile 15% (D) 200 0 2215 False balance 1601 1601 purchase template_ivacode_pagata_22det15 template_ivacode_pagata_22det15 1 1 False -1 -1
75 2215a 2215a l10n_it_chart_template_generic Iva al 22% detraibile 15% (I) 100 0.85 2215 False percent purchase template_ivacode_pagata_22det15ind template_ivacode_pagata_22det15ind 1 1 False -1 -1
76 2240 2240 l10n_it_chart_template_generic Iva al 22% detraibile 40% 33 0.22 True percent purchase template_impcode_pagata_22det40 template_impcode_pagata_22det40 1 1 False -1 -1
77 2240b 2240b l10n_it_chart_template_generic Iva al 22% detraibile 40% (D) 200 0 2240 False balance 1601 1601 purchase template_ivacode_pagata_22det40 template_ivacode_pagata_22det40 1 1 False -1 -1
78 2240a 2240a l10n_it_chart_template_generic Iva al 22% detraibile 40% (I) 100 0.6 2240 False percent purchase template_ivacode_pagata_22det40ind template_ivacode_pagata_22det40ind 1 1 False -1 -1
79 22AO 22AO l10n_it_chart_template_generic Iva al 22% indetraibile 34 0.22 True percent purchase template_impcode_pagata_22ind template_impcode_pagata_22ind 1 1 False -1 -1
80 22AOb 22AOb l10n_it_chart_template_generic Iva al 22% indetraibile (D) 200 0 22AO False balance 1601 1601 purchase template_ivacode_pagata_22ind template_ivacode_pagata_22ind 1 1 False -1 -1
81 22AOa 22AOa l10n_it_chart_template_generic Iva al 22% indetraibile (I) 100 1 22AO False percent purchase template_ivacode_pagata_22ind template_ivacode_pagata_22ind 1 1 False -1 -1
82 22I5 22I5 l10n_it_chart_template_generic IVA al 22% detraibile al 50% 35 0.22 True percent purchase template_impcode_pagata_22det50 template_impcode_pagata_22det50 1 1 False -1 -1
83 22I5b 22I5b l10n_it_chart_template_generic IVA al 22% detraibile al 50% (D) 200 0 22I5 False balance 1601 1601 purchase template_ivacode_pagata_22det50 template_ivacode_pagata_22det50 1 1 False -1 -1
84 22I5a 22I5a l10n_it_chart_template_generic IVA al 22% detraibile al 50% (I) 100 0.5 22I5 False percent purchase template_ivacode_pagata_22det50ind template_ivacode_pagata_22det50ind 1 1 False -1 -1

View File

@ -10,8 +10,9 @@ from openerp.addons.web.controllers.main import content_disposition
class MailController(http.Controller):
_cp_path = '/mail'
@http.httprequest
@http.route('/mail/download_attachment', type='http', auth='user')
def download_attachment(self, req, model, id, method, attachment_id, **kw):
# FIXME use /web/binary/saveas directly
Model = req.session.model(model)
res = getattr(Model, method)(int(id), int(attachment_id))
if res:
@ -20,10 +21,10 @@ class MailController(http.Controller):
if filecontent and filename:
return req.make_response(filecontent,
headers=[('Content-Type', 'application/octet-stream'),
('Content-Disposition', content_disposition(filename, req))])
('Content-Disposition', content_disposition(filename))])
return req.not_found()
@http.jsonrequest
@http.route('/mail/receive', type='json', auth='none')
def receive(self, req):
""" End-point to receive mail from an external SMTP server. """
dbs = req.jsonrequest.get('databases')

View File

@ -1175,7 +1175,7 @@ class mail_thread(osv.AbstractModel):
# get partner info from email
partner_info = self.message_partner_info_from_emails(cr, uid, obj.id, [email], context=context)[0]
if partner_info.get('partner_id'):
partner = self.pool.get('res.partner').browse(cr, SUPERUSER_ID, [partner_info.get('partner_id')], context=context)[0]
partner = self.pool.get('res.partner').browse(cr, SUPERUSER_ID, [partner_info['partner_id']], context=context)[0]
if email and email in [val[1] for val in result[obj.id]]: # already existing email -> skip
return result
if partner and partner in obj.message_follower_ids: # recipient already in the followers -> skip

View File

@ -151,7 +151,7 @@ openerp_mail_followers = function(session, mail) {
},
fetch_followers: function (value_) {
this.value = value_ || {};
this.value = value_ || [];
return this.ds_model.call('read_followers_data', [this.value])
.then(this.proxy('display_followers'), this.proxy('fetch_generic'))
.then(this.proxy('display_buttons'))

View File

@ -6,8 +6,8 @@ import urllib
import urllib2
import openerp
from openerp import release
from openerp.osv import fields, osv
from openerp import release, SUPERUSER_ID
from openerp.osv import osv
from openerp.tools.translate import _
from openerp.tools.safe_eval import safe_eval
from openerp.tools.config import config
@ -86,25 +86,26 @@ class publisher_warranty_contract(osv.osv):
try:
try:
result = get_sys_logs(self, cr, uid)
except Exception, ex:
except Exception:
if cron_mode: # we don't want to see any stack trace in cron
return False
_logger.debug("Exception while sending a get logs messages", exc_info=1)
raise osv.except_osv(_("Error"), _("Error during communication with the publisher warranty server."))
limit_date = (datetime.datetime.now() - _PREVIOUS_LOG_CHECK).strftime(misc.DEFAULT_SERVER_DATETIME_FORMAT)
# old behavior based on res.log; now on mail.message, that is not necessarily installed
proxy = self.pool.get('mail.message')
model, res_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'mail', 'group_all_employees')
IMD = self.pool['ir.model.data']
user = self.pool['res.users'].browse(cr, SUPERUSER_ID, SUPERUSER_ID)
try:
poster = IMD.get_object(cr, SUPERUSER_ID, 'mail', 'group_all_employees')
except ValueError:
# Cannot found group, post the message on the wall of the admin
poster = user
if not poster.exists():
return True
for message in result["messages"]:
values = {
'body' : message,
'model' : 'mail.group',
'res_id' : res_id,
'user_id' : False,
}
proxy.create(cr, uid, values, context=context)
try:
poster.message_post(body=message, subtype='mt_comment', partner_ids=[user.partner_id.id])
except Exception:
_logger.warning('Cannot send ping message', exc_info=True)
except Exception:
if cron_mode:
return False # we don't want to see any stack trace in cron

View File

@ -13,8 +13,17 @@
<field name="res_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="mail_server_id" invisible="1"/>
<!-- Various warnings -->
<field name="use_active_domain" invisible="1"/>
<field name="active_domain" invisible="1"/>
<div colspan="2" class="oe_form_box_info oe_text_center"
attrs="{'invisible': [('use_active_domain', '!=', True)]}">
<p>
<strong>All records matching your current search filter will be mailed,
not only the ids selected in the list view.</strong><br />
If you want to work only with selected ids, please uncheck the
list header checkbox.
</p>
</div>
<!-- visible wizard -->
<field name="email_from"
attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>

View File

@ -518,8 +518,9 @@ class mrp_repair(osv.osv):
'location_dest_id': move.location_dest_id.id,
'tracking_id': False,
'prodlot_id': move.prodlot_id and move.prodlot_id.id or False,
'state': 'done',
'state': 'assigned',
})
move_obj.action_done(cr, uid, [move_id], context=context)
repair_line_obj.write(cr, uid, [move.id], {'move_id': move_id, 'state': 'done'}, context=context)
if repair.deliver_bool:
pick_name = seq_obj.get(cr, uid, 'stock.picking.out')

View File

@ -19,6 +19,7 @@
#
##############################################################################
from openerp import SUPERUSER_ID
from openerp.osv import osv, fields
from openerp.tools import html2plaintext
@ -188,18 +189,15 @@ class res_users(osv.Model):
_inherit = ['res.users']
def create(self, cr, uid, data, context=None):
user_id = super(res_users, self).create(cr, uid, data, context=context)
user = self.browse(cr, uid, uid, context=context)
note_obj = self.pool.get('note.stage')
data_obj = self.pool.get('ir.model.data')
model_id = data_obj.get_object_reference(cr, uid, 'base', 'group_user') #Employee Group
group_id = model_id and model_id[1] or False
if group_id in [x.id for x in user.groups_id]:
for note_xml_id in ['note_stage_00','note_stage_01','note_stage_02','note_stage_03','note_stage_04']:
note_obj = self.pool['note.stage']
data_obj = self.pool['ir.model.data']
is_employee = self.has_group(cr, user_id, 'base.group_user')
if is_employee:
for n in range(5):
xmlid = 'note_stage_%02d' % (n,)
try:
data_id = data_obj._get_id(cr, uid, 'note', note_xml_id)
_model, stage_id = data_obj.get_object_reference(cr, SUPERUSER_ID, 'note', xmlid)
except ValueError:
continue
stage_id = data_obj.browse(cr, uid, data_id, context=context).res_id
note_obj.copy(cr, uid, stage_id, default = {
'user_id': user_id}, context=context)
note_obj.copy(cr, SUPERUSER_ID, stage_id, default={'user_id': user_id}, context=context)
return user_id

View File

@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import test_note
checks = [
test_note,
]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.tests import common
class TestNote(common.TransactionCase):
def test_bug_lp_1156215(self):
"""ensure any users can create new users"""
cr, uid = self.cr, self.uid
IMD = self.registry('ir.model.data')
Users = self.registry('res.users')
_, demo_user = IMD.get_object_reference(cr, uid, 'base', 'user_demo')
_, group_id = IMD.get_object_reference(cr, uid, 'base', 'group_erp_manager')
Users.write(cr, uid, [demo_user], {
'groups_id': [(4, group_id)],
})
# must not fail
Users.create(cr, demo_user, {
'name': 'test bug lp:1156215',
'login': 'lp_1156215',
})

View File

@ -295,7 +295,7 @@ class pos_session(osv.osv):
# open if there is no session in 'opening_control', 'opened', 'closing_control' for one user
domain = [
('state', 'not in', ('closed','closing_control')),
('user_id', '=', uid)
('user_id', '=', session.user_id.id)
]
count = self.search_count(cr, uid, domain, context=context)
if count>1:

View File

@ -35,7 +35,7 @@ class mail_message(osv.Model):
group_ids = self.pool.get('res.users').browse(cr, uid, uid, context=context).groups_id
group_user_id = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'base', 'group_user')[1]
if group_user_id not in [group.id for group in group_ids]:
args = ['&', '|', ('type', '!=', 'comment'), ('subtype_id', '!=', False)] + list(args)
args = [('subtype_id', '!=', False)] + list(args)
return super(mail_message, self)._search(cr, uid, args, offset=offset, limit=limit, order=order,
context=context, count=False, access_rights_uid=access_rights_uid)

View File

@ -210,11 +210,11 @@ class test_portal(TestMail):
msg2_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body2', type='comment', subtype='mail.mt_group_public')
msg3_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body3', type='comment', subtype='mail.mt_comment')
msg4_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body4', type='comment')
msg5_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body5', type='notification')
# msg5_id = self.mail_group.message_post(cr, uid, group_port_id, body='Body5', type='notification')
# Do: Chell search messages: should not see internal notes (comment without subtype)
msg_ids = self.mail_message.search(cr, self.user_chell_id, [('model', '=', 'mail.group'), ('res_id', '=', group_port_id)])
self.assertEqual(set(msg_ids), set([msg1_id, msg2_id, msg3_id, msg5_id]),
self.assertEqual(set(msg_ids), set([msg1_id, msg2_id, msg3_id]),
'mail_message: portal user has access to messages he should not read')
# Do: Chell read messages she can read

View File

@ -33,8 +33,9 @@
</record>
<record model="ir.ui.view" id="portal_hr_kanban_view_employees">
<field name="name">HR - Employees Kanban</field>
<field name="name">HR - Employees Kanban (Portal)</field>
<field name="model">hr.employee</field>
<field name="priority">32</field>
<field name="inherit_id" eval="False"/>
<field name="arch" type="xml">
<kanban create="false">

View File

@ -127,6 +127,22 @@ class procurement_order(osv.osv):
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'procurement.order', context=c)
}
def message_track(self, cr, uid, ids, tracked_fields, initial_values, context=None):
""" Overwrite message_track to avoid tracking more than once the confirm-exception loop
Add '_first_pass_done_' to the note field only the first time stuck in exception state
Will avoid getting furthur confirmed and exception change of state messages
TODO: this hack is necessary for a stable version but should be avoided for the next release.
Instead find a more elegant way to prevent redundant messages or entirely stop tracking states on procurement orders
"""
for proc in self.browse(cr, uid, ids, context=context):
if not proc.note or '_first_pass_done_' not in proc.note or proc.state not in ('confirmed', 'exception'):
super(procurement_order, self).message_track(cr, uid, [proc.id], tracked_fields, initial_values, context=context)
if proc.state == 'exception':
cr.execute("""UPDATE procurement_order set note = CONCAT(note, %s) WHERE id = %s""", ('_first_pass_done_',proc.id))
return True
def unlink(self, cr, uid, ids, context=None):
procurements = self.read(cr, uid, ids, ['state'], context=context)
unlink_ids = []
@ -371,7 +387,6 @@ class procurement_order(osv.osv):
ctx_wkf = dict(context or {})
ctx_wkf['workflow.trg_write.%s' % self._name] = False
self.write(cr, uid, [procurement.id], {'message': message},context=ctx_wkf)
self.message_post(cr, uid, [procurement.id], body=message, context=context)
return ok
def step_workflow(self, cr, uid, ids, context=None):

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
<filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
<field name="categ_id"/>
<group expand="0" string="Context...">
<field name="pricelist_id" context="{'pricelist': self}" filter_domain="[]" groups="product.group_sale_pricelist"/>
<field name="pricelist_id" widget="selection" context="{'pricelist': self}" filter_domain="[]" groups="product.group_sale_pricelist"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group expand='0' string='Group by...'>

View File

@ -407,6 +407,16 @@ class project_issue(osv.Model):
task = self.pool.get('project.task').browse(cr, uid, task_id, context=context)
return {'value': {'user_id': task.user_id.id, }}
def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
""" This function returns value of partner email address based on partner
:param part: Partner's id
"""
result = {}
if partner_id:
partner = self.pool['res.partner'].browse(cr, uid, partner_id, context)
result['email_from'] = partner.email
return {'value': result}
def get_empty_list_help(self, cr, uid, help, context=None):
context['empty_list_help_model'] = 'project.project'
context['empty_list_help_id'] = context.get('default_project_id')

View File

@ -65,7 +65,7 @@
<group>
<field name="user_id"
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="email_from"/>
<label for="project_id"/>
<div>

View File

@ -0,0 +1,72 @@
# Slovenian translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-10-20 08:52+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-10-21 04:36+0000\n"
"X-Generator: Launchpad (build 16807)\n"
#. module: project_issue_sheet
#: code:addons/project_issue_sheet/project_issue_sheet.py:57
#, python-format
msgid "The Analytic Account is pending !"
msgstr ""
#. module: project_issue_sheet
#: model:ir.model,name:project_issue_sheet.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: project_issue_sheet
#: model:ir.model,name:project_issue_sheet.model_project_issue
msgid "Project Issue"
msgstr ""
#. module: project_issue_sheet
#: model:ir.model,name:project_issue_sheet.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr ""
#. module: project_issue_sheet
#: view:project.issue:0
msgid "on_change_project(project_id)"
msgstr ""
#. module: project_issue_sheet
#: code:addons/project_issue_sheet/project_issue_sheet.py:57
#: field:project.issue,analytic_account_id:0
#, python-format
msgid "Analytic Account"
msgstr ""
#. module: project_issue_sheet
#: view:project.issue:0
msgid "Worklogs"
msgstr ""
#. module: project_issue_sheet
#: field:account.analytic.line,create_date:0
msgid "Create Date"
msgstr ""
#. module: project_issue_sheet
#: view:project.issue:0
#: field:project.issue,timesheet_ids:0
msgid "Timesheets"
msgstr ""
#. module: project_issue_sheet
#: field:hr.analytic.timesheet,issue_id:0
msgid "Issue"
msgstr ""

View File

@ -1041,28 +1041,25 @@ class procurement_order(osv.osv):
partner_obj = self.pool.get('res.partner')
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
for procurement in self.browse(cr, uid, ids, context=context):
if not procurement.product_id.seller_ids:
message = _('No supplier defined for this product !')
self.message_post(cr, uid, [procurement.id], body=message)
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
return False
message = ''
partner = procurement.product_id.seller_id #Taken Main Supplier of Product of Procurement.
if not partner:
if not procurement.product_id.seller_ids:
message = _('No supplier defined for this product !')
elif not partner:
message = _('No default supplier defined for this product')
self.message_post(cr, uid, [procurement.id], body=message)
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
elif not partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery']:
message = _('No address defined for the supplier')
if message:
if procurement.message != message:
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
return False
if user.company_id and user.company_id.partner_id:
if partner.id == user.company_id.partner_id.id:
raise osv.except_osv(_('Configuration Error!'), _('The product "%s" has been defined with your company as reseller which seems to be a configuration error!' % procurement.product_id.name))
address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery']
if not address_id:
message = _('No address defined for the supplier')
self.message_post(cr, uid, [procurement.id], body=message)
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
return False
return True

View File

@ -36,7 +36,6 @@
<record id="group_mrp_properties" model="res.groups">
<field name="name">Properties on lines</field>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="category_id" ref="base.module_category_hidden"/>
</record>

View File

@ -8,8 +8,8 @@
<field name="inherit_id" ref="product.product_search_form_view"/>
<field name="arch" type="xml">
<field name="pricelist_id" position="before">
<field name="location_id" context="{'location': self}"/>
<field name="warehouse_id" context="{'warehouse': self}"/>
<field name="location_id" widget="selection" context="{'location': self}"/>
<field name="warehouse_id" widget="selection" context="{'warehouse': self}"/>
</field>
</field>
</record>

View File

@ -73,6 +73,8 @@ class stock_location(osv.osv):
_parent_order = 'posz,name'
_order = 'parent_left'
# TODO: implement name_search() in a way that matches the results of name_get!
def name_get(self, cr, uid, ids, context=None):
# always return the full hierarchical name
res = self._complete_name(cr, uid, ids, 'complete_name', None, context=context)
@ -399,14 +401,15 @@ class stock_location(osv.osv):
uom_rounding = uom_obj.browse(cr, uid, context.get('uom'), context=context).rounding
locations_ids = self.search(cr, uid, [('location_id', 'child_of', ids)])
# Fetch only the locations in which this product has ever been processed (in or out)
cr.execute("""SELECT l.id FROM stock_location l WHERE l.id in %s AND
EXISTS (SELECT 1 FROM stock_move m WHERE m.product_id = %s
AND ((state = 'done' AND m.location_dest_id = l.id)
OR (state in ('done','assigned') AND m.location_id = l.id)))
""", (tuple(locations_ids), product_id,))
for id in [i for (i,) in cr.fetchall()]:
if locations_ids:
# Fetch only the locations in which this product has ever been processed (in or out)
cr.execute("""SELECT l.id FROM stock_location l WHERE l.id in %s AND
EXISTS (SELECT 1 FROM stock_move m WHERE m.product_id = %s
AND ((state = 'done' AND m.location_dest_id = l.id)
OR (state in ('done','assigned') AND m.location_id = l.id)))
""", (tuple(locations_ids), product_id,))
locations_ids = [i for (i,) in cr.fetchall()]
for id in locations_ids:
if lock:
try:
# Must lock with a separate select query because FOR UPDATE can't be used with