[MERGE] forward port branch saas-13 up to 856476d

This commit is contained in:
Christophe Simonis
2016-09-22 15:27:35 +02:00
309 changed files with 8927 additions and 7335 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ amounting in <strong>${object.amount_total} ${object.currency_id.name}</strong>
from ${object.company_id.name}.
</p>
% if is_inline:
% if is_online:
<br/><br/>
<center>
<a href="${access_url}" style="background-color: #1abc9c; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" class="o_default_snippet_text">View Invoice</a>
+15 -4
View File
@@ -657,7 +657,18 @@ class AccountTax(models.Model):
# the 'Account' decimal precision + 5), and that way it's like
# rounding after the sum of the tax amounts of each line
prec = currency.decimal_places
if company_id.tax_calculation_rounding_method == 'round_globally' or not bool(self.env.context.get("round", True)):
# In some cases, it is necessary to force/prevent the rounding of the tax and the total
# amounts. For example, in SO/PO line, we don't want to round the price unit at the
# precision of the currency.
# The context key 'round' allows to force the standard behavior.
round_tax = False if company_id.tax_calculation_rounding_method == 'round_globally' else True
round_total = True
if 'round' in self.env.context:
round_tax = bool(self.env.context['round'])
round_total = bool(self.env.context['round'])
if not round_tax:
prec += 5
total_excluded = total_included = base = round(price_unit * quantity, prec)
@@ -676,7 +687,7 @@ class AccountTax(models.Model):
continue
tax_amount = tax._compute_amount(base, price_unit, quantity, product, partner)
if company_id.tax_calculation_rounding_method == 'round_globally' or not bool(self.env.context.get("round", True)):
if not round_tax:
tax_amount = round(tax_amount, prec)
else:
tax_amount = currency.round(tax_amount)
@@ -702,8 +713,8 @@ class AccountTax(models.Model):
return {
'taxes': sorted(taxes, key=lambda k: k['sequence']),
'total_excluded': currency.round(total_excluded) if bool(self.env.context.get("round", True)) else total_excluded,
'total_included': currency.round(total_included) if bool(self.env.context.get("round", True)) else total_included,
'total_excluded': currency.round(total_excluded) if round_total else total_excluded,
'total_included': currency.round(total_included) if round_total else total_included,
'base': base,
}
@@ -951,7 +951,7 @@ class AccountBankStatementLine(models.Model):
# Create write-offs
for aml_dict in new_aml_dicts:
aml_dict['payment_id'] = payment and payment.id or False
aml_obj.with_context(check_move_validity=False).create(aml_dict)
aml_obj.with_context(check_move_validity=False, apply_taxes=True).create(aml_dict)
# Create counterpart move lines and reconcile them
for aml_dict in counterpart_aml_dicts:
+5 -2
View File
@@ -863,7 +863,6 @@ class AccountInvoice(models.Model):
'narration': inv.comment,
}
ctx['company_id'] = inv.company_id.id
ctx['dont_create_taxes'] = True
ctx['invoice'] = inv
ctx_nolang = ctx.copy()
ctx_nolang.pop('lang', None)
@@ -1063,11 +1062,15 @@ class AccountInvoice(models.Model):
if payment_method not in journal_payment_methods:
raise UserError(_('No appropriate payment method enabled on journal %s') % pay_journal.name)
communication = self.type in ('in_invoice', 'in_refund') and self.reference or self.number
if self.origin:
communication = '%s (%s)' % (communication, self.origin)
payment = self.env['account.payment'].create({
'invoice_ids': [(6, 0, self.ids)],
'amount': pay_amount or self.residual,
'payment_date': date or fields.Date.context_today(self),
'communication': self.type in ('in_invoice', 'in_refund') and self.reference or self.number,
'communication': communication,
'partner_id': self.partner_id.id,
'partner_type': self.type in ('out_invoice', 'out_refund') and 'customer' or 'supplier',
'journal_id': pay_journal.id,
+5 -10
View File
@@ -108,10 +108,6 @@ class AccountMove(models.Model):
move.assert_balanced()
return move
@api.multi
def copy(self, default=None):
return super(AccountMove, self.with_context(dont_create_taxes=True)).copy(default)
@api.multi
def write(self, vals):
if 'line_ids' in vals:
@@ -992,10 +988,9 @@ class AccountMoveLine(models.Model):
#TODO: to check/refactor
@api.model
def create(self, vals, apply_taxes=True):
""" :param apply_taxes: set to False if you don't want vals['tax_ids'] to result in the creation of move lines for taxes and eventual
adjustment of the line amount (in case of a tax included in price). This is useful for use cases where you don't want to
apply taxes in the default fashion (eg. taxes). You can also pass 'dont_create_taxes' in context.
def create(self, vals):
""" :context's key apply_taxes: set to True if you want vals['tax_ids'] to result in the creation of move lines for taxes and eventual
adjustment of the line amount (in case of a tax included in price).
:context's key `check_move_validity`: check data consistency after move line creation. Eg. set to false to disable verification that the move
debit-credit == 0 while creating the move lines composing the move.
@@ -1050,14 +1045,14 @@ class AccountMoveLine(models.Model):
# Create tax lines
tax_lines_vals = []
if apply_taxes and not context.get('dont_create_taxes') and vals.get('tax_ids'):
if context.get('apply_taxes') and vals.get('tax_ids'):
# Get ids from triplets : https://www.odoo.com/documentation/master/reference/orm.html#openerp.models.Model.write
tax_ids = [tax['id'] for tax in self.resolve_2many_commands('tax_ids', vals['tax_ids']) if tax.get('id')]
# Since create() receives ids instead of recordset, let's just use the old-api bridge
taxes = self.env['account.tax'].browse(tax_ids)
currency = self.env['res.currency'].browse(vals.get('currency_id'))
partner = self.env['res.partner'].browse(vals.get('partner_id'))
res = taxes.compute_all(amount,
res = taxes.with_context(round=True).compute_all(amount,
currency, 1, vals.get('product_id'), partner)
# Adjust line amount if any tax is price_include
if abs(res['total_excluded']) < abs(amount):
@@ -61,7 +61,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
# Build a string like (1,2,3) for easy use in SQL query
partner_ids = [partner['partner_id'] for partner in partners if partner['partner_id']]
lines = dict([(partner['partner_id'], []) for partner in partners if partner['partner_id']])
lines = dict((partner['partner_id'] or False, []) for partner in partners)
if not partner_ids:
return [], [], []
@@ -80,7 +80,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
aml_ids = cr.fetchall()
aml_ids = aml_ids and [x[0] for x in aml_ids] or []
for line in self.env['account.move.line'].browse(aml_ids):
partner_id = line.partner_id.id or None
partner_id = line.partner_id.id or False
if partner_id not in undue_amounts:
undue_amounts[partner_id] = 0.0
line_amount = line.balance
@@ -131,7 +131,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
aml_ids = cr.fetchall()
aml_ids = aml_ids and [x[0] for x in aml_ids] or []
for line in self.env['account.move.line'].browse(aml_ids):
partner_id = line.partner_id.id or None
partner_id = line.partner_id.id or False
if partner_id not in partners_amount:
partners_amount[partner_id] = 0.0
line_amount = line.balance
@@ -16,6 +16,7 @@ var pyeval = require('web.pyeval');
var web_client = require('web.web_client');
var parse_value = require('web.web_client');
var Widget = require('web.Widget');
var session = require('web.session');
var FieldMany2One = core.form_widget_registry.get('many2one');
var FieldChar = core.form_widget_registry.get('char');
@@ -71,8 +72,6 @@ var abstractReconciliation = Widget.extend(ControlPanelMixin, {
this.action_manager = this.findAncestor(function(ancestor){ return ancestor instanceof ActionManager });
this.crash_manager = new CrashManager();
// Method that tests if a monetary amount == 0, we use 4 digits because no currency uses more
this.monetaryIsZero = _.partial(utils.float_is_zero, _, 4);
this.formatCurrencies; // Method that formats the currency ; loaded from the server
this.model_res_users = new Model("res.users");
this.model_tax = new Model("account.tax");
@@ -365,6 +364,11 @@ var abstractReconciliation = Widget.extend(ControlPanelMixin, {
if (line.ref && line.ref !== line.name)
line.q_label = line.q_label + " : " + line.ref;
},
// Method that tests if a monetary amount == 0, we use 4 digits because no currency uses more
monetaryIsZero: function(amount, digits) {
return utils.float_is_zero(amount, digits === undefined ? 4 : digits);
},
});
var abstractReconciliationLine = Widget.extend({
@@ -1868,7 +1872,11 @@ var bankStatementReconciliationLine = abstractReconciliationLine.extend({
// Find out if the counterpart is lower than, equal or greater than the transaction being reconciled
var balance_type = undefined;
if (self.monetaryIsZero(self.get("balance"))) balance_type = "equal";
var digits = 4;
if (this.get("currency_id") && session.get_currency(this.get("currency_id"))) {
digits = session.get_currency(this.get("currency_id")).digits[1];
}
if (self.monetaryIsZero(self.get("balance"), digits)) balance_type = "equal";
else if (self.get("balance") * self.st_line.amount > 0) balance_type = "greater";
else if (self.get("balance") * self.st_line.amount < 0) balance_type = "lower";
@@ -2063,7 +2071,11 @@ var bankStatementReconciliationLine = abstractReconciliationLine.extend({
var payment_aml = _.filter(this.get("mv_lines_selected"), function(line) { return line.already_paid });
var payment_aml_ids = _.collect(payment_aml, function(line) { return line.id });
var new_aml_dicts = this.prepareCreatedMoveLinesForPersisting(this.getCreatedLines());
if (! self.monetaryIsZero(this.get("balance"))) new_aml_dicts.push(this.prepareOpenBalanceForPersisting());
var digits = 4;
if (this.get("currency_id") && session.get_currency(this.get("currency_id"))) {
digits = session.get_currency(this.get("currency_id")).digits[1];
}
if (! self.monetaryIsZero(this.get("balance"), digits)) new_aml_dicts.push(this.prepareOpenBalanceForPersisting());
return {
'counterpart_aml_dicts': counterpart_aml_dicts,
'payment_aml_ids': payment_aml_ids,
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from odoo.tests.common import HttpCase
from odoo.exceptions import ValidationError
class AccountingTestCase(HttpCase):
""" This class extends the base TransactionCase, in order to test the
@@ -16,3 +17,14 @@ class AccountingTestCase(HttpCase):
domain = [('company_id', '=', self.env.ref('base.main_company').id)]
if not self.env['account.account'].search_count(domain):
self.skipTest("No Chart of account found")
def check_complete_move(self, move, theorical_lines):
for aml in move.line_ids:
line = (aml.name, round(aml.debit, 2), round(aml.credit, 2))
if line in theorical_lines:
theorical_lines.remove(line)
else:
raise ValidationError('Unexpected journal item. (label: %s, debit: %s, credit: %s)' % (aml.name, round(aml.debit, 2), round(aml.credit, 2)))
if theorical_lines:
raise ValidationError('Remaining theorical line (not found). %s)' % ([(aml[0], aml[1], aml[2]) for aml in theorical_lines]))
return True
+1 -1
View File
@@ -120,7 +120,7 @@ class TestTax(AccountTestUsers):
})],
'company_id': company_id,
}
move = self.env['account.move'].create(vals)
move = self.env['account.move'].with_context(apply_taxes=True).create(vals)
aml_fixed_tax = move.line_ids.filtered(lambda l: l.tax_line_id.id == self.fixed_tax.id)
+2 -2
View File
@@ -138,11 +138,11 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="22"/>
<field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button class="oe_stat_button" type="action" name="%(account.action_open_partner_analytic_accounts)d"
icon="fa-book">
icon="fa-book" groups="analytic.group_analytic_accounting">
<field string="Analytic Accounts" name="contracts_count" widget="statinfo"/>
</button>
</div>
+162 -149
View File
@@ -10,164 +10,177 @@ class TestAccountBudgetCommon(AccountingTestCase):
def setUp(self):
super(TestAccountBudgetCommon, self).setUp()
# In order to check account budget module in Odoo I created a budget with few budget positions
# Checking if the budgetary positions have accounts or not
account_ids = self.env['account.account'].search([
('user_type_id', '=', self.ref('account.data_account_type_revenue')),
('tag_ids.name', 'in', ['Operating Activities'])
]).ids
if not account_ids:
account_ids = self.env['account.account'].create({
'name': 'Product Sales - (test)',
'code': 'X2020',
'user_type_id': self.ref('account.data_account_type_revenue'),
'tag_ids': [(6, 0, [self.ref('account.account_tag_operating')])],
}).ids
self.account_budget_post_sales0 = self.env['account.budget.post'].create({
'name': 'Sales',
'account_ids': [(6, None, account_ids)],
})
if account_ids:
self.account_budget_post_sales0 = self.env['account.budget.post'].create({
'name': 'Sales',
'account_ids': [(6, None, account_ids)],
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-01-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-01-31',
'planned_amount': 500.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-02-07',
'date_to': str(time.localtime(time.time())[0] + 1) + '-02-28',
'planned_amount': 900.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-03-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-03-15',
'planned_amount': 300.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_our_super_product'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-03-16',
'paid_date': str(time.localtime(time.time())[0] + 1) + '-12-03',
'date_to': str(time.localtime(time.time())[0] + 1) + '-03-31',
'planned_amount': 375.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_our_super_product'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-05-01',
'paid_date': str(time.localtime(time.time())[0] + 1) + '-12-03',
'date_to': str(time.localtime(time.time())[0] + 1) + '-05-31',
'planned_amount': 375.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-07-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-07-31',
'planned_amount': 20000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-02-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-02-28',
'planned_amount': 20000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-09-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-09-30',
'planned_amount': 10000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-10-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-12-31',
'planned_amount': 10000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-01-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-01-31',
'planned_amount': 500.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-02-07',
'date_to': str(time.localtime(time.time())[0] + 1) + '-02-28',
'planned_amount': 900.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-03-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-03-15',
'planned_amount': 300.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_our_super_product'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-03-16',
'paid_date': str(time.localtime(time.time())[0] + 1) + '-12-03',
'date_to': str(time.localtime(time.time())[0] + 1) + '-03-31',
'planned_amount': 375.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_our_super_product'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-05-01',
'paid_date': str(time.localtime(time.time())[0] + 1) + '-12-03',
'date_to': str(time.localtime(time.time())[0] + 1) + '-05-31',
'planned_amount': 375.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-07-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-07-31',
'planned_amount': 20000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-02-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-02-28',
'planned_amount': 20000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-09-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-09-30',
'planned_amount': 10000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_sales0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-10-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-12-31',
'planned_amount': 10000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
account_ids = self.env['account.account'].search([
('user_type_id.name', '=', 'Expenses'),
('tag_ids.name', 'in', ['Operating Activities'])
]).ids
if account_ids:
self.account_budget_post_purchase0 = self.env['account.budget.post'].create({
'name': 'Purchases',
'account_ids': [(6, None, account_ids)],
})
if not account_ids:
account_ids = self.env['account.account'].create({
'name': 'Expense - (test)',
'code': 'X2120',
'user_type_id': self.ref('account.data_account_type_expenses'),
'tag_ids': [(6, 0, [self.ref('account.account_tag_operating')])],
}).ids
self.account_budget_post_purchase0 = self.env['account.budget.post'].create({
'name': 'Purchases',
'account_ids': [(6, None, account_ids)],
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-01-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-01-31',
'planned_amount': -500.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-02-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-02-28',
'planned_amount': -250.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_our_super_product'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-04-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-04-30',
'planned_amount': -150.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-06-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-06-15',
'planned_amount': -7500.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-06-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-06-30',
'planned_amount': -5000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-07-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-07-15',
'planned_amount': -2000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-08-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-08-31',
'planned_amount': -3000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-09-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-09-15',
'planned_amount': -1000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-01-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-01-31',
'planned_amount': -500.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_partners_camp_to_camp'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-02-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-02-28',
'planned_amount': -250.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_our_super_product'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-04-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-04-30',
'planned_amount': -150.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-06-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-06-15',
'planned_amount': -7500.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-06-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-06-30',
'planned_amount': -5000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-07-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-07-15',
'planned_amount': -2000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-08-16',
'date_to': str(time.localtime(time.time())[0] + 1) + '-08-31',
'planned_amount': -3000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetpessimistic0'),
})
self.env['crossovered.budget.lines'].create({
'analytic_account_id': self.ref('analytic.analytic_seagate_p2'),
'general_budget_id': self.account_budget_post_purchase0.id,
'date_from': str(time.localtime(time.time())[0] + 1) + '-09-01',
'date_to': str(time.localtime(time.time())[0] + 1) + '-09-15',
'planned_amount': -1000.0,
'crossovered_budget_id': self.ref('account_budget.crossovered_budget_budgetoptimistic0'),
})
@@ -12,24 +12,6 @@ import datetime
class TestAccountBudget(TestAccountBudgetCommon):
def test_account_budget(self):
# In order to check account budget module in Odoo I created a budget with few budget positions
# Checking if the budgetary positions have accounts or not
if not self.account_budget_post_sales0.account_ids:
a_sale = self.env['account.account'].create({
'name': 'Product Sales - (test)',
'code': 'X2020',
'user_type_id': self.ref('account.data_account_type_revenue'),
'tag_ids': [(6, 0, [self.ref('account.account_tag_operating')])],
})
self.account_budget_post_sales0.write({'account_ids': [(6, 0, [a_sale.id])]})
if not self.account_budget_post_purchase0.account_ids:
a_expense = self.env['account.account'].create({
'name': 'Expense - (test)',
'code': 'X2120',
'user_type_id': self.ref('account.data_account_type_expenses'),
'tag_ids': [(6, 0, [self.ref('account.account_tag_operating')])],
})
self.account_budget_post_purchase0.write({'account_ids': [(6, 0, [a_expense.id])]})
# Creating a crossovered.budget record
budget = self.env['crossovered.budget'].create({
@@ -21,7 +21,7 @@ class TestTheoreticalAmount(TestAccountBudgetCommon):
user_type_id = self.ref('account.data_account_type_revenue')
tag_id = self.ref('account.account_tag_operating')
account_rev = self.env['account.account'].create({
'code': 'X2020',
'code': 'Y2020',
'name': 'Budget - Test Revenue Account',
'user_type_id': user_type_id,
'tag_ids': [(4, tag_id, 0)]
@@ -18,7 +18,7 @@ class AccountMoveLine(models.Model):
_inherit = "account.move.line"
@api.model
def create(self, vals, apply_taxes=True):
def create(self, vals):
taxes = False
if vals.get('tax_line_id'):
taxes = [{'use_cash_basis': self.env['account.tax'].browse(vals['tax_line_id']).use_cash_basis}]
@@ -26,4 +26,4 @@ class AccountMoveLine(models.Model):
taxes = self.env['account.move.line'].resolve_2many_commands('tax_ids', vals['tax_ids'])
if taxes and any([tax['use_cash_basis'] for tax in taxes]) and not vals.get('tax_exigible'):
vals['tax_exigible'] = False
return super(AccountMoveLine, self).create(vals, apply_taxes=apply_taxes)
return super(AccountMoveLine, self).create(vals)
@@ -97,7 +97,7 @@ class AccountPartialReconcileCashBasis(models.Model):
# probably already sent to the estate.
if move_date > self.company_id.period_lock_date:
move_vals['date'] = move_date
move = self.env['account.move'].with_context(dont_create_taxes=True).create(move_vals)
move = self.env['account.move'].create(move_vals)
# post move
move.post()
@@ -259,7 +259,7 @@ class AccountVoucher(models.Model):
'amount_currency': line.price_subtotal if current_currency != company_currency else 0.0,
}
self.env['account.move.line'].create(move_line)
self.env['account.move.line'].with_context(apply_taxes=True).create(move_line)
return line_total
@api.multi
@@ -50,14 +50,17 @@ class IrModelFieldsAnonymizeWizard(models.TransientModel):
summary = u''
for anon_field in self.env['ir.model.fields.anonymization'].search([('state', '!=', 'not_existing')]):
field = anon_field.field_id
values = {
'model_name': field.model_id.name,
'model_code': field.model_id.model,
'field_code': field.name,
'field_name': field.field_description,
'state': anon_field.state,
}
summary += u" * %(model_name)s (%(model_code)s) -> %(field_name)s (%(field_code)s): state: (%(state)s)\n" % values
if field:
values = {
'model_name': field.model_id.name,
'model_code': field.model_id.model,
'field_code': field.name,
'field_name': field.field_description,
'state': anon_field.state,
}
summary += u" * %(model_name)s (%(model_code)s) -> %(field_name)s (%(field_code)s): state: (%(state)s)\n" % values
else:
summary += u"* Missing local model (%s) and field (%s): state: (%s) \n" % (anon_field.model_name, anon_field.field_name, anon_field.state)
return summary
@api.model
@@ -52,6 +52,11 @@ var FormViewBarcodeHandler = common.AbstractField.extend(BarcodeHandlerMixin, {
}
},
destroy: function () {
this.stop_listening();
this._super.apply(this, arguments);
},
_display_no_edit_mode_warning: function() {
this.do_warn(_t('Error : Document not editable'), _t('To modify this document, please first start edition.'));
},
+1 -1
View File
@@ -14,7 +14,7 @@ class BaseConfigSettings(models.TransientModel):
company_id = fields.Many2one('res.company', string='Company', required=True,
default=lambda self: self.env.user.company_id)
module_share = fields.Boolean(string='Allow documents sharing',
help="""Share or embbed any screen of Odoo.""")
help="""Share or embed any screen of Odoo.""")
module_portal = fields.Boolean(string='Activate the customer portal',
help="""Give your customers access to their documents.""")
module_auth_oauth = fields.Boolean(string='Use external authentication providers (OAuth)')
+1 -1
View File
@@ -616,7 +616,7 @@ class Meeting(models.Model):
"""
timezone = self._context.get('tz')
if not timezone:
timezone = self.env.user.partner_id.tz
timezone = self.env.user.partner_id.tz or 'UTC'
timezone = tools.ustr(timezone).encode('utf-8') # make safe for str{p,f}time()
# get date/time format according to context
+11 -27
View File
@@ -5,7 +5,7 @@ import logging
from datetime import datetime, timedelta, date
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, tools
from odoo import api, fields, models, tools, SUPERUSER_ID
from odoo.tools.translate import _
from odoo.tools import email_re, email_split
from odoo.exceptions import UserError, AccessError
@@ -97,7 +97,7 @@ class Lead(FormatAddress, models.Model):
stage_id = fields.Many2one('crm.stage', string='Stage', track_visibility='onchange', index=True,
domain="['|', ('team_id', '=', False), ('team_id', '=', team_id)]",
default=lambda self: self._default_stage_id())
group_expand='_read_group_stage_ids', default=lambda self: self._default_stage_id())
user_id = fields.Many2one('res.users', string='Salesperson', index=True, track_visibility='onchange', default=lambda self: self.env.user)
referred = fields.Char('Referred By')
@@ -147,37 +147,21 @@ class Lead(FormatAddress, models.Model):
('check_probability', 'check(probability >= 0 and probability <= 100)', 'The probability of closing the deal should be between 0% and 100%!')
]
@api.multi
def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
if access_rights_uid:
self = self.sudo(access_rights_uid)
Stage = self.env['crm.stage']
order = Stage._order
# lame hack to allow reverting search, should just work in the trivial case
if read_group_order == 'stage_id desc':
order = "%s desc" % order
@api.model
def _read_group_stage_ids(self, stages, domain, order):
# retrieve team_id from the context and write the domain
# - ('id', 'in', 'ids'): add columns that should be present
# - ('id', 'in', stages.ids): add columns that should be present
# - OR ('fold', '=', False): add default columns that are not folded
# - OR ('team_ids', '=', team_id), ('fold', '=', False) if team_id: add team columns that are not folded
team_id = self._context.get('default_team_id')
if team_id:
search_domain = ['|', ('id', 'in', self.ids), '|', ('team_id', '=', False), ('team_id', '=', team_id)]
search_domain = ['|', ('id', 'in', stages.ids), '|', ('team_id', '=', False), ('team_id', '=', team_id)]
else:
search_domain = ['|', ('id', 'in', self.ids), ('team_id', '=', False)]
search_domain = ['|', ('id', 'in', stages.ids), ('team_id', '=', False)]
# perform search
stages = Stage.browse(Stage._search(search_domain, order=order, access_rights_uid=access_rights_uid))
fold = {
stage.id: stage.fold or False
for stage in stages
}
return stages.name_get(), fold
_group_by_full = {
'stage_id': _read_group_stage_ids
}
stage_ids = stages._search(search_domain, order=order, access_rights_uid=SUPERUSER_ID)
return stages.browse(stage_ids)
@api.multi
def _compute_kanban_state(self):
@@ -689,8 +673,8 @@ class Lead(FormatAddress, models.Model):
'partner_id': customer.id if customer else False,
'type': 'opportunity',
'date_open': fields.Datetime.now(),
'email_from': customer.email if customer else self.email_from,
'phone': customer.phone if customer else self.phone,
'email_from': customer and customer.email or self.email_from,
'phone': customer and customer.phone or self.phone,
'date_conversion': fields.Datetime.now(),
}
if not self.stage_id:
+6 -4
View File
@@ -63,14 +63,15 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="priority" eval="10"/>
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
<field name="arch" type="xml">
<field name="mobile" position="after">
<field name="opportunity_count" groups="sales_team.group_sale_salesman"/>
<field name="meeting_count" groups="sales_team.group_sale_salesman"/>
<field name="opportunity_count"/>
<field name="meeting_count"/>
</field>
<xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
<span class="badge" t-if="record.opportunity_count.value>0" groups="sales_team.group_sale_salesman"><i class="fa fa-fw fa-star"/><t t-esc="record.opportunity_count.value"/></span>
<span class="badge" t-if="record.meeting_count.value>0" groups="sales_team.group_sale_salesman"><i class="fa fa-fw fa-calendar"/><t t-esc="record.meeting_count.value"/></span>
<span class="badge" t-if="record.opportunity_count.value>0"><i class="fa fa-fw fa-star"/><t t-esc="record.opportunity_count.value"/></span>
<span class="badge" t-if="record.meeting_count.value>0"><i class="fa fa-fw fa-calendar"/><t t-esc="record.meeting_count.value"/></span>
</xpath>
</field>
</record>
@@ -104,6 +105,7 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field eval="18" name="priority"/>
<field name="groups_id" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
<field name="arch" type="xml">
<data>
<div name="button_box" position="inside">
+1 -1
View File
@@ -306,7 +306,7 @@ class MergePartnerAutomatic(models.TransientModel):
raise UserError(_("You cannot merge a contact with one of his parent."))
# check only admin can merge partners with different emails
if SUPERUSER_ID != self.env.uid and len(set(partner.email for partner in Partner.browse(partner_ids))) > 1:
if SUPERUSER_ID != self.env.uid and len(set(partner.email for partner in partner_ids)) > 1:
raise UserError(_("All contacts must have the same email. Only the Administrator can merge contacts with different emails."))
# remove dst_partner from partners to merge
+1
View File
@@ -7,6 +7,7 @@
<record id="fleet_group_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_fleet_category"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="fleet_group_manager" model="res.groups">
<field name="name">Manager</field>
+2 -2
View File
@@ -20,8 +20,8 @@ class HrEmployee(models.Model):
barcode = "".join(choice(digits) for i in range(8))
return barcode
barcode = fields.Char(string="Badge ID", help="ID used for employee identification.", default=_default_random_barcode, copy=False, groups='hr_attendance.group_hr_attendance_user')
pin = fields.Char(string="PIN", default=_default_random_pin, help="PIN used for Check In/Out in Attendance.", copy=False, groups='hr_attendance.group_hr_attendance_user')
barcode = fields.Char(string="Badge ID", help="ID used for employee identification.", default=_default_random_barcode, copy=False)
pin = fields.Char(string="PIN", default=_default_random_pin, help="PIN used for Check In/Out in Attendance.", copy=False)
attendance_ids = fields.One2many('hr.attendance', 'employee_id', help='list of attendances for the employee')
last_attendance_id = fields.Many2one('hr.attendance', compute='_compute_last_attendance_id')
@@ -5,6 +5,7 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="priority">10</field>
<field name="groups_id" eval="[(4,ref('hr_attendance.group_hr_attendance_user'))]"/>
<field name="arch" type="xml">
<field name="name" position="replace">
<div id="textbox">
@@ -4,3 +4,5 @@ access_hr_resource_calendar_user,hr.employee.resource.calendar.user,resource.mod
access_hr_resource_calendar_attendance_user,hr.employee.resource.calendar.attendance.user,resource.model_resource_calendar_attendance,hr.group_hr_user,1,1,1,1
access_hr_contract_type_manager,hr.contract.type.manager,model_hr_contract_type,hr.group_hr_manager,1,1,1,1
access_hr_contract_manager,hr.contract.manager,model_hr_contract,hr.group_hr_manager,1,1,1,1
access_hr_contract_type_user,hr.contract.type.user,model_hr_contract_type,hr.group_hr_user,1,0,0,0
access_hr_contract_user,hr.contract.user,model_hr_contract,hr.group_hr_user,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
4 access_hr_resource_calendar_attendance_user hr.employee.resource.calendar.attendance.user resource.model_resource_calendar_attendance hr.group_hr_user 1 1 1 1
5 access_hr_contract_type_manager hr.contract.type.manager model_hr_contract_type hr.group_hr_manager 1 1 1 1
6 access_hr_contract_manager hr.contract.manager model_hr_contract hr.group_hr_manager 1 1 1 1
7 access_hr_contract_type_user hr.contract.type.user model_hr_contract_type hr.group_hr_user 1 0 0 0
8 access_hr_contract_user hr.contract.user model_hr_contract hr.group_hr_user 1 0 0 0
+1 -1
View File
@@ -35,7 +35,7 @@ class HrExpense(models.Model):
payment_mode = fields.Selection([("own_account", "Employee (to reimburse)"), ("company_account", "Company")], default='own_account', states={'done': [('readonly', True)], 'post': [('readonly', True)]}, string="Payment By")
attachment_number = fields.Integer(compute='_compute_attachment_number', string='Number of Attachments')
state = fields.Selection([
('draft', 'To Report'),
('draft', 'To Submit'),
('reported', 'Reported'),
('done', 'Posted'),
('refused', 'Refused')
@@ -57,7 +57,14 @@
<span t-field="line.unit_amount"/>
</td>
<td>
<span t-field="line.tax_ids"/>
<t t-foreach="line.tax_ids" t-as="tax">
<t t-if="tax.description">
<span t-field="tax.description"/>
</t>
<t t-if="not tax.description">
<span t-field="tax.name"/>
</t>
</t>
</td>
<td class="text-center">
<span t-field="line.quantity"/>
+1 -1
View File
@@ -16,7 +16,7 @@ tour.register('hr_expense_tour', [{
position: 'right',
}, {
trigger: '.o_expense_submit:visible',
content: _t("<p>Once completed, you can <b>submit the expense</b> for approval.</p><p><i>Tip: from the list view, select all expenses to submit them all at once, in a single report.</i>"),
content: _t("<p>Once completed, you can <b>submit the expense</b> for approval.</p><p><i>Tip: from the list view, select all expenses to submit them all at once, in a single report.</i></p>"),
extra_trigger: '.o_form_readonly',
position: 'bottom',
}, {
+7 -7
View File
@@ -56,7 +56,7 @@
<field name="quantity" class="oe_inline"/>
<field name="product_uom_id" widget="selection" class="oe_inline" groups="product.group_uom"/>
</div>
<field name="tax_ids" domain="[('type_tax_use', '=', 'purchase')]" widget="many2many_tags" groups="account.group_no_one"/>
<field name="tax_ids" domain="[('type_tax_use', '=', 'purchase')]" widget="many2many_tags" groups="base.group_no_one"/>
</group><group>
<field name="reference"/>
<field name="date"/>
@@ -161,7 +161,7 @@
<field name="product_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<separator />
<filter domain="[('state', '=', 'draft')]" string="To Report" name="to_report" help="New Expense"/>
<filter domain="[('state', '=', 'draft')]" string="To Submit" name="to_report" help="New Expense"/>
<filter domain="[('state', '=', 'report')]" string="Reported" name="submitted" help="Confirmed Expenses"/>
<filter domain="[('state', '=', 'refused')]" string="Refused" name="refused" help="Refused Expenses"/>
<filter domain="[('state', '!=', 'cancel')]" string="Not Refused" name="uncancelled" help="Actual expense sheets, not the refused ones"/>
@@ -206,7 +206,7 @@
</record>
<record id="hr_expense_actions_my_unsubmitted" model="ir.actions.act_window">
<field name="name">My Expenses to Report</field>
<field name="name">My Expenses to Submit</field>
<field name="res_model">hr.expense</field>
<field name="view_mode">tree,kanban,form,graph,pivot</field>
<field name="search_view_id" ref="view_hr_expense_filter"/>
@@ -583,7 +583,7 @@
</record>
<record id="action_hr_expense_sheet_all_to_approve" model="ir.actions.act_window">
<field name="name">My Reports</field>
<field name="name">Expense Reports to Approve</field>
<field name="res_model">hr.expense.sheet</field>
<field name="view_mode">tree,kanban,form,pivot,graph</field>
<field name="search_view_id" ref="view_hr_expense_sheet_filter"/>
@@ -599,7 +599,7 @@
</record>
<record id="action_hr_expense_sheet_all_to_post" model="ir.actions.act_window">
<field name="name">My Reports</field>
<field name="name">Expense Reports To Post</field>
<field name="res_model">hr.expense.sheet</field>
<field name="view_mode">tree,kanban,form,pivot,graph</field>
<field name="search_view_id" ref="view_hr_expense_sheet_filter"/>
@@ -615,7 +615,7 @@
</record>
<record id="action_hr_expense_sheet_all_to_pay" model="ir.actions.act_window">
<field name="name">My Reports</field>
<field name="name">Expense Reports To Pay</field>
<field name="res_model">hr.expense.sheet</field>
<field name="view_mode">tree,kanban,form,pivot,graph</field>
<field name="search_view_id" ref="view_hr_expense_sheet_filter"/>
@@ -631,7 +631,7 @@
</record>
<record id="action_hr_expense_sheet_all_all" model="ir.actions.act_window">
<field name="name">My Reports</field>
<field name="name">All Expense Reports</field>
<field name="res_model">hr.expense.sheet</field>
<field name="view_mode">pivot,graph,tree,kanban,form</field>
<field name="search_view_id" ref="view_hr_expense_sheet_filter"/>
@@ -30,7 +30,7 @@
<record id="property_rule_holidays_employee_write" model="ir.rule">
<field name="name">Employee Holidays Create, Write, Unlink</field>
<field name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[('employee_id.user_id','=',user.id), ('state', 'in', ['draft', 'confirm', 'cancel'])]</field>
<field name="domain_force">[('employee_id.user_id','=',user.id), ('state', 'in', ['draft', 'confirm', 'cancel', 'refuse'])]</field>
<field name="perm_read" eval="False"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
@@ -298,6 +298,7 @@
<field name="view_id" ref="edit_holiday_new"/>
<field name="context">{
'default_type': 'remove',
'search_default_my_leaves': 1,
'needaction_menu_ref':
[
'hr_holidays.menu_open_company_allocation',
@@ -383,6 +384,7 @@
<field name="view_type">form</field>
<field name="context">{
'default_type':'add',
'search_default_my_leaves': 1,
'needaction_menu_ref':
[
'hr_holidays.menu_open_company_allocation',
@@ -459,6 +461,7 @@
<field name="context">{
'search_default_group_type': 1,
'search_default_year': 1 ,
'search_default_my_leaves': 1,
'needaction_menu_ref':
[
'hr_holidays.menu_open_ask_holidays_new',
@@ -19,12 +19,5 @@
<field name="groups_id" eval="[(4,ref('hr_payroll.group_hr_payroll_manager'))]"/>
</record>
<record id="property_rule_employee_payslip" model="ir.rule">
<field name="name">Employee Payslip</field>
<field name="model_id" ref="model_hr_payslip"/>
<field name="domain_force">['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)]</field>
<field name="groups" eval="[(4,ref('hr_payroll.group_hr_payroll_user'))]"/>
</record>
</data>
</odoo>
+9 -23
View File
@@ -3,7 +3,7 @@
from datetime import datetime
from odoo import api, fields, models, tools
from odoo import api, fields, models, tools, SUPERUSER_ID
from odoo.tools.translate import _
from odoo.exceptions import UserError
@@ -125,6 +125,7 @@ class Applicant(models.Model):
stage_id = fields.Many2one('hr.recruitment.stage', 'Stage', track_visibility='onchange',
domain="['|', ('job_id', '=', False), ('job_id', '=', job_id)]",
copy=False, index=True,
group_expand='_read_group_stage_ids',
default=_default_stage_id)
last_stage_id = fields.Many2one('hr.recruitment.stage', "Last Stage",
help="Stage of the applicant before being in the current stage. Used for lost cases analysis.")
@@ -180,33 +181,18 @@ class Applicant(models.Model):
for record in self:
record.attachment_number = attach_data.get(record.id, 0)
@api.multi
def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
access_rights_uid = access_rights_uid or self.env.uid
Stage = self.env['hr.recruitment.stage']
order = Stage._order
@api.model
def _read_group_stage_ids(self, stages, domain, order):
# retrieve job_id from the context and write the domain: ids + contextual columns (job or default)
job_id = self._context.get('default_job_id')
search_domain = [('job_id', '=', False)]
if job_id:
search_domain = ['|'] + search_domain + [('job_id', '=', job_id)]
if self.ids:
search_domain = ['|'] + search_domain + [('id', 'in', self.ids)]
search_domain = ['|', ('job_id', '=', job_id)] + search_domain
if stages:
search_domain = ['|', ('id', 'in', stages.ids)] + search_domain
stage_ids = Stage._search(search_domain, order=order, access_rights_uid=access_rights_uid)
stages = Stage.sudo(access_rights_uid).browse(stage_ids)
result = stages.name_get()
# restore order of the search
result.sort(lambda x, y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
fold = {}
for stage in stages:
fold[stage.id] = stage.fold or False
return result, fold
_group_by_full = {
'stage_id': _read_group_stage_ids
}
stage_ids = stages._search(search_domain, order=order, access_rights_uid=SUPERUSER_ID)
return stages.browse(stage_ids)
@api.onchange('job_id')
def onchange_job_id(self):
@@ -661,6 +661,7 @@
<form string="Tags">
<group>
<field name="name"/>
<field name="color"/>
</group>
</form>
</field>
+1 -1
View File
@@ -8,7 +8,7 @@ class AccountAnalyticLine(models.Model):
_inherit = 'account.analytic.line'
task_id = fields.Many2one('project.task', 'Task')
project_id = fields.Many2one('project.project', 'Project')
project_id = fields.Many2one('project.project', 'Project', domain=[('allow_timesheets', '=', True)])
department_id = fields.Many2one('hr.department', "Department", related='user_id.employee_ids.department_id', store=True)
@api.onchange('project_id')
+1 -1
View File
@@ -10,7 +10,7 @@ class Project(models.Model):
subtask_project_id = fields.Many2one(
'project.project', string='Sub-task Project', ondelete="restrict",
help="Choosing a sub-tasks project will both enable sub-tasks and set their default project (possibly the project itself)")
allow_timesheets = fields.Boolean("Allow timesheets", default=True)
class Task(models.Model):
_inherit = "project.task"
+40 -7
View File
@@ -20,17 +20,40 @@
</p>
</field>
</record>
<record id="project_project_view_form_simplified_inherit_timesheet" model="ir.ui.view">
<field name="name">project.project.view.form.simplified.inherit.timesheet</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.project_project_view_form_simplified"/>
<field name="priority">24</field>
<field name="arch" type="xml">
<group name="options" position="attributes">
<attribute name="invisible">0</attribute>
</group>
<field name="use_tasks" position="after">
<field name="allow_timesheets"/>
</field>
</field>
</record>
<record id="project_invoice_form" model="ir.ui.view">
<field name="name">Inherit project form : Invoicing Data</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="priority">24</field>
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button class="oe_stat_button" name="%(act_hr_timesheet_line_by_project)d" type="action" icon="fa-calendar" string="Timesheets"/>
</div>
<button name="toggle_active" position="before">
<button class="oe_stat_button" name="%(act_hr_timesheet_line_by_project)d" type="action" icon="fa-calendar" string="Timesheets" attrs="{'invisible': [('allow_timesheets', '=', False)]}"/>
</button>
<field name="user_id" position="after">
<field name="subtask_project_id" groups="base.group_no_one" />
<field name="subtask_project_id" groups="base.group_no_one" attrs="{'invisible': [('allow_timesheets', '=', False)]}"/>
</field>
<xpath expr="//div[@name='options_active']" position="inside">
<div>
<field name="allow_timesheets" class="oe_inline" string="Allow timesheets"/>
<label for="allow_timesheets"/>
</div>
</xpath>
</field>
</record>
@@ -120,13 +143,23 @@
<field name="name">project.project.timesheet.kanban.inherited</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project_kanban"/>
<field name="priority">24</field>
<field name="arch" type="xml">
<xpath expr="//div[contains(@class, 'o_kanban_manage_reports')]" position="inside">
<div>
<field name="use_tasks" position="after">
<field name="allow_timesheets" invisible="1"/>
</field>
<xpath expr="//div[contains(@class, 'o_kanban_manage_reports')]/div[last()]" position="after">
<div attrs="{'invisible': [('allow_timesheets', '=', False)]}">
<a name="%(act_hr_timesheet_line_by_project)d" type="action">Timesheets</a>
</div>
</xpath>
<xpath expr="//div[contains(@class, 'o_project_kanban_box')]/div[last()]" position="before">
<div attrs="{'invisible': [('allow_timesheets', '=', False)]}" class="o_project_kanban_box">
<a t-if="record.allow_timesheets.raw_value" name="%(act_hr_timesheet_line_by_project)d" type="action">
<span class="o_label">Timesheets</span>
</a>
</div>
</xpath>
</field>
</record>
@@ -40,7 +40,7 @@
<menuitem id="menu_timesheets_reports" name="Reports"
parent="timesheet_menu_root" sequence="99" groups="hr_timesheet.group_hr_timesheet_manager"/>
parent="timesheet_menu_root" sequence="99" groups="hr_timesheet.group_hr_timesheet_user"/>
<menuitem id="menu_hr_activity_analysis" parent="menu_timesheets_reports" action="act_hr_timesheet_report"
name="Activity Analysis"/>
</data>
@@ -4,16 +4,10 @@
<field name="name">Officer</field>
<field name="category_id" ref="base.module_category_hr_timesheet"/>
<field name="implied_ids" eval="[(4, ref('hr.group_hr_user'))]"/>
</record>
<record id="group_hr_timesheet_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_hr_timesheet"/>
<field name="implied_ids" eval="[(4, ref('hr_timesheet.group_hr_timesheet_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('hr_timesheet.group_hr_timesheet_manager'))]"/>
<field name="groups_id" eval="[(4,ref('hr_timesheet.group_hr_timesheet_user'))]"/>
</record>
</odoo>
@@ -1,4 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hr_timesheet_sheet_sheet_day,hr_timesheet_sheet.sheet.day,model_hr_timesheet_sheet_sheet_day,hr_timesheet.group_hr_timesheet_user,1,1,1,1
access_hr_timesheet_sheet_sheet_day_user,hr.timesheet.sheet.sheet.day.user,model_hr_timesheet_sheet_sheet_day,base.group_user,1,1,1,0
access_hr_timesheet_attendance_report,access_hr_timesheet_attendance_report,model_hr_timesheet_attendance_report,hr_timesheet.group_hr_timesheet_manager,1,0,0,0
access_hr_timesheet_attendance_report,access_hr_timesheet_attendance_report,model_hr_timesheet_attendance_report,hr_timesheet.group_hr_timesheet_user,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_timesheet_sheet_sheet_day hr_timesheet_sheet.sheet.day model_hr_timesheet_sheet_sheet_day hr_timesheet.group_hr_timesheet_user 1 1 1 1
3 access_hr_timesheet_sheet_sheet_day_user hr.timesheet.sheet.sheet.day.user model_hr_timesheet_sheet_sheet_day base.group_user 1 1 1 0
4 access_hr_timesheet_attendance_report access_hr_timesheet_attendance_report model_hr_timesheet_attendance_report hr_timesheet.group_hr_timesheet_manager hr_timesheet.group_hr_timesheet_user 1 0 0 0
@@ -238,7 +238,7 @@
type="action"
class="oe_stat_button"
icon="fa-clock-o"
groups="hr_timesheet.group_hr_timesheet_manager">
groups="hr_timesheet.group_hr_timesheet_user">
<field name="timesheet_count" widget="statinfo" string="Timesheets"/>
</button>
</div>
@@ -196,6 +196,7 @@ var LivechatButton = Widget.extend({
date: moment(time.str_to_datetime(data.date)),
is_needaction: false,
is_note: data.is_note,
customer_email_data: []
};
// Compute displayed author name or email
@@ -112,6 +112,7 @@
<script type="text/javascript" src="/web/static/lib/qweb/qweb2.js"></script>
<!-- Odoo JS Framework -->
<script type="text/javascript" src="/web/static/src/js/boot.js"></script>
<script type="text/javascript" src="/web/static/src/js/config.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/class.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/translation.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/ajax.js"></script>
@@ -121,7 +122,11 @@
<script type="text/javascript" src="/web/static/src/js/framework/registry.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/session.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/utils.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/core.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/bus.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/local_storage.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/qweb.js"></script>
<script type="text/javascript" src="/web/static/src/js/services/core.js"></script>
<script type="text/javascript" src="/web/static/src/js/services/session.js"></script>
<!-- Bus, Mail, Livechat -->
<script type="text/javascript" src="/bus/static/src/js/bus.js"></script>
<script type="text/javascript" src="/mail/static/src/js/chat_window.js"></script>
+37 -37
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: Odoo Server 9.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-18 16:56+0200\n"
"PO-Revision-Date: 2015-09-18 17:09+0200\n"
"PO-Revision-Date: 2016-09-19 16:51+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.4\n"
"X-Generator: Poedit 1.8.9\n"
"Last-Translator: \n"
"Language: nl_BE\n"
@@ -495,17 +495,17 @@ msgstr "Resultaten uit de omrekening van vreemde valuta"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a175111
msgid "Effets à payer \\ Fournisseurs C.E.E."
msgstr ""
msgstr "Te betalen wissels: Leveranciers van de EEG"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a175110
msgid "Effets à payer \\ Fournisseurs belges"
msgstr ""
msgstr "Te betalen wissels: Belgische leveranciers"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a175112
msgid "Effets à payer \\ Fournisseurs importation"
msgstr ""
msgstr "Te betalen wissels: Import leveranciers"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4166
@@ -521,7 +521,7 @@ msgstr "Bedienden"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a3200
msgid "En cours de fabrication"
msgstr ""
msgstr "Goederen in bewerking"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a440
@@ -571,7 +571,7 @@ msgstr "Leveranciers"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a612
msgid "Fournitures"
msgstr ""
msgstr "Diverse leveringen"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a260
@@ -596,22 +596,22 @@ msgstr "Kosten van onderzoek en ontwikkeling"
#. module: l10n_be
#: model:account.tax.template,name:l10n_be.attn_VAT-IN-V82-CAR-EXC-C2
msgid "Frais de voiture - TVA 50% Deductible (Prix Excl.)"
msgstr ""
msgstr "Auto kosten - BTW 50% aftrekbaar (exl. prijs)"
#. module: l10n_be
#: model:account.tax.template,name:l10n_be.attn_VAT-IN-V82-CAR-EXC-C1
msgid "Frais de voiture - TVA 50% Non Deductible"
msgstr ""
msgstr "Auto kosten - BTW 50% niet aftrekbaar"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a3500
msgid "Immeubles destinés à la vente"
msgstr ""
msgstr "Onroerende goederen bestemd voor verkoop"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a2800
msgid "Immobilisations Financières"
msgstr ""
msgstr "Financiële vaste activa"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4120
@@ -641,17 +641,17 @@ msgstr "Goederen"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a300
msgid "Matières premières"
msgstr ""
msgstr "Grondstoffen"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a24011
msgid "Matériel de bureau de bâtiments administratifs et commerciaux"
msgstr ""
msgstr "Kantooruitrusting voor gebouwen met adminestratieve en commerciële functie"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a24010
msgid "Matériel de bureau de bâtiments industriels"
msgstr ""
msgstr "Kantooruitrusting voor gebouwen met industriële functie"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a2521
@@ -681,22 +681,22 @@ msgstr "Bedragen komende van het resultaat"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4541
msgid "ONSS. 1er trimestre"
msgstr ""
msgstr "R.S.Z. 1ste kwartaal"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4542
msgid "ONSS. 2ème trimestre"
msgstr ""
msgstr "R.S.Z. 2de kwartaal"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4543
msgid "ONSS. 3ème trimestre"
msgstr ""
msgstr "R.S.Z. 3de kwartaal"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4544
msgid "ONSS. 4ème trimestre"
msgstr ""
msgstr "R.S.Z. 4de kwartaal"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4540
@@ -762,7 +762,7 @@ msgstr "Dienstverlening buiten de E.E.G. (export)"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a11
msgid "Primes d'émission"
msgstr ""
msgstr "Uitgifte premies"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4930
@@ -782,12 +782,12 @@ msgstr "Diverse financiële opbrengsten"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a7600
msgid "Produits exceptionnels"
msgstr ""
msgstr "Uitzonderlijke opbrengsten"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a3300
msgid "Produits finis"
msgstr ""
msgstr "Gereed product"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a404
@@ -803,7 +803,7 @@ msgstr "Voorziening voor eindejaarspremie"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a1600
msgid "Provisions pour risques et charges"
msgstr ""
msgstr "Voorzieningen voor risico's en kosten"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a4533
@@ -823,12 +823,12 @@ msgstr "Onttrekking aan het kapitaal en aan de uitgiftepremies"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a780
msgid "Prélèvements sur les impôts différés"
msgstr ""
msgstr "Onttrekking aan de uitgestelde belastingen"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a789
msgid "Prélèvements sur les réserves immunisées"
msgstr ""
msgstr "Onttrekking aan de reserves"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a706
@@ -909,27 +909,27 @@ msgstr "Regularisering van geraamde belastingen"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a6200
msgid "Rémunérations: Administrateurs ou gérants"
msgstr ""
msgstr "Bezoldigingen: Bestuurders of zaakvoerders"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a6204
msgid "Rémunérations: Autres membres du personnel"
msgstr ""
msgstr "Bezoldigingen: Andere personeelsleden, verbonden met een arbeidsovereenkomst"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a6202
msgid "Rémunérations: Employés"
msgstr ""
msgstr "Bezoldigingen: Arbeiders"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a6203
msgid "Rémunérations: Ouvriers"
msgstr ""
msgstr "Bezoldigingen: Bedienden"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a6201
msgid "Rémunérations: Personnel de direction"
msgstr ""
msgstr "Bezoldigingen: Directiepersoneel"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a130
@@ -959,7 +959,7 @@ msgstr "Kapitaal- en interestsubsidies"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a150
msgid "Subsides obtenus"
msgstr ""
msgstr "Verkregen subsidies"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a41670
@@ -1204,7 +1204,7 @@ msgstr "Terreinen"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.trans
msgid "Transferts"
msgstr ""
msgstr "Transferten"
#. module: l10n_be
#: model:account.tax.template,name:l10n_be.attn_VAT-IN-V81-06-CC-C1
@@ -1509,32 +1509,32 @@ msgstr "VAT-IN-V83-21-ROW-CC-C2"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a7001
msgid "Ventes dans les pays membres de la C.E.E. (marchandises)"
msgstr ""
msgstr "Verkopen: leden van de Europese gemeenschap (handelsgoederen)"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a7011
msgid "Ventes dans les pays membres de la C.E.E. (produits finis)"
msgstr ""
msgstr "Verkopen: leden van de Europese gemeenschap (gereed product)"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a7000
msgid "Ventes en Belgique (marchandises)"
msgstr ""
msgstr "Verkopen: België (handelsgoederen)"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a7010
msgid "Ventes en Belgique (produits finis)"
msgstr ""
msgstr "Verkopen: België (gereed product)"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a7002
msgid "Ventes à l'exportation (marchandises)"
msgstr ""
msgstr "Verkopen: export (handelsgoederen)"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a7012
msgid "Ventes à l'exportation (produits finis)"
msgstr ""
msgstr "Verkopen: export (gereed product)"
#. module: l10n_be
#: model:account.account.template,name:l10n_be.a24100
File diff suppressed because it is too large Load Diff
+20
View File
@@ -0,0 +1,20 @@
Accounting chart for Netherlands
================================
This module is specially made to manage the accounting functionality
according to the Dutch best practice.
This module contains the Dutch Chart of Accounts and the VAT schema.
This schema is made for the most common Companies and therefore suitable
to be used for almost every Company.
The VAT accounts are linked promptly to generate the required reports. Examples
of this reports intercommunitaire transactions.
After installation of this module the configuration will be activated.
Select the Chart of Accounts named "Netherlands - Accounting".
Hereafter entering the name of the Company, total digits of Chart of Accounts,
Bank Account Number and the default Currency.
Note: total digits configured by default are 6.
+1 -1
View File
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl
# Copyright (C) 2016 ONESTEiN BV (<http://www.onestein.eu>).
+24 -30
View File
@@ -1,37 +1,31 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl
# Copyright (C) 2016 ONESTEiN BV (<http://www.onestein.eu>).
{
'name' : 'Netherlands - Accounting',
'version' : '2.0',
'category': 'Localization',
'description': """
This is the module to manage the accounting chart for Netherlands in Odoo.
=============================================================================
This module installs the a standard chart of accounts and also the Dutch Tax codes and
fiscal positions for deliveries inside and outside the UE.
In the company settings you can make the following settings:
- The number of digits of the chart of accounts.
By default the chart of accounts are 6 digits. 4 is the minimum number of digits.
- If you want to use Anglosaxon acounting
- The prefix of the bank accounts, by default 1100
- The prefix of the cash account, by default 1000
- The way of rounding the VAT.
""",
'author' : 'Veritos - Jan Verlaan',
'website' : 'http://www.veritos.nl',
'depends' : ['account',
'base_vat',
'base_iban',
'name': 'Netherlands - Accounting',
'version': '3.0',
'category': 'Localization/Account Charts',
'author': 'ONESTEiN BV',
'website': 'http://www.onestein.eu',
'depends': [
'account',
'base_vat',
'base_iban',
],
'data': ['data/l10n_nl_chart_data.xml',
'data/account_tax_fiscal_position_data.xml',
'data/account_fiscal_position_tax_template_data.xml',
'data/account_fiscal_position_account_template_data.xml',
'data/account_chart_template_data.yml',
],
'data': [
'data/account_account_tag.xml',
'data/account_chart_template.xml',
'data/account.account.template.xml',
'data/account_tax_template.xml',
'data/account_fiscal_position_template.xml',
'data/account_fiscal_position_tax_template.xml',
'data/account_fiscal_position_account_template.xml',
'data/account_chart_template.yml',
'data/menuitem.xml',
],
'demo': [],
'auto_install': False,
'installable': True,
}
File diff suppressed because it is too large Load Diff
+214
View File
@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Account Tags -->
<record id="account_tag_1" model="account.account.tag">
<field name="name">Lonen &amp; Salarissen</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_2" model="account.account.tag">
<field name="name">Huisvestingkosten</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_3" model="account.account.tag">
<field name="name">Afschrijvingen machines, installaties en machines</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_4" model="account.account.tag">
<field name="name">Gas, water en electriciteit</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_5" model="account.account.tag">
<field name="name">Kantoor</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_6" model="account.account.tag">
<field name="name">Auto</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_7" model="account.account.tag">
<field name="name">Verkoopkosten</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_8" model="account.account.tag">
<field name="name">Algemen kosten</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_9" model="account.account.tag">
<field name="name">Afschrijvingen</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_10" model="account.account.tag">
<field name="name">Kostprijs</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_11" model="account.account.tag">
<field name="name">Omzet</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_12" model="account.account.tag">
<field name="name">Resultaat</field>
<field name="applicability">accounts</field>
</record>
<!-- Tax Tags -->
<record id="tag_nl_01" model="account.account.tag">
<field name="name">Gegevens omzet</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_02" model="account.account.tag">
<field name="name">Rubriek 1: Prestaties binnenland</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_03" model="account.account.tag">
<field name="name">1a. Leveringen/diensten belast met hoog tarief (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_04" model="account.account.tag">
<field name="name">Leveringen/diensten belast met hoog tarief (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_05" model="account.account.tag">
<field name="name">1b. Leveringen/diensten belast met laag tarief (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_06" model="account.account.tag">
<field name="name">1c. Leveringen/diensten belast met overige tarieven behalve 0% (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_07" model="account.account.tag">
<field name="name">1d. Privégebruik (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_08" model="account.account.tag">
<field name="name">1e. Leveringen/diensten belast met 0% of niet bij u belast (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_09" model="account.account.tag">
<field name="name">Rubriek 2: Verleggingsregelingen binnenland (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_10" model="account.account.tag">
<field name="name">2a. Leveringen/diensten waarbij de heffing van omzetbelasting naar u is verlegd (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_11" model="account.account.tag">
<field name="name">Rubriek 3: Prestaties naar of in het buitenland (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_12" model="account.account.tag">
<field name="name">3a. Leveringen naar landen buiten de EU (uitvoer) (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_13" model="account.account.tag">
<field name="name">3b. Leveringen naar/diensten in landen binnen de EU (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_14" model="account.account.tag">
<field name="name">3c. Installatie/afstandsverkopen binnen de EU (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_15" model="account.account.tag">
<field name="name">Rubriek 4: Prestaties vanuit het buitenland aan u verricht (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_16" model="account.account.tag">
<field name="name">4a. Leveringen/diensten uit landen buiten de EU (invoer) (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_17" model="account.account.tag">
<field name="name">4b. Leveringen/diensten uit landen binnen de EU (omzet)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_18" model="account.account.tag">
<field name="name">Gegevens omzetbelasting (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_19" model="account.account.tag">
<field name="name">Rubriek 1: Prestaties binnenland (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_20" model="account.account.tag">
<field name="name">1a. Leveringen/diensten belast met 21% (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_21" model="account.account.tag">
<field name="name">Leveringen/diensten belast met hoog tarief (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_22" model="account.account.tag">
<field name="name">1b. Leveringen/diensten belast met laag tarief (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_23" model="account.account.tag">
<field name="name">1c. Leveringen/diensten belast met overige tarieven behalve 0% (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_24" model="account.account.tag">
<field name="name">1d. Privégebruik (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_25" model="account.account.tag">
<field name="name">1e. Leveringen/diensten belast met 0% of niet bij u belast (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_26" model="account.account.tag">
<field name="name">Rubriek 2: Verleggingsregelingen binnenland (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_27" model="account.account.tag">
<field name="name">2a. Leveringen/diensten waarbij de heffing van Heffing van omzetbelasting naar u is verlegd (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_28" model="account.account.tag">
<field name="name">Rubriek 4: Prestaties vanuit het buitenland aan u verricht (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_29" model="account.account.tag">
<field name="name">4a. Leveringen/diensten uit landen buiten de EU (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_30" model="account.account.tag">
<field name="name">4b. Leveringen/diensten uit landen binnen de EU (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_31" model="account.account.tag">
<field name="name">Rubriek 5: Voorbelasting, kleineondernemersregeling en totaal (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_32" model="account.account.tag">
<field name="name">5a. Verschuldigde omzetbelasting (rubrieken 1a t/m 4b) (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_33" model="account.account.tag">
<field name="name">5b. Voorbelasting (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_34" model="account.account.tag">
<field name="name">Voorbelasting (BTW) bis</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_35" model="account.account.tag">
<field name="name">5c. Subtotaal (rubriek 5a min 5b) (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_36" model="account.account.tag">
<field name="name">5d. Vermindering volgens de kleineondernemersregeling (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_37" model="account.account.tag">
<field name="name">5e. Schatting vorige aangifte(n) (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_38" model="account.account.tag">
<field name="name">5f. Schatting deze aangifte (BTW)</field>
<field name="applicability">taxes</field>
</record>
<record id="tag_nl_39" model="account.account.tag">
<field name="name">5g. Totaal te betalen/terug te vragen (BTW)</field>
<field name="applicability">taxes</field>
</record>
</data>
</openerp>
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="action_client_l10n_nl_menu" model="ir.actions.client">
<field name="name">Open Account Dashboard Menu</field>
<field name="tag">reload</field>
<field name="params" eval="{'menu_id': ref('account.menu_board_journal_1')}"/>
</record>
<record id="base.open_menu" model="ir.actions.todo">
<field name="action_id" ref="action_client_l10n_nl_menu"/>
<field name="state">open</field>
</record>
</data>
<data noupdate="0">
<!-- Chart Template -->
<record id="transfer_account_id" model="account.account.template">
<field name="name">Kruisposten</field>
<field name="code">1060</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_liquidity"/>
</record>
<record id="l10nnl_chart_template" model="account.chart.template">
<field name="name">Nederlands Grootboekschema</field>
<field name="code_digits">6</field>
<field name="currency_id" ref="base.EUR"/>
<field name="transfer_account_id" ref="transfer_account_id"/>
</record>
<record id="transfer_account_id" model="account.account.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
</record>
</data>
</openerp>
@@ -1,3 +1,3 @@
-
!python {model: account.chart.template, id: l10nnl_chart_template}: |
self[0].try_loading_for_current_company()
self[0].try_loading_for_current_company()
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Fiscal Position Account Templates -->
<!-- NON-EU Countries -->
<record
id="fiscal_position_account_non_eu_1"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="7001" />
<field name="account_dest_id" ref="7003" />
</record>
<record
id="fiscal_position_account_non_eu_2"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="7005" />
<field name="account_dest_id" ref="7007" />
</record>
<record
id="fiscal_position_account_non_eu_3"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="7009" />
<field name="account_dest_id" ref="7011" />
</record>
<record
id="fiscal_position_account_non_eu_4"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="8001" />
<field name="account_dest_id" ref="8003" />
</record>
<record
id="fiscal_position_account_non_eu_5"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="8011" />
<field name="account_dest_id" ref="8013" />
</record>
<record
id="fiscal_position_account_non_eu_6"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="8021" />
<field name="account_dest_id" ref="8023" />
</record>
<!-- EU Countries -->
<record
id="fiscal_position_account_eu_1"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="7001" />
<field name="account_dest_id" ref="7002" />
</record>
<record
id="fiscal_position_account_eu_2"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="7005" />
<field name="account_dest_id" ref="7006" />
</record>
<record
id="fiscal_position_account_eu_3"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="7009" />
<field name="account_dest_id" ref="7010" />
</record>
<record
id="fiscal_position_account_eu_4"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="8001" />
<field name="account_dest_id" ref="8002" />
</record>
<record
id="fiscal_position_account_eu_5"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="8011" />
<field name="account_dest_id" ref="8012" />
</record>
<record
id="fiscal_position_account_eu_6"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="8021" />
<field name="account_dest_id" ref="8022" />
</record>
</data>
</openerp>
@@ -1,242 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Fiscal Position Account Templates -->
<!-- Position 2 - NON-EU Countries -->
<!-- inkopen laag -->
<record
id="position_account_non_eu_purchase_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_7001" />
<field name="account_dest_id" ref="l10n_nl.a_7017" />
</record>
<!-- inkopen hoog. NB: id not according to convention! -->
<record
id="position_account_non_eu_purchase_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_expense" />
<field name="account_dest_id" ref="l10n_nl.a_7018" />
</record>
<!-- inkopen overig -->
<record
id="position_account_non_eu_purchase_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_7003" />
<field name="account_dest_id" ref="l10n_nl.a_7019" />
</record>
<!-- verkopen fabricage -->
<!-- verkopen laag -->
<record
id="position_account_non_eu_production_sales_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8001" />
<field name="account_dest_id" ref="l10n_nl.a_8020" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_non_eu_production_sales_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8002" />
<field name="account_dest_id" ref="l10n_nl.a_8020" />
</record>
<!-- verkopen overig -->
<record
id="position_account_non_eu_sales_production_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8003" />
<field name="account_dest_id" ref="l10n_nl.a_8020" />
</record>
<!-- verkopen handel -->
<!-- verkopen laag -->
<record
id="position_account_non_eu_sales_trade_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8011" />
<field name="account_dest_id" ref="l10n_nl.a_8021" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_non_eu_sales_trade_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_sale" />
<field name="account_dest_id" ref="l10n_nl.a_8021" />
</record>
<!-- verkopen overig -->
<record
id="position_account_non_eu_sales_trade_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8013" />
<field name="account_dest_id" ref="l10n_nl.a_8021" />
</record>
<!-- verkopen diensten fabricage -->
<!-- verkopen laag -->
<record
id="position_account_non_eu_sales_service_production_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8041" />
<field name="account_dest_id" ref="l10n_nl.a_8060" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_non_eu_sales_service_production_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8042" />
<field name="account_dest_id" ref="l10n_nl.a_8060" />
</record>
<!-- verkopen overig -->
<record
id="position_account_non_eu_sales_service_production_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8043" />
<field name="account_dest_id" ref="l10n_nl.a_8060" />
</record>
<!-- verkopen diensten handel -->
<!-- verkopen laag -->
<record
id="position_account_non_eu_sales_service_trade_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8051" />
<field name="account_dest_id" ref="l10n_nl.a_8061" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_non_eu_sales_service_trade_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_non_eu" />
<field name="account_src_id" ref="l10n_nl.a_8052" />
<field name="account_dest_id" ref="l10n_nl.a_8061" />
</record>
<!-- verkopen overig: is er niet?? -->
<!-- Position 3 - EU Countries -->
<!-- inkopen laag -->
<record
id="position_account_eu_purchase_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_7001" />
<field name="account_dest_id" ref="l10n_nl.a_7014" />
</record>
<!-- inkopen hoog -->
<record
id="position_account_eu_purchase_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_expense" />
<field name="account_dest_id" ref="l10n_nl.a_7015" />
</record>
<!-- inkopen overig -->
<record
id="position_account_eu_purchase_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_7003" />
<field name="account_dest_id" ref="l10n_nl.a_7016" />
</record>
<!-- verkopen fabricage -->
<!-- verkopen laag -->
<record
id="position_account_eu_sales_production_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8001" />
<field name="account_dest_id" ref="l10n_nl.a_8000" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_eu_sales_production_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8002" />
<field name="account_dest_id" ref="l10n_nl.a_8000" />
</record>
<!-- verkopen overig -->
<record
id="position_account_eu_sales_production_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8003" />
<field name="account_dest_id" ref="l10n_nl.a_8000" />
</record>
<!-- verkopen handel -->
<!-- verkopen laag -->
<record
id="position_account_eu_sales_trade_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8011" />
<field name="account_dest_id" ref="l10n_nl.a_8010" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_eu_sales_trade_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_sale" />
<field name="account_dest_id" ref="l10n_nl.a_8010" />
</record>
<!-- verkopen overig -->
<record
id="position_account_eu_sales_trade_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8013" />
<field name="account_dest_id" ref="l10n_nl.a_8010" />
</record>
<!-- verkopen diensten fabricage -->
<!-- verkopen laag -->
<record
id="position_account_eu_sales_service_production_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8041" />
<field name="account_dest_id" ref="l10n_nl.a_8040" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_eu_sales_service_production_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8042" />
<field name="account_dest_id" ref="l10n_nl.a_8040" />
</record>
<!-- verkopen overig -->
<record
id="position_account_eu_sales_service_production_other"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8043" />
<field name="account_dest_id" ref="l10n_nl.a_8040" />
</record>
<!-- verkopen diensten handel -->
<!-- verkopen laag -->
<record
id="position_account_eu_sales_service_trade_low"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8051" />
<field name="account_dest_id" ref="l10n_nl.a_8050" />
</record>
<!-- verkopen hoog -->
<record
id="position_account_eu_sales_service_trade_high"
model="account.fiscal.position.account.template">
<field name="position_id" ref="fiscal_position_template_eu" />
<field name="account_src_id" ref="l10n_nl.a_8052" />
<field name="account_dest_id" ref="l10n_nl.a_8050" />
</record>
<!-- verkopen overig: is er niet?? -->
</odoo>
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- account.fiscal.position.tax.template -->
<!-- NON-EU Countries -->
<!-- All sales tax will become 0 -->
<record id="position_tax_extracom_0" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_0"/>
<field name="tax_dest_id" ref="btw_X1"/>
</record>
<record id="position_tax_extracom_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_6"/>
<field name="tax_dest_id" ref="btw_X1"/>
</record>
<record id="position_tax_extracom_21" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_21"/>
<field name="tax_dest_id" ref="btw_X1"/>
</record>
<record id="position_tax_extracom_overig" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_overig"/>
<field name="tax_dest_id" ref="btw_X1"/>
</record>
<record id="position_tax_extracom_d_0" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_0_d"/>
<field name="tax_dest_id" ref="btw_X3"/>
</record>
<record id="position_tax_extracom_d_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_6_d"/>
<field name="tax_dest_id" ref="btw_X3"/>
</record>
<record id="position_tax_extracom_d_21" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_21_d"/>
<field name="tax_dest_id" ref="btw_X3"/>
</record>
<record id="position_tax_extracom_d_overig" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_overig_d"/>
<field name="tax_dest_id" ref="btw_X3"/>
</record>
<!-- VAT on buying from outside the EU -->
<record id="position_tax_extracom_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_6_buy"/>
<field name="tax_dest_id" ref="btw_E1"/>
</record>
<record id="position_tax_extracom_7" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_21_buy"/>
<field name="tax_dest_id" ref="btw_E2"/>
</record>
<record id="position_tax_extracom_8" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_overig_buy"/>
<field name="tax_dest_id" ref="btw_E_overig"/>
</record>
<record id="position_tax_extracom_d_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_6_buy_d"/>
<field name="tax_dest_id" ref="btw_E1"/>
</record>
<record id="position_tax_extracom_d_7" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_21_buy_d"/>
<field name="tax_dest_id" ref="btw_E2"/>
</record>
<record id="position_tax_extracom_d_8" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="btw_overig_buy_d"/>
<field name="tax_dest_id" ref="btw_E_overig"/>
</record>
<!-- EU Countries -->
<record id="position_tax_intracom_1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_0"/>
<field name="tax_dest_id" ref="btw_X0"/>
</record>
<record id="position_tax_intracom_2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_6"/>
<field name="tax_dest_id" ref="btw_X0"/>
</record>
<record id="position_tax_intracom_3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_21"/>
<field name="tax_dest_id" ref="btw_X0"/>
</record>
<record id="position_tax_intracom_4" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_overig"/>
<field name="tax_dest_id" ref="btw_X0"/>
</record>
<record id="position_tax_intracom_d_1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_0_d"/>
<field name="tax_dest_id" ref="btw_X2"/>
</record>
<record id="position_tax_intracom_d_2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_6_d"/>
<field name="tax_dest_id" ref="btw_X2"/>
</record>
<record id="position_tax_intracom_d_3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_21_d"/>
<field name="tax_dest_id" ref="btw_X2"/>
</record>
<record id="position_tax_intracom_d_4" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_overig_d"/>
<field name="tax_dest_id" ref="btw_X2"/>
</record>
<record id="position_tax_intracom_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_6_buy"/>
<field name="tax_dest_id" ref="btw_I_6"/>
</record>
<record id="position_tax_intracom_7" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_21_buy"/>
<field name="tax_dest_id" ref="btw_I_21"/>
</record>
<record id="position_tax_intracom_8" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_overig_buy"/>
<field name="tax_dest_id" ref="btw_I_overig"/>
</record>
<record id="position_tax_intracom_d_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_6_buy_d"/>
<field name="tax_dest_id" ref="btw_I_6"/>
</record>
<record id="position_tax_intracom_d_7" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_21_buy_d"/>
<field name="tax_dest_id" ref="btw_I_21"/>
</record>
<record id="position_tax_intracom_d_8" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="btw_overig_buy_d"/>
<field name="tax_dest_id" ref="btw_I_overig"/>
</record>
<!-- BTW verlegd -->
<record id="position_tax_transferred" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_transferred"/>
<field name="tax_src_id" ref="btw_21_buy"/>
<field name="tax_dest_id" ref="btw_ink_0"/>
</record>
</data>
</openerp>
@@ -1,100 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- account.fiscal.position.tax.template -->
<!-- Position 2 - NON-EU Countries -->
<!-- All sales tax will become 0 -->
<record id="position_tax_extracom_1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_0"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X1"/>
</record>
<record id="position_tax_extracom_2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_6"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X1"/>
</record>
<record id="position_tax_extracom_3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_21"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X1"/>
</record>
<record id="position_tax_extracom_4" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_overig"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X1"/>
</record>
<!-- VAT on buying from outside the EU -->
<!-- VAT low -->
<record id="position_tax_extracom_5" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_6_buy"/>
<field name="tax_dest_id" ref="l10n_nl.btw_E1"/>
</record>
<!-- VAT high -->
<record id="position_tax_extracom_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_21_buy"/>
<field name="tax_dest_id" ref="l10n_nl.btw_E2"/>
</record>
<!-- VAT other -->
<record id="position_tax_extracom_7" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_non_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_overig_buy"/>
<field name="tax_dest_id" ref="l10n_nl.btw_E_overig"/>
</record>
<!-- Belgian schema has many more lines here.... -->
<!-- Position 3 - EU Countries -->
<record id="position_tax_intracom_1" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_0"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X0"/>
</record>
<record id="position_tax_intracom_2" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_6"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X0"/>
</record>
<record id="position_tax_intracom_3" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_21"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X0"/>
</record>
<record id="position_tax_intracom_4" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_overig"/>
<field name="tax_dest_id" ref="l10n_nl.btw_X0"/>
</record>
<!-- In source-tax we lack the separation of goods and services,
therefore no lines now for "Installatie/Afstandsverkopen. -->
<!-- Buying from other EU countries (only goods = VAT 0 -->
<record id="position_tax_intracom_5" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_6_buy"/>
<field name="tax_dest_id" ref="l10n_nl.btw_I_6"/>
</record>
<record id="position_tax_intracom_6" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_21_buy"/>
<field name="tax_dest_id" ref="l10n_nl.btw_I_21"/>
</record>
<record id="position_tax_intracom_7" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_eu"/>
<field name="tax_src_id" ref="l10n_nl.btw_overig_buy"/>
<field name="tax_dest_id" ref="l10n_nl.btw_I_overig"/>
</record>
<record id="position_tax_transferred" model="account.fiscal.position.tax.template">
<field name="position_id" ref="fiscal_position_template_transferred"/>
<field name="tax_src_id" ref="l10n_nl.btw_21_buy"/>
<field name="tax_dest_id" ref="l10n_nl.btw_ink_0"/>
</record>
<!-- Again, Belgian schema has 17 (!) more records. Missing VAT 0
and separation of goods and services .. -->
</odoo>
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<openerp>
<data>
<!-- Fiscal Position Templates -->
<record id="fiscal_position_template_domestic" model="account.fiscal.position.template">
<record id="fiscal_position_template_national" model="account.fiscal.position.template">
<field name="name">Binnenland</field>
<field name="chart_template_id" ref="l10nnl_chart_template" />
</record>
@@ -18,4 +19,6 @@
<field name="name">Niet-EU landen</field>
<field name="chart_template_id" ref="l10nnl_chart_template" />
</record>
</odoo>
</data>
</openerp>
@@ -0,0 +1,733 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Binnen Nederland -->
<!-- Verkoop BTW -->
<record id="btw_0" model="account.tax.template">
<field name="sequence">10</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet onbelast (nul-tarief)</field>
<field name="description">0% BTW</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_0"/>
<field name="account_id" ref="vat_payable_0"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_08')])]"/>
</record>
<record id="btw_6" model="account.tax.template">
<field name="sequence">10</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet laag</field>
<field name="description">6% BTW</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_l"/>
<field name="account_id" ref="vat_payable_l"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_05'),ref('tag_nl_22')])]"/>
</record>
<record id="btw_21" model="account.tax.template">
<field name="sequence">5</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet hoog</field>
<field name="description">21% BTW</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h"/>
<field name="account_id" ref="vat_payable_h"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_03'),ref('tag_nl_20')])]"/>
</record>
<record id="btw_overig" model="account.tax.template">
<field name="sequence">15</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet overig</field>
<field name="description">variabel BTW</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h"/>
<field name="account_id" ref="vat_payable_h"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_04'),ref('tag_nl_06'),ref('tag_nl_21'),ref('tag_nl_23')])]"/>
</record>
<!-- Verkoop BTW Diensten -->
<record id="btw_0_d" model="account.tax.template">
<field name="sequence">10</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet onbelast (nul-tarief) diensten</field>
<field name="description">0% BTW diensten</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_0_d"/>
<field name="account_id" ref="vat_payable_0_d"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_08')])]"/>
</record>
<record id="btw_6_d" model="account.tax.template">
<field name="sequence">10</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet laag diensten</field>
<field name="description">6% BTW diensten</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_l_d"/>
<field name="account_id" ref="vat_payable_l_d"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_05'),ref('tag_nl_22')])]"/>
</record>
<record id="btw_21_d" model="account.tax.template">
<field name="sequence">5</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet hoog diensten</field>
<field name="description">21% BTW diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_d"/>
<field name="account_id" ref="vat_payable_h_d"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_03'),ref('tag_nl_20')])]"/>
</record>
<record id="btw_overig_d" model="account.tax.template">
<field name="sequence">15</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet overig diensten</field>
<field name="description">variabel BTW diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_d"/>
<field name="account_id" ref="vat_payable_h_d"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_04'),ref('tag_nl_06'),ref('tag_nl_21'),ref('tag_nl_23')])]"/>
</record>
<!--Inkoop BTW -->
<record id="btw_6_buy" model="account.tax.template">
<field name="sequence">10</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen laag (inkopen)</field>
<field name="description">6% BTW</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_l"/>
<field name="account_id" ref="vat_refund_l"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_6_buy_incl" model="account.tax.template">
<field name="sequence">10</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen laag (inkopen incl. BTW)</field>
<field name="description">6% BTW Incl.</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="price_include">True</field>
<field name="refund_account_id" ref="vat_refund_l"/>
<field name="account_id" ref="vat_refund_l"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_21_buy" model="account.tax.template">
<field name="sequence">5</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen hoog (inkopen)</field>
<field name="description">21% BTW</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h"/>
<field name="account_id" ref="vat_refund_h"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_21_buy_incl" model="account.tax.template">
<field name="sequence">5</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen hoog (inkopen incl. BTW)</field>
<field name="description">21% BTW Incl.</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="price_include">True</field>
<field name="refund_account_id" ref="vat_refund_h"/>
<field name="account_id" ref="vat_refund_h"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_overig_buy" model="account.tax.template">
<field name="sequence">15</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen overig (inkopen)</field>
<field name="description">variabel BTW</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h"/>
<field name="account_id" ref="vat_refund_h"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<!--Inkoop BTW diensten -->
<record id="btw_6_buy_d" model="account.tax.template">
<field name="sequence">10</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen laag (inkopen) diensten</field>
<field name="description">6% BTW diensten</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_l_d"/>
<field name="account_id" ref="vat_refund_l_d"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_21_buy_d" model="account.tax.template">
<field name="sequence">5</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen hoog (inkopen) diensten</field>
<field name="description">21% BTW diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_d"/>
<field name="account_id" ref="vat_refund_h_d"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_overig_buy_d" model="account.tax.template">
<field name="sequence">15</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen overig (inkopen) diensten</field>
<field name="description">variabel BTW diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_d"/>
<field name="account_id" ref="vat_refund_h_d"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<!--BTW verlegd-->
<record id="btw_verk_0" model="account.tax.template">
<field name="sequence">15</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW af te dragen verlegd (verkopen)</field>
<field name="description">0% BTW verlegd</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_v"/>
<field name="account_id" ref="vat_payable_v"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_08')])]"/>
</record>
<record id="btw_ink_0_1" model="account.tax.template">
<field name="sequence">98</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen verlegd (inkopen1)</field>
<field name="description">BTW te vorderen verlegd (inkopen1)</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_v"/>
<field name="account_id" ref="vat_payable_v"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_27')])]"/>
</record>
<record id="btw_ink_0_2" model="account.tax.template">
<field name="sequence">99</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW af te dragen verlegd (inkopen2)</field>
<field name="description">BTW af te dragen verlegd (inkopen2)</field>
<field eval="-21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_v"/>
<field name="account_id" ref="vat_payable_v"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_34')])]"/>
</record>
<record id="btw_ink_0" model="account.tax.template">
<field name="sequence">15</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW af te dragen verlegd (inkopen)</field>
<field name="description">21% BTW verlegd</field>
<field eval="21" name="amount"/>
<field name="amount_type">group</field>
<field name="refund_account_id" ref="vat_payable_v"/>
<field name="account_id" ref="vat_payable_v"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_10')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_ink_0_1'), ref('btw_ink_0_2')])]"/>
</record>
<!-- Binnen de EU -->
<!-- BTW inkoop -->
<record id="btw_I_6_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">21</field>
<field name="name">Inkopen import binnen EU laag(1)</field>
<field name="description">Inkopen import binnen EU laag(1)</field>
<field eval="-6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_l_eu"/>
<field name="account_id" ref="vat_payable_l_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_30')])]"/>
</record>
<record id="btw_I_6_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">22</field>
<field name="name">Inkopen import binnen EU laag(2)</field>
<field name="description">Inkopen import binnen EU laag(2)</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_l_eu"/>
<field name="account_id" ref="vat_refund_l_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_I_6" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU laag</field>
<field name="description">6% BTW import binnen EU</field>
<field eval="6" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_17')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_I_6_1'), ref('btw_I_6_2')])]"/>
</record>
<record id="btw_I_21_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">21</field>
<field name="name">Inkopen import binnen EU hoog(1)</field>
<field name="description">Inkopen import binnen EU hoog(1)</field>
<field eval="-21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_eu"/>
<field name="account_id" ref="vat_payable_h_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_30')])]"/>
</record>
<record id="btw_I_21_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">22</field>
<field name="name">Inkopen import binnen EU hoog(2)</field>
<field name="description">Inkopen import binnen EU hoog(2)</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_eu"/>
<field name="account_id" ref="vat_refund_h_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_I_21" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">20</field>
<field name="name">Inkopen import binnen EU hoog</field>
<field name="description">21% BTW import binnen EU</field>
<field eval="21" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_17')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_I_21_1'), ref('btw_I_21_2')])]"/>
</record>
<record id="btw_I_overig_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU overig(1)</field>
<field name="description">Inkopen import binnen EU overig(1)</field>
<field name="sequence">99</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_eu"/>
<field name="account_id" ref="vat_payable_h_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_30')])]"/>
</record>
<record id="btw_I_overig_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU overig(2)</field>
<field name="description">Inkopen import binnen EU overig(2)</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_eu"/>
<field name="account_id" ref="vat_refund_h_eu"/>
<field name="sequence">98</field>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_I_overig" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU overig</field>
<field name="description">0% BTW import binnen EU</field>
<field eval="0" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_17')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_I_overig_1'), ref('btw_I_overig_2')])]"/>
</record>
<!-- BTW verkoop -->
<record id="btw_X0" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen export binnen EU</field>
<field name="description">BTW export binnen EU</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_0_eu"/>
<field name="account_id" ref="vat_payable_0_eu"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_13')])]"/>
</record>
<record id="btw_X2" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Installatie/afstandsverkopen binnen EU</field>
<field name="description">Inst./afst.verkopen binnen EU</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_0_eu"/>
<field name="account_id" ref="vat_payable_0_eu"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_14')])]"/>
</record>
<!-- BTW inkoop diensten -->
<record id="btw_I_6_d_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">21</field>
<field name="name">Inkopen import binnen EU laag(1) diensten</field>
<field name="description">Inkopen import binnen EU laag(1) diensten</field>
<field eval="-6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_l_d_eu"/>
<field name="account_id" ref="vat_payable_l_d_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_30')])]"/>
</record>
<record id="btw_I_6_d_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">22</field>
<field name="name">Inkopen import binnen EU laag(2) diensten</field>
<field name="description">Inkopen import binnen EU laag(2) diensten</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_l_d_eu"/>
<field name="account_id" ref="vat_refund_l_d_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_I_6_d" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU laag diensten</field>
<field name="description">6% BTW import binnen EU diensten</field>
<field eval="6" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_17')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_I_6_d_1'), ref('btw_I_6_d_2')])]"/>
</record>
<record id="btw_I_21_d_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">21</field>
<field name="name">Inkopen import binnen EU hoog(1) diensten</field>
<field name="description">Inkopen import binnen EU hoog(1) diensten</field>
<field eval="-21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_d_eu"/>
<field name="account_id" ref="vat_payable_h_d_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_30')])]"/>
</record>
<record id="btw_I_21_d_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">22</field>
<field name="name">Inkopen import binnen EU hoog(2) diensten</field>
<field name="description">Inkopen import binnen EU hoog(2) diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_d_eu"/>
<field name="account_id" ref="vat_refund_h_d_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_I_21_d" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="sequence">20</field>
<field name="name">Inkopen import binnen EU hoog diensten</field>
<field name="description">21% BTW import binnen EU diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_17')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_I_21_d_1'), ref('btw_I_21_d_2')])]"/>
</record>
<record id="btw_I_overig_d_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU overig(1) diensten</field>
<field name="description">Inkopen import binnen EU overig(1) diensten</field>
<field name="sequence">99</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_d_eu"/>
<field name="account_id" ref="vat_payable_h_d_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_30')])]"/>
</record>
<record id="btw_I_overig_d_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU overig(2) diensten</field>
<field name="description">Inkopen import binnen EU overig(2) diensten</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_d_eu"/>
<field name="account_id" ref="vat_refund_h_d_eu"/>
<field name="sequence">98</field>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_I_overig_d" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU overig diensten</field>
<field name="description">0% BTW import binnen EU diensten</field>
<field eval="0" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_17')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_I_overig_d_1'), ref('btw_I_overig_d_2')])]"/>
</record>
<!-- Buiten de EU -->
<!-- BTW inkoop -->
<record id="btw_E1_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU laag(1)</field>
<field name="description">Inkopen import buiten EU laag(1)</field>
<field eval="-6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_l_non_eu"/>
<field name="account_id" ref="vat_payable_l_non_eu"/>
<field name="sequence">21</field>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_29')])]"/>
</record>
<record id="btw_E1_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU laag(2)</field>
<field name="description">Inkopen import buiten EU laag(2)</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_l_non_eu"/>
<field name="account_id" ref="vat_refund_l_non_eu"/>
<field name="sequence">22</field>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_E1" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU laag</field>
<field name="description">BTW import buiten EU laag inkopen</field>
<field eval="6" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_16')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_E1_1'), ref('btw_E1_2')])]"/>
</record>
<record id="btw_E2_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU hoog(1)</field>
<field name="description">Inkopen import buiten EU hoog(1)</field>
<field eval="-21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_non_eu"/>
<field name="sequence">21</field>
<field name="account_id" ref="vat_payable_h_non_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_29')])]"/>
</record>
<record id="btw_E2_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU hoog(2)</field>
<field name="description">Inkopen import buiten EU hoog(2)</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="sequence">22</field>
<field name="refund_account_id" ref="vat_refund_h_non_eu"/>
<field name="account_id" ref="vat_refund_h_non_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_34')])]"/>
</record>
<record id="btw_E2" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU hoog</field>
<field name="description">BTW import buiten EU hoog inkopen</field>
<field eval="21" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_16')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_E2_1'), ref('btw_E2_2')])]"/>
</record>
<record id="btw_E_overig_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU overig(1)</field>
<field name="description">Inkopen import buiten EU overig(1)</field>
<field eval="-21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_non_eu"/>
<field name="account_id" ref="vat_payable_h_non_eu"/>
<field name="type_tax_use">none</field>
<field name="sequence">21</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_29')])]"/>
</record>
<record id="btw_E_overig_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU overig(2)</field>
<field name="description">Inkopen import buiten EU overig(2)</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_non_eu"/>
<field name="account_id" ref="vat_refund_h_non_eu"/>
<field name="type_tax_use">none</field>
<field name="sequence">22</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_E_overig" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU overig</field>
<field name="description">BTW import buiten EU overig inkopen</field>
<field eval="21" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_16')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_E_overig_1'), ref('btw_E_overig_2')])]"/>
</record>
<!-- BTW Verkoop -->
<record id="btw_X1" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen export buiten EU</field>
<field name="description">BTW export buiten EU</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_0_non_eu"/>
<field name="account_id" ref="vat_payable_0_non_eu"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_12')])]"/>
</record>
<record id="btw_X3" model="account.tax.template">
<field name="sequence">21</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Installatie/afstandsverkopen buiten EU</field>
<field name="description">Inst./afst.verkopen buiten EU</field>
<field eval="0" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_0_non_eu"/>
<field name="account_id" ref="vat_payable_0_non_eu"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_12')])]"/>
</record>
<!-- BTW inkoop diensten -->
<record id="btw_E1_d_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU laag(1) diensten</field>
<field name="description">Inkopen import buiten EU laag(1) diensten</field>
<field eval="-6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_l_d_non_eu"/>
<field name="account_id" ref="vat_payable_l_d_non_eu"/>
<field name="sequence">21</field>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_29')])]"/>
</record>
<record id="btw_E1_d_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU laag(2) diensten</field>
<field name="description">Inkopen import buiten EU laag(2) diensten</field>
<field eval="6" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_l_d_non_eu"/>
<field name="account_id" ref="vat_refund_l_d_non_eu"/>
<field name="sequence">22</field>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_E1_d" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU laag diensten</field>
<field name="description">BTW import buiten EU laag inkopen diensten</field>
<field eval="6" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_16')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_E1_d_1'), ref('btw_E1_d_2')])]"/>
</record>
<record id="btw_E2_d_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU hoog(1) diensten</field>
<field name="description">Inkopen import buiten EU hoog(1) diensten</field>
<field eval="-21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_d_non_eu"/>
<field name="sequence">21</field>
<field name="account_id" ref="vat_payable_h_d_non_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_29')])]"/>
</record>
<record id="btw_E2_d_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU hoog(2) diensten</field>
<field name="description">Inkopen import buiten EU hoog(2) diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="sequence">22</field>
<field name="refund_account_id" ref="vat_refund_h_d_non_eu"/>
<field name="account_id" ref="vat_refund_h_d_non_eu"/>
<field name="type_tax_use">none</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_34')])]"/>
</record>
<record id="btw_E2_d" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU hoog diensten</field>
<field name="description">BTW import buiten EU hoog inkopen diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_16')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_E2_d_1'), ref('btw_E2_d_2')])]"/>
</record>
<record id="btw_E_overig_d_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU overig(1) diensten</field>
<field name="description">Inkopen import buiten EU overig(1) diensten</field>
<field eval="-21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_payable_h_d_non_eu"/>
<field name="account_id" ref="vat_payable_h_d_non_eu"/>
<field name="type_tax_use">none</field>
<field name="sequence">21</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_29')])]"/>
</record>
<record id="btw_E_overig_d_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU overig(2) diensten</field>
<field name="description">Inkopen import buiten EU overig(2) diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="vat_refund_h_d_non_eu"/>
<field name="account_id" ref="vat_refund_h_d_non_eu"/>
<field name="type_tax_use">none</field>
<field name="sequence">22</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_33')])]"/>
</record>
<record id="btw_E_overig_d" model="account.tax.template">
<field name="sequence">20</field>
<field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU overig diensten</field>
<field name="description">BTW import buiten EU overig inkopen diensten</field>
<field eval="21" name="amount"/>
<field name="amount_type">group</field>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('tag_nl_16')])]"/>
<field name="children_tax_ids" eval="[(6, 0, [ref('btw_E_overig_d_1'), ref('btw_E_overig_d_2')])]"/>
</record>
</data>
</openerp>
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<menuitem id="account_reports_nl_statements_menu" name="Dutch Statements" parent="account.menu_finance_reports" sequence="3" groups="account.group_account_user"/>
</openerp>
+5 -5
View File
@@ -276,10 +276,10 @@ class Message(models.Model):
handle partners in batch to avoid doing numerous queries.
:param list messages: list of message, as get_dict result
:param dict message_tree: {[msg.id]: msg browse record}
:param dict message_tree: {[msg.id]: msg browse record as super user}
"""
# 1. Aggregate partners (author_id and partner_ids), attachments and tracking values
partners = self.env['res.partner']
partners = self.env['res.partner'].sudo()
attachments = self.env['ir.attachment']
trackings = self.env['mail.tracking.value']
for key, message in message_tree.iteritems():
@@ -295,8 +295,8 @@ class Message(models.Model):
attachments |= message.attachment_ids
if message.tracking_value_ids:
trackings |= message.tracking_value_ids
# Read partners as SUPERUSER -> display the names like classic m2o even if no access
partners_names = partners.sudo().name_get()
# Read partners as SUPERUSER -> message being browsed as SUPERUSER it is already the case
partners_names = partners.name_get()
partner_tree = dict((partner[0], partner) for partner in partners_names)
# 2. Attachments as SUPERUSER, because could receive msg and attachments for doc uid cannot see
@@ -411,7 +411,7 @@ class Message(models.Model):
'needaction_partner_ids', # list of partner ids for whom the message is a needaction
'starred_partner_ids', # list of partner ids for whom the message is starred
])
message_tree = dict((m.id, m) for m in self)
message_tree = dict((m.id, m) for m in self.sudo())
self._message_read_dict_postprocess(message_values, message_tree)
# add subtype data (is_note flag, subtype_description). Do it as sudo
+2 -2
View File
@@ -16,7 +16,7 @@
<record id="mail_followers_read_write_own" model="ir.rule">
<field name="name">mail.followers: write its own entries</field>
<field name="model_id" ref="model_mail_followers"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="groups" eval="[(4, ref('base.group_user')), (4, ref('base.group_portal'))]"/>
<field name="domain_force">[('partner_id', '=', user.partner_id.id)]</field>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
@@ -26,7 +26,7 @@
<record id="ir_rule_mail_notifications_group_user" model="ir.rule">
<field name="name">mail.notifications: group_user: write its own entries</field>
<field name="model_id" ref="model_mail_notification"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="groups" eval="[(4, ref('base.group_user')), (4, ref('base.group_portal'))]"/>
<field name="domain_force">[('res_partner_id', '=', user.partner_id.id)]</field>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
+15 -49
View File
@@ -2,7 +2,7 @@
from datetime import date, datetime, timedelta
from odoo import api, fields, models, _
from odoo import api, fields, models, SUPERUSER_ID, _
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
@@ -123,7 +123,8 @@ class MaintenanceEquipment(models.Model):
active = fields.Boolean(default=True)
technician_user_id = fields.Many2one('res.users', string='Technician', track_visibility='onchange', oldname='user_id')
owner_user_id = fields.Many2one('res.users', string='Owner', track_visibility='onchange')
category_id = fields.Many2one('maintenance.equipment.category', string='Equipment Category', track_visibility='onchange')
category_id = fields.Many2one('maintenance.equipment.category', string='Equipment Category',
track_visibility='onchange', group_expand='_read_group_category_ids')
partner_id = fields.Many2one('res.partner', string='Vendor', domain="[('supplier', '=', 1)]")
partner_ref = fields.Char('Vendor Reference')
location = fields.Char('Location')
@@ -181,26 +182,13 @@ class MaintenanceEquipment(models.Model):
self.message_subscribe_users(user_ids=[vals['owner_user_id']])
return super(MaintenanceEquipment, self).write(vals)
@api.multi
def _read_group_category_ids(self, domain, read_group_order=None, access_rights_uid=None):
""" Read group customization in order to display all the category in the
kanban view, even if they are empty
@api.model
def _read_group_category_ids(self, categories, domain, order):
""" Read group customization in order to display all the categories in
the kanban view, even if they are empty.
"""
category_obj = self.env['maintenance.equipment.category']
order = category_obj._order
access_rights_uid = access_rights_uid or self._uid
if read_group_order == 'category_id desc':
order = '%s desc' % order
category_ids = category_obj._search([], order=order, access_rights_uid=access_rights_uid)
result = [category.name_get()[0] for category in category_obj.browse(category_ids)]
# restore order of the search
result.sort(lambda x, y: cmp(category_ids.index(x[0]), category_ids.index(y[0])))
fold = {}
for category in category_obj.browse(category_ids):
fold[category.id] = category.fold
return result, fold
category_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
return categories.browse(category_ids)
@api.model
def _cron_generate_requests(self):
@@ -214,10 +202,6 @@ class MaintenanceEquipment(models.Model):
'maintenance_type': 'preventive',
})
_group_by_full = {
'category_id': _read_group_category_ids
}
class MaintenanceRequest(models.Model):
_name = 'maintenance.request'
@@ -249,7 +233,8 @@ class MaintenanceRequest(models.Model):
category_id = fields.Many2one('maintenance.equipment.category', related='equipment_id.category_id', string='Category', store=True, readonly=True)
equipment_id = fields.Many2one('maintenance.equipment', string='Equipment', index=True)
technician_user_id = fields.Many2one('res.users', string='Owner', track_visibility='onchange', oldname='user_id')
stage_id = fields.Many2one('maintenance.stage', string='Stage', track_visibility='onchange', default=_default_stage)
stage_id = fields.Many2one('maintenance.stage', string='Stage', track_visibility='onchange',
group_expand='_read_group_stage_ids', default=_default_stage)
priority = fields.Selection([('0', 'Very Low'), ('1', 'Low'), ('2', 'Normal'), ('3', 'High')], string='Priority')
color = fields.Integer('Color Index')
close_date = fields.Date('Close Date')
@@ -310,32 +295,13 @@ class MaintenanceRequest(models.Model):
self.write({'close_date': fields.Date.today()})
return res
@api.multi
def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
@api.model
def _read_group_stage_ids(self, stages, domain, order):
""" Read group customization in order to display all the stages in the
kanban view, even if they are empty
"""
stage_obj = self.env['maintenance.stage']
order = stage_obj._order
access_rights_uid = access_rights_uid or self._uid
if read_group_order == 'stage_id desc':
order = '%s desc' % order
stage_ids = stage_obj._search([], order=order, access_rights_uid=access_rights_uid)
result = [stage.name_get()[0] for stage in stage_obj.browse(stage_ids)]
# restore order of the search
result.sort(lambda x, y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
fold = {}
for stage in stage_obj.browse(stage_ids):
fold[stage.id] = stage.fold or False
return result, fold
_group_by_full = {
'stage_id': _read_group_stage_ids
}
stage_ids = stages._search([], order=order, access_rights_uid=SUPERUSER_ID)
return stages.browse(stage_ids)
class MaintenanceTeam(models.Model):
+1
View File
@@ -34,6 +34,7 @@ professional emails and reuse templates in a few clicks.
'views/email_template.xml',
'security/ir.model.access.csv',
'views/editor_field_html.xml',
'views/themes_templates.xml',
'views/snippets_themes.xml',
'views/snippets_themes_options.xml',
],
@@ -1,83 +0,0 @@
@media screen and (max-width: 320px) {
.mobile-col {
width: 600px;
}
}
/* ======================== TYPO ====================== */
.display-coupon, .display-1, .display-2, .display-3, p, th, td, a, .table-styles {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight:300;
text-decoration: none !important;
}
.display-coupon {
font-size:60px;
}
.display-1 {
font-size: 30px;
}
.display-2 {
font-size: 25px;
}
.display-3 {
font-size: 18px;
}
p, th, td {
text-align:left;
font-size:14px;
}
a, a:hover {
color: inherit;
}
.text-center {
text-align: center;
}
/* ======================== MISC ====================== */
.horizontal-padding {
padding-left: 20px;
padding-right: 20px;
}
.vertical-padding {
padding-top: 20px;
padding-bottom: 20px;
}
.no-margin {
margin: 0;
}
.table-styles {
border-collapse:separate;
}
.snippet-general {
width:600px;
margin:0 auto;
color:#464646;
}
.newsletter-btn {
-webkit-user-select: none;
padding: 6px 12px;
font-size: 14px;
color: #ffffff;
border: none;
text-decoration: none;
display: inline-block;
font-weight: 400;
font-family: 'Helvetica';
text-align: center;
cursor: pointer;
background-color: #34c9a4;
}
/* ======================== SNIPPETS ====================== */
.separator {
height: 1px;
background-color: #e3e3e3;
}
.banner {
width:600px;
margin:0 auto;
padding:0;
}
@@ -1,77 +0,0 @@
/*Airmail Template*/
.o_airmail_theme_header, .o_airmail_theme_footer {
background-color: #d05d68;
}
.o_airmail_theme {
background-color: #ededed;
}
.o_airmail_theme_container {
background-color: white;
box-shadow: none;
}
/*Colors*/
.o_airmail_theme .bg-alpha {
background-color: #fff;
}
.o_airmail_theme .bg-alpha p, .o_airmail_theme .bg-alpha .display-1, .o_airmail_theme .bg-alpha .display-2, .o_airmail_theme .bg-alpha .display-3 {
color: #000;
}
.o_airmail_theme .bg-beta {
background-color: #6077a8;
}
.o_airmail_theme .bg-beta p, .o_airmail_theme .bg-beta .display-1, .o_airmail_theme .bg-beta .display-2, .o_airmail_theme .bg-beta .display-3 {
color: #fff;
}
.o_airmail_theme .bg-beta .link-color {
color: #dab4a8;
}
.o_airmail_theme .bg-gamma {
background-color: #a17e92;
}
.o_airmail_theme .bg-gamma .link-color {
color: #dab4a8;
}
.o_airmail_theme .bg-gamma p, .o_airmail_theme .bg-gamma .display-1, .o_airmail_theme .bg-gamma .display-2, .o_airmail_theme .bg-gamma .display-3 {
color: #fff;
}
.o_airmail_theme .bg-delta {
background-color: #dab4a8;
}
.o_airmail_theme .bg-delta p, .o_airmail_theme .bg-delta .display-1, .o_airmail_theme .bg-delta .display-2, .o_airmail_theme .bg-delta .display-3 {
color: #000;
}
.o_airmail_theme .bg-epsilon {
background-color: #d05d68;
}
.o_airmail_theme .bg-epsilon p, .o_airmail_theme .bg-epsilon .display-1, .o_airmail_theme .bg-epsilon .display-2, .o_airmail_theme .bg-epsilon .display-3 {
color: #fff;
}
.o_airmail_theme .bg-epsilon .link-color {
color: #fff;
}
/*Link color*/
.o_airmail_theme .link-color {
color: #d05d68;
}
/*BTN styles*/
.o_airmail_theme .newsletter-btn {
color: #d05d68;
border: 1px solid #d05d68;
border-radius: 4px;
background-color: transparent;
}
.o_airmail_theme .bg-gamma .newsletter-btn {
color: #fff;
border: 1px solid #fff;
}
.o_airmail_theme .bg-epsilon .newsletter-btn {
color: #fff;
border: 1px solid #fff;
}
@@ -1,75 +0,0 @@
/* ======================== COLORS ====================== */
.o_lemon_theme {
background-color: #fff;
}
.o_lemon_theme_header {
background-color: #fe4e1e;
}
.o_lemon_theme_container {
background-color: #f4ea00;
}
.o_lemon_theme p {
color: #000;
}
.o_lemon_theme .bg-alpha {
background-color: #fff;
}
.o_lemon_theme .bg-alpha .display-1, .o_lemon_theme .bg-alpha p, .o_lemon_theme .bg-alpha .display-2, .o_lemon_theme .bg-alpha .display-3{
color: #000;
}
.o_lemon_theme .bg-beta {
background-color: #f4ea00;
}
.o_lemon_theme .bg-beta p, .o_lemon_theme .bg-beta .display-1, .o_lemon_theme .bg-beta .display-2, .o_lemon_theme .bg-beta .display-3 {
color: #000;
}
.o_lemon_theme .bg-gamma {
background-color: #d6d5b6;
}
.o_lemon_theme .bg-gamma p, .o_lemon_theme .bg-gamma .display-1, .o_lemon_theme .bg-gamma .display-2, .o_lemon_theme .bg-gamma .display-3 {
color: #000;
}
.o_lemon_theme .bg-gamma .link-color {
color: #fe4e1e;
}
.o_lemon_theme .bg-delta {
background-color: #000;
}
.o_lemon_theme .bg-delta p, .o_lemon_theme .bg-delta .display-1, .o_lemon_theme .bg-delta .display-2, .o_lemon_theme .bg-delta .display-3 {
color: #fff;
}
.o_lemon_theme .bg-delta .link-color {
color: #fe4e1e;
}
.o_lemon_theme .bg-epsilon {
background-color: #fe4e1e;
}
.o_lemon_theme .bg-epsilon p, .o_lemon_theme .bg-epsilon .display-1, .o_lemon_theme .bg-epsilon .display-2, .o_lemon_theme .bg-epsilon .display-3 {
color: #fff;
}
.o_lemon_theme .bg-epsilon .link-color {
color: #f4ea00;
}
.o_lemon_theme .link-color {
color: #fe4e1e;
}
/*BTN styles*/
.o_lemon_theme .newsletter-btn {
color: #fff;
background-color: #fe4e1e;
font-size: 12px;
}
/*Snippet styles*/
.o_lemon_theme .separator {
background-color: #fff;
}
.o_lemon_theme .snippet-general {
margin:0 auto;
}
@@ -1,75 +0,0 @@
/* ======================== COLORS ====================== */
.o_tech_theme {
background-color: #fff;
}
.o_tech_theme_header {
background-color: #e3e3e3;
}
.o_tech_theme p {
color: #494949;
}
.o_tech_theme .bg-alpha {
background-color: #fff;
}
.o_tech_theme .bg-alpha .display-1, .o_tech_theme .bg-alpha p, .o_tech_theme .bg-alpha .display-2, .o_tech_theme .bg-alpha .display-3{
color: #000;
}
.o_tech_theme .bg-beta {
background-color: #dadada;
}
.o_tech_theme .bg-beta p, .o_tech_theme .bg-beta .display-1, .o_tech_theme .bg-beta .display-2, .o_tech_theme .bg-beta .display-3 {
color: #000;
}
.o_tech_theme .bg-beta .link-color {
color: #de5745;
}
.o_tech_theme .bg-gamma {
background-color: #de5745;
}
.o_tech_theme .bg-gamma p, .o_tech_theme .bg-gamma .display-1, .o_tech_theme .bg-gamma .display-2, .o_tech_theme .bg-gamma .display-3 {
color: #fff;
}
.o_tech_theme .bg-gamma .link-color {
color: #ccda3f;
}
.o_tech_theme .bg-delta {
background-color: #4a9fba;
}
.o_tech_theme .bg-delta p, .o_tech_theme .bg-delta .display-1, .o_tech_theme .bg-delta .display-2, .o_tech_theme .bg-delta .display-3 {
color: #fff;
}
.o_tech_theme .bg-delta .link-color {
color: #ccda3f;
}
.o_tech_theme .bg-epsilon {
background-color: #ccda3f;
}
.o_tech_theme .bg-epsilon p, .o_tech_theme .bg-epsilon .display-1, .o_tech_theme .bg-epsilon .display-2, .o_tech_theme .bg-epsilon .display-3 {
color: #000;
}
.o_tech_theme .bg-epsilon .link-color {
color: #de5745;
}
.o_tech_theme .link-color {
color: #ccda3f;
}
/*BTN styles*/
.o_tech_theme .newsletter-btn {
color: #fff;
background-color: #ccda3f;
font-size: 12px;
}
.o_tech_theme .bg-epsilon .newsletter-btn {
background-color: #de5745;
}
/*Snippet styles*/
.o_tech_theme .snippet-general {
margin:0 auto;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Some files were not shown because too many files have changed in this diff Show More