[MERGE] forward port branch saas-12.3 up to 409679866b
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 12.0 | :white_check_mark: |
|
||||
| 11.0 | :white_check_mark: |
|
||||
| 10.0 | :white_check_mark: |
|
||||
| <=9.0 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please share privately the details of your security vulnerability by contacting our Security Team:
|
||||
[Contact Info](https://www.odoo.com/security-report)
|
||||
|
||||
Make sure to include as much information as possible, with the detailed steps to reproduce the problem,
|
||||
the versions that are affected, the expected results and actual results, and any other information that
|
||||
might help us react faster and more efficiently.
|
||||
|
||||
We tend to prefer _text-based descriptions_ accompanied with a proof-of-concept script/exploit, rather
|
||||
than screenshots and videos.
|
||||
|
||||
Our [Responsible Disclosure](https://www.odoo.com/security-report) page gives an overview of the
|
||||
process, including:
|
||||
|
||||
- Our Incident Response Procedure (what will happen after you report an issue)
|
||||
- Our Rules (what you can and cannot do while researching security issues)
|
||||
- Guidelines with **DO REPORT** and **DO NOT REPORT** issues
|
||||
(what kind of issues will be accepted/rejected)
|
||||
|
||||
|
||||
## Important note
|
||||
|
||||
We receive a majority of security reports that have little to no impact on the security of Odoo or
|
||||
the Odoo Cloud, and we ultimately have to reject them. To avoid a disappointing experience when
|
||||
contacting us, please try to put together a proof-of-concept attack and take a critical look at
|
||||
what's really at risk.
|
||||
If the proposed attack scenario turns out unrealistic, your report will probably be rejected.
|
||||
Also be sure to review our list of [non-qualifying issues](https://www.odoo.com/security-report#what).
|
||||
@@ -1067,18 +1067,20 @@ class AccountTax(models.Model):
|
||||
|
||||
@api.model
|
||||
def default_get(self, vals):
|
||||
rslt = super(AccountTax, self).default_get(vals)
|
||||
# company_id is added so that we are sure to fetch a default value from it to use in repartition lines, below
|
||||
rslt = super(AccountTax, self).default_get(vals + ['company_id'])
|
||||
|
||||
company_id = rslt.get('company_id')
|
||||
if 'refund_repartition_line_ids' in vals:
|
||||
rslt['refund_repartition_line_ids'] = [
|
||||
(0, 0, { 'repartition_type': 'base', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': rslt.get('company_id')}),
|
||||
(0, 0, { 'repartition_type': 'tax', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': rslt.get('company_id')}),
|
||||
(0, 0, { 'repartition_type': 'base', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': company_id}),
|
||||
(0, 0, { 'repartition_type': 'tax', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': company_id}),
|
||||
]
|
||||
|
||||
if 'invoice_repartition_line_ids' in vals:
|
||||
rslt['invoice_repartition_line_ids'] = [
|
||||
(0, 0, { 'repartition_type': 'base', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': rslt.get('company_id')}),
|
||||
(0, 0, { 'repartition_type': 'tax', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': rslt.get('company_id')}),
|
||||
(0, 0, { 'repartition_type': 'base', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': company_id}),
|
||||
(0, 0, { 'repartition_type': 'tax', 'factor_percent': 100.0, 'tag_ids': [], 'company_id': company_id}),
|
||||
]
|
||||
|
||||
return rslt
|
||||
@@ -1174,7 +1176,8 @@ class AccountTax(models.Model):
|
||||
str(invoice_tax_val['account_id']) + '-' + \
|
||||
str(invoice_tax_val['account_analytic_id']) + '-' + \
|
||||
str(invoice_tax_val.get('analytic_tag_ids', [])) + '-' + \
|
||||
str(invoice_tax_val.get('tax_ids') or [])
|
||||
str(invoice_tax_val.get('tax_ids') or []) + '-' + \
|
||||
str(invoice_tax_val.get('tag_ids') or [])
|
||||
|
||||
def _compute_amount(self, base_amount, price_unit, quantity=1.0, product=None, partner=None):
|
||||
""" Returns the amount of a single tax. base_amount is the actual amount on which the tax is applied, which is
|
||||
@@ -1235,6 +1238,10 @@ class AccountTax(models.Model):
|
||||
all_taxes += tax
|
||||
return all_taxes
|
||||
|
||||
def get_tax_tags(self, is_refund, repartition_type):
|
||||
rep_lines = self.mapped(is_refund and 'refund_repartition_line_ids' or 'invoice_repartition_line_ids')
|
||||
return rep_lines.filtered(lambda x: x.repartition_type == repartition_type).mapped('tag_ids')
|
||||
|
||||
@api.multi
|
||||
def compute_all(self, price_unit, currency=None, quantity=1.0, product=None, partner=None, is_refund=False):
|
||||
""" Returns all information required to apply taxes (in self + their children in case of a tax group).
|
||||
@@ -1392,12 +1399,23 @@ class AccountTax(models.Model):
|
||||
if tax.price_include and not total_included_checkpoints.get(i):
|
||||
cumulated_tax_included_amount += tax_amount
|
||||
|
||||
# If the tax affects the base of subsequent taxes, its tax move lines must
|
||||
# receive the base tags and tag_ids of these taxes, so that the tax report computes
|
||||
# the right total
|
||||
subsequent_taxes = self.env['account.tax']
|
||||
subsequent_tags = self.env['account.account.tag']
|
||||
if tax.include_base_amount:
|
||||
subsequent_taxes = taxes[i+1:]
|
||||
subsequent_tags = subsequent_taxes.get_tax_tags(is_refund, 'base')
|
||||
|
||||
# Compute the tax lines
|
||||
tax_repartition_lines = is_refund and tax.refund_repartition_line_ids or tax.invoice_repartition_line_ids
|
||||
repartition_lines_to_treat = len(tax_repartition_lines)
|
||||
total_amount = 0
|
||||
for repartition_line in tax_repartition_lines.filtered(lambda x: x.repartition_type == 'tax'):
|
||||
# In case some rounding error occurs, we compensate for it on the last line
|
||||
line_amount = round(sign * tax_amount * repartition_line.factor if repartition_lines_to_treat != 1 else tax_amount - total_amount, prec)
|
||||
|
||||
taxes_vals.append({
|
||||
'id': tax.id,
|
||||
'name': partner and tax.with_context(lang=partner.lang).name or tax.name,
|
||||
@@ -1409,7 +1427,8 @@ class AccountTax(models.Model):
|
||||
'price_include': tax.price_include,
|
||||
'tax_exigibility': tax.tax_exigibility,
|
||||
'tax_repartition_line_id': repartition_line.id,
|
||||
'tag_ids': [(6, False, repartition_line.tag_ids.ids)],
|
||||
'tag_ids': [(6, False, (repartition_line.tag_ids + subsequent_tags).ids)],
|
||||
'tax_ids': [(6, False, subsequent_taxes.ids)]
|
||||
})
|
||||
|
||||
total_amount += line_amount
|
||||
|
||||
@@ -446,7 +446,6 @@ class AccountBankStatementLine(models.Model):
|
||||
""" Prepare the dict of values to balance the move.
|
||||
|
||||
:param recordset move: the account.move to link the move line
|
||||
:param dict move: a dict of vals of a account.move which will be created later
|
||||
:param float amount: the amount of transaction that wasn't already reconciled
|
||||
"""
|
||||
company_currency = self.journal_id.company_id.currency_id
|
||||
@@ -454,23 +453,19 @@ class AccountBankStatementLine(models.Model):
|
||||
st_line_currency = self.currency_id or statement_currency
|
||||
amount_currency = False
|
||||
st_line_currency_rate = self.currency_id and (self.amount_currency / self.amount) or False
|
||||
if isinstance(move, dict):
|
||||
amount_sum = sum(x[2].get('amount_currency', 0) for x in move['line_ids'])
|
||||
else:
|
||||
amount_sum = sum(x.amount_currency for x in move.line_ids)
|
||||
# We have several use case here to compare the currency and amount currency of counterpart line to balance the move:
|
||||
if st_line_currency != company_currency and st_line_currency == statement_currency:
|
||||
# company in currency A, statement in currency B and transaction in currency B
|
||||
# counterpart line must have currency B and correct amount is inverse of already existing lines
|
||||
amount_currency = -amount_sum
|
||||
amount_currency = -sum([x.amount_currency for x in move.line_ids])
|
||||
elif st_line_currency != company_currency and statement_currency == company_currency:
|
||||
# company in currency A, statement in currency A and transaction in currency B
|
||||
# counterpart line must have currency B and correct amount is inverse of already existing lines
|
||||
amount_currency = -amount_sum
|
||||
amount_currency = -sum([x.amount_currency for x in move.line_ids])
|
||||
elif st_line_currency != company_currency and st_line_currency != statement_currency:
|
||||
# company in currency A, statement in currency B and transaction in currency C
|
||||
# counterpart line must have currency B and use rate between B and C to compute correct amount
|
||||
amount_currency = -amount_sum/st_line_currency_rate
|
||||
amount_currency = -sum([x.amount_currency for x in move.line_ids])/st_line_currency_rate
|
||||
elif st_line_currency == company_currency and statement_currency != company_currency:
|
||||
# company in currency A, statement in currency B and transaction in currency A
|
||||
# counterpart line must have currency B and amount is computed using the rate between A and B
|
||||
@@ -479,8 +474,9 @@ class AccountBankStatementLine(models.Model):
|
||||
# last case is company in currency A, statement in currency A and transaction in currency A
|
||||
# and in this case counterpart line does not need any second currency nor amount_currency
|
||||
|
||||
aml_dict = {
|
||||
return {
|
||||
'name': self.name,
|
||||
'move_id': move.id,
|
||||
'partner_id': self.partner_id and self.partner_id.id or False,
|
||||
'account_id': amount >= 0 \
|
||||
and self.statement_id.journal_id.default_credit_account_id.id \
|
||||
@@ -491,71 +487,22 @@ class AccountBankStatementLine(models.Model):
|
||||
'currency_id': statement_currency != company_currency and statement_currency.id or (st_line_currency != company_currency and st_line_currency.id or False),
|
||||
'amount_currency': amount_currency,
|
||||
}
|
||||
if isinstance(move, self.env['account.move'].__class__):
|
||||
aml_dict['move_id'] = move.id
|
||||
return aml_dict
|
||||
|
||||
@api.multi
|
||||
def fast_counterpart_creation(self):
|
||||
"""This function is called when confirming a bank statement and will allow to automatically process lines without
|
||||
going in the bank reconciliation widget. By setting an account_id on bank statement lines, it will create a journal
|
||||
entry using that account to counterpart the bank account
|
||||
"""
|
||||
payment_list = []
|
||||
move_list = []
|
||||
account_type_receivable = self.env.ref('account.data_account_type_receivable')
|
||||
already_done_stmt_line_ids = [a['statement_line_id'][0] for a in self.env['account.move.line'].read_group([('statement_line_id', 'in', self.ids)], ['statement_line_id'], ['statement_line_id'])]
|
||||
managed_st_line = []
|
||||
for st_line in self:
|
||||
# Technical functionality to automatically reconcile by creating a new move line
|
||||
if st_line.account_id and not st_line.id in already_done_stmt_line_ids:
|
||||
managed_st_line.append(st_line.id)
|
||||
# Create payment vals
|
||||
total = st_line.amount
|
||||
payment_methods = (total > 0) and st_line.journal_id.inbound_payment_method_ids or st_line.journal_id.outbound_payment_method_ids
|
||||
currency = st_line.journal_id.currency_id or st_line.company_id.currency_id
|
||||
partner_type = 'customer' if st_line.account_id.user_type_id == account_type_receivable else 'supplier'
|
||||
payment_list.append({
|
||||
'payment_method_id': payment_methods and payment_methods[0].id or False,
|
||||
'payment_type': total > 0 and 'inbound' or 'outbound',
|
||||
'partner_id': st_line.partner_id.id,
|
||||
'partner_type': partner_type,
|
||||
'journal_id': st_line.statement_id.journal_id.id,
|
||||
'payment_date': st_line.date,
|
||||
'state': 'reconciled',
|
||||
'currency_id': currency.id,
|
||||
'amount': abs(total),
|
||||
'communication': st_line._get_communication(payment_methods[0] if payment_methods else False),
|
||||
'name': st_line.statement_id.name or _("Bank Statement %s") % st_line.date,
|
||||
})
|
||||
|
||||
# Create move and move line vals
|
||||
move_vals = st_line._prepare_reconciliation_move(st_line.statement_id.name)
|
||||
aml_dict = {
|
||||
if st_line.account_id and not st_line.journal_entry_ids.ids:
|
||||
vals = {
|
||||
'name': st_line.name,
|
||||
'debit': st_line.amount < 0 and -st_line.amount or 0.0,
|
||||
'credit': st_line.amount > 0 and st_line.amount or 0.0,
|
||||
'account_id': st_line.account_id.id,
|
||||
'partner_id': st_line.partner_id.id,
|
||||
'statement_line_id': st_line.id,
|
||||
}
|
||||
st_line._prepare_move_line_for_currency(aml_dict, st_line.date or fields.Date.context_today())
|
||||
move_vals['line_ids'] = [(0, 0, aml_dict)]
|
||||
balance_line = self._prepare_reconciliation_move_line(move_vals, st_line.amount)
|
||||
move_vals['line_ids'].append((0, 0, balance_line))
|
||||
move_list.append(move_vals)
|
||||
|
||||
# Creates
|
||||
payment_ids = self.env['account.payment'].create(payment_list)
|
||||
for payment_id, move_vals in zip(payment_ids, move_list):
|
||||
for line in move_vals['line_ids']:
|
||||
line[2]['payment_id'] = payment_id.id
|
||||
move_ids = self.env['account.move'].create(move_list)
|
||||
move_ids.post()
|
||||
|
||||
for move, st_line, payment in zip(move_ids, self.browse(managed_st_line), payment_ids):
|
||||
st_line.write({'move_name': move.name})
|
||||
payment.write({'payment_reference': move.name})
|
||||
st_line.process_reconciliation(new_aml_dicts=[vals])
|
||||
|
||||
def _get_communication(self, payment_method_id):
|
||||
return self.name or ''
|
||||
@@ -683,6 +630,8 @@ class AccountBankStatementLine(models.Model):
|
||||
# Create move line(s). Either matching an existing journal entry (eg. invoice), in which
|
||||
# case we reconcile the existing and the new move lines together, or being a write-off.
|
||||
if counterpart_aml_dicts or new_aml_dicts:
|
||||
st_line_currency = self.currency_id or statement_currency
|
||||
st_line_currency_rate = self.currency_id and (self.amount_currency / self.amount) or False
|
||||
|
||||
# Create the move
|
||||
self.sequence = self.statement_id.line_ids.ids.index(self.id) + 1
|
||||
@@ -705,12 +654,32 @@ class AccountBankStatementLine(models.Model):
|
||||
|
||||
# Complete dicts to create both counterpart move lines and write-offs
|
||||
to_create = (counterpart_aml_dicts + new_aml_dicts)
|
||||
company = self.company_id
|
||||
date = self.date or fields.Date.today()
|
||||
for aml_dict in to_create:
|
||||
aml_dict['move_id'] = move.id
|
||||
aml_dict['partner_id'] = self.partner_id.id
|
||||
aml_dict['statement_line_id'] = self.id
|
||||
self._prepare_move_line_for_currency(aml_dict, date)
|
||||
if st_line_currency.id != company_currency.id:
|
||||
aml_dict['amount_currency'] = aml_dict['debit'] - aml_dict['credit']
|
||||
aml_dict['currency_id'] = st_line_currency.id
|
||||
if self.currency_id and statement_currency.id == company_currency.id and st_line_currency_rate:
|
||||
# Statement is in company currency but the transaction is in foreign currency
|
||||
aml_dict['debit'] = company_currency.round(aml_dict['debit'] / st_line_currency_rate)
|
||||
aml_dict['credit'] = company_currency.round(aml_dict['credit'] / st_line_currency_rate)
|
||||
elif self.currency_id and st_line_currency_rate:
|
||||
# Statement is in foreign currency and the transaction is in another one
|
||||
aml_dict['debit'] = statement_currency._convert(aml_dict['debit'] / st_line_currency_rate, company_currency, company, date)
|
||||
aml_dict['credit'] = statement_currency._convert(aml_dict['credit'] / st_line_currency_rate, company_currency, company, date)
|
||||
else:
|
||||
# Statement is in foreign currency and no extra currency is given for the transaction
|
||||
aml_dict['debit'] = st_line_currency._convert(aml_dict['debit'], company_currency, company, date)
|
||||
aml_dict['credit'] = st_line_currency._convert(aml_dict['credit'], company_currency, company, date)
|
||||
elif statement_currency.id != company_currency.id:
|
||||
# Statement is in foreign currency but the transaction is in company currency
|
||||
prorata_factor = (aml_dict['debit'] - aml_dict['credit']) / self.amount_currency
|
||||
aml_dict['amount_currency'] = prorata_factor * self.amount
|
||||
aml_dict['currency_id'] = statement_currency.id
|
||||
|
||||
# Create write-offs
|
||||
for aml_dict in new_aml_dicts:
|
||||
@@ -760,36 +729,6 @@ class AccountBankStatementLine(models.Model):
|
||||
counterpart_moves.assert_balanced()
|
||||
return counterpart_moves
|
||||
|
||||
@api.multi
|
||||
def _prepare_move_line_for_currency(self, aml_dict, date):
|
||||
self.ensure_one()
|
||||
company_currency = self.journal_id.company_id.currency_id
|
||||
statement_currency = self.journal_id.currency_id or company_currency
|
||||
st_line_currency = self.currency_id or statement_currency
|
||||
st_line_currency_rate = self.currency_id and (self.amount_currency / self.amount) or False
|
||||
company = self.company_id
|
||||
|
||||
if st_line_currency.id != company_currency.id:
|
||||
aml_dict['amount_currency'] = aml_dict['debit'] - aml_dict['credit']
|
||||
aml_dict['currency_id'] = st_line_currency.id
|
||||
if self.currency_id and statement_currency.id == company_currency.id and st_line_currency_rate:
|
||||
# Statement is in company currency but the transaction is in foreign currency
|
||||
aml_dict['debit'] = company_currency.round(aml_dict['debit'] / st_line_currency_rate)
|
||||
aml_dict['credit'] = company_currency.round(aml_dict['credit'] / st_line_currency_rate)
|
||||
elif self.currency_id and st_line_currency_rate:
|
||||
# Statement is in foreign currency and the transaction is in another one
|
||||
aml_dict['debit'] = statement_currency._convert(aml_dict['debit'] / st_line_currency_rate, company_currency, company, date)
|
||||
aml_dict['credit'] = statement_currency._convert(aml_dict['credit'] / st_line_currency_rate, company_currency, company, date)
|
||||
else:
|
||||
# Statement is in foreign currency and no extra currency is given for the transaction
|
||||
aml_dict['debit'] = st_line_currency._convert(aml_dict['debit'], company_currency, company, date)
|
||||
aml_dict['credit'] = st_line_currency._convert(aml_dict['credit'], company_currency, company, date)
|
||||
elif statement_currency.id != company_currency.id:
|
||||
# Statement is in foreign currency but the transaction is in company currency
|
||||
prorata_factor = (aml_dict['debit'] - aml_dict['credit']) / self.amount_currency
|
||||
aml_dict['amount_currency'] = prorata_factor * self.amount
|
||||
aml_dict['currency_id'] = statement_currency.id
|
||||
|
||||
def _check_invoice_state(self, invoice):
|
||||
if invoice.state == 'in_payment' and all([payment.state == 'reconciled' for payment in invoice.mapped('payment_move_line_ids.payment_id')]):
|
||||
invoice.write({'state': 'paid'})
|
||||
|
||||
@@ -879,7 +879,7 @@ class AccountInvoice(models.Model):
|
||||
domain = {}
|
||||
company_id = self.company_id.id
|
||||
p = self.partner_id if not company_id else self.partner_id.with_context(force_company=company_id)
|
||||
type = self.type
|
||||
type = self.type or self.env.context.get('type', 'out_invoice')
|
||||
if p:
|
||||
rec_account = p.property_account_receivable_id
|
||||
pay_account = p.property_account_payable_id
|
||||
@@ -1081,7 +1081,7 @@ class AccountInvoice(models.Model):
|
||||
else:
|
||||
return self.env.ref('account.invoice_form').id
|
||||
|
||||
def _prepare_tax_line_vals(self, line, tax, tax_ids):
|
||||
def _prepare_tax_line_vals(self, line, tax):
|
||||
''' Prepare values to create an account.invoice.tax line.
|
||||
:param line: An account.invoice.line record.
|
||||
:param tax: Tax values outputted by compute_all() in account.tax.
|
||||
@@ -1099,8 +1099,9 @@ class AccountInvoice(models.Model):
|
||||
'account_analytic_id': tax['analytic'] and line.account_analytic_id.id or False,
|
||||
'account_id': tax['account_id'] or line.account_id.id,
|
||||
'analytic_tag_ids': tax['analytic'] and line.analytic_tag_ids.ids or False,
|
||||
'tax_ids': tax_ids and [(6, None, tax_ids)] or False,
|
||||
'tax_repartition_line_id': tax.get('tax_repartition_line_id'), # For base amount, we let this field empty
|
||||
'tag_ids': tax['tag_ids'],
|
||||
'tax_ids': tax['tax_ids'],
|
||||
}
|
||||
|
||||
# If the taxes generate moves on the same financial account as the invoice line,
|
||||
@@ -1130,7 +1131,6 @@ class AccountInvoice(models.Model):
|
||||
price_unit = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
|
||||
taxes = line.invoice_line_tax_ids._origin.compute_all(price_unit, self.currency_id, line.quantity, line.product_id, self.partner_id, is_refund=self.type in ('in_refund', 'out_refund'))['taxes']
|
||||
|
||||
affecting_base_tax_ids = []
|
||||
for tax_vals in taxes:
|
||||
# Retrieve the tax record (not in tax_vals when dealing with group of taxes).
|
||||
if tax_map.get(tax_vals['id']):
|
||||
@@ -1138,7 +1138,7 @@ class AccountInvoice(models.Model):
|
||||
else:
|
||||
tax = tax_map[tax_vals['id']] = self.env['account.tax'].browse(tax_vals['id'])
|
||||
|
||||
val = self._prepare_tax_line_vals(line, tax_vals, affecting_base_tax_ids)
|
||||
val = self._prepare_tax_line_vals(line, tax_vals)
|
||||
key = tax.get_grouping_key(val)
|
||||
|
||||
if key not in tax_grouped:
|
||||
@@ -1148,11 +1148,6 @@ class AccountInvoice(models.Model):
|
||||
for field in default_tax_group_fields:
|
||||
tax_grouped[key][field] += round_curr(val.get(field)) or 0
|
||||
|
||||
if tax.amount_type == "group":
|
||||
affecting_base_tax_ids += tax.children_tax_ids.filtered(lambda t: is_tax_affecting_base_amount(t)).ids
|
||||
elif is_tax_affecting_base_amount(tax):
|
||||
affecting_base_tax_ids.append(tax.id)
|
||||
|
||||
return tax_grouped
|
||||
|
||||
@api.multi
|
||||
@@ -1268,7 +1263,6 @@ class AccountInvoice(models.Model):
|
||||
|
||||
def tax_line_move_line_get(self):
|
||||
self.ensure_one()
|
||||
|
||||
res = []
|
||||
# loop the invoice.tax.line in reversal sequence
|
||||
for tax_line in sorted(self.tax_line_ids, key=lambda x: -x.sequence):
|
||||
@@ -1288,7 +1282,8 @@ class AccountInvoice(models.Model):
|
||||
'invoice_id': self.id,
|
||||
'tax_ids': tax_line.tax_ids and [(6, 0, tax_line.tax_ids.ids)] or False, # We don't pass an empty recordset here, as it would reset the tax_exibility of the line, due to the condition in account.move.line's create
|
||||
'tax_repartition_line_id': tax_line.tax_repartition_line_id.id,
|
||||
'tag_ids': [(6, 0, tax_line.tax_repartition_line_id.tag_ids.ids)],
|
||||
'tag_ids': [(6, 0, tax_line.tag_ids.ids)],
|
||||
'tax_base_amount': tax_line.base,
|
||||
})
|
||||
return res
|
||||
|
||||
@@ -2146,8 +2141,8 @@ class AccountInvoiceTax(models.Model):
|
||||
company_id = fields.Many2one('res.company', string='Company', related='account_id.company_id', store=True, readonly=True)
|
||||
currency_id = fields.Many2one('res.currency', related='invoice_id.currency_id', store=True, readonly=True)
|
||||
base = fields.Monetary(string='Base')
|
||||
tax_ids = fields.Many2many('account.tax', string='Affecting Base Taxes',
|
||||
help='Taxes affecting the tax base amount applied before this one.')
|
||||
tax_ids = fields.Many2many('account.tax', string='Affecting Base Taxes', help='Taxes whose base amount needs has to be affected by this tax line.')
|
||||
tag_ids = fields.Many2many(string="Tags", comodel_name='account.account.tag', help="The taxes that will be applied on the move line generated for this tax entry")
|
||||
|
||||
@api.depends('amount', 'amount_rounding')
|
||||
def _compute_amount_total(self):
|
||||
|
||||
@@ -3,6 +3,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from babel.dates import format_datetime, format_date
|
||||
from odoo import models, api, _, fields
|
||||
from odoo.osv import expression
|
||||
from odoo.release import version
|
||||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF, safe_eval
|
||||
from odoo.tools.misc import formatLang, format_date as odoo_format_date
|
||||
@@ -427,10 +428,16 @@ class account_journal(models.Model):
|
||||
action_name = 'action_view_bank_statement_tree'
|
||||
elif self.type == 'sale':
|
||||
action_name = 'action_invoice_tree1'
|
||||
self = self.with_context(use_domain=[('journal_id', '=', self.id)])
|
||||
use_domain = expression.AND(
|
||||
[self.env.context.get('use_domain', []), [('journal_id', '=', self.id)]]
|
||||
)
|
||||
self = self.with_context(use_domain=use_domain)
|
||||
elif self.type == 'purchase':
|
||||
action_name = 'action_vendor_bill_template'
|
||||
self = self.with_context(use_domain=[('journal_id', '=', self.id)])
|
||||
use_domain = expression.AND(
|
||||
[self.env.context.get('use_domain', []), [('journal_id', '=', self.id)]]
|
||||
)
|
||||
self = self.with_context(use_domain=use_domain)
|
||||
else:
|
||||
action_name = 'action_move_journal_line'
|
||||
|
||||
|
||||
@@ -87,14 +87,12 @@ class AccountMove(models.Model):
|
||||
if line.account_id.user_type_id.type in ('receivable', 'payable'):
|
||||
amount = abs(line.debit - line.credit)
|
||||
total_amount += amount
|
||||
for partial_line in (line.matched_debit_ids + line.matched_credit_ids):
|
||||
total_reconciled += partial_line.amount
|
||||
precision_currency = move.currency_id or move.company_id.currency_id
|
||||
if float_is_zero(total_amount, precision_rounding=precision_currency.rounding):
|
||||
move.matched_percentage = 1.0
|
||||
else:
|
||||
for line in move.line_ids:
|
||||
if line.account_id.user_type_id.type in ('receivable', 'payable'):
|
||||
for partial_line in (line.matched_debit_ids + line.matched_credit_ids):
|
||||
total_reconciled += partial_line.amount
|
||||
move.matched_percentage = total_reconciled / total_amount
|
||||
|
||||
@api.multi
|
||||
@@ -290,6 +288,7 @@ class AccountMove(models.Model):
|
||||
'company_currency_id': self.company_id.currency_id.id,
|
||||
'tax_repartition_line_id': line_vals['tax_repartition_line_id'],
|
||||
'tag_ids': line_vals['tag_ids'],
|
||||
'tax_base_amount': line_vals['base'],
|
||||
}
|
||||
# N.B. currency_id/amount_currency are not set because if we have two lines with the same tax
|
||||
# and different currencies, we have no idea which currency set on this line.
|
||||
@@ -580,7 +579,7 @@ class AccountMoveLine(models.Model):
|
||||
else:
|
||||
date = partial_line.credit_move_id.date if partial_line.debit_move_id == line else partial_line.debit_move_id.date
|
||||
rate = line.currency_id.with_context(date=date).rate
|
||||
amount_residual_currency += sign_partial_line * line.currency_id.round(partial_line.amount * rate)
|
||||
amount_residual_currency += sign_partial_line * partial_line.amount * rate
|
||||
|
||||
#computing the `reconciled` field.
|
||||
reconciled = False
|
||||
@@ -609,15 +608,6 @@ class AccountMoveLine(models.Model):
|
||||
currency = self.env['account.journal'].browse(context['default_journal_id']).currency_id
|
||||
return currency
|
||||
|
||||
@api.depends('move_id.line_ids', 'move_id.line_ids.tax_line_id', 'move_id.line_ids.debit', 'move_id.line_ids.credit')
|
||||
def _compute_tax_base_amount(self):
|
||||
for move_line in self:
|
||||
if move_line.tax_line_id:
|
||||
base_lines = move_line.move_id.line_ids.filtered(lambda line: move_line.tax_line_id in line.tax_ids)
|
||||
move_line.tax_base_amount = abs(sum(base_lines.mapped('balance')))
|
||||
else:
|
||||
move_line.tax_base_amount = 0
|
||||
|
||||
@api.depends('move_id')
|
||||
def _compute_parent_state(self):
|
||||
for record in self.filtered('move_id'):
|
||||
@@ -641,7 +631,7 @@ class AccountMoveLine(models.Model):
|
||||
help="The residual amount on a journal item expressed in the company currency.")
|
||||
amount_residual_currency = fields.Monetary(compute='_amount_residual', string='Residual Amount in Currency', store=True,
|
||||
help="The residual amount on a journal item expressed in its currency (possibly not the company currency).")
|
||||
tax_base_amount = fields.Monetary(string="Base Amount", compute='_compute_tax_base_amount', currency_field='company_currency_id', store=True)
|
||||
tax_base_amount = fields.Monetary(string="Base Amount", currency_field='company_currency_id')
|
||||
account_id = fields.Many2one('account.account', string='Account', required=True, index=True,
|
||||
ondelete="cascade", domain=[('deprecated', '=', False)], default=lambda self: self._context.get('account_id', False))
|
||||
move_id = fields.Many2one('account.move', string='Journal Entry', ondelete="cascade",
|
||||
@@ -699,21 +689,23 @@ class AccountMoveLine(models.Model):
|
||||
if {'debit', 'credit', 'partner_id', 'account_id'}.isdisjoint(fields):
|
||||
return rec
|
||||
#compute the default credit/debit of the next line in case of a manual entry
|
||||
AccountMove = self.env['account.move']
|
||||
move = self.env['account.move'].new({'line_ids': self._context['line_ids']})
|
||||
balance = 0
|
||||
for line in AccountMove.resolve_2many_commands(
|
||||
'line_ids', self._context['line_ids'], fields=['credit', 'debit']):
|
||||
balance += line.get('debit', 0) - line.get('credit', 0)
|
||||
if len(self._context['line_ids']) > 1:
|
||||
lines = AccountMove.resolve_2many_commands('line_ids', self._context['line_ids'][-2:], fields=['partner_id', 'account_id'])
|
||||
if lines[0].get('partner_id', False) == lines[1].get('partner_id', False):
|
||||
rec.update({'partner_id': lines[0].get('partner_id', False)})
|
||||
if lines[0].get('account_id', False) == lines[1].get('account_id', False):
|
||||
rec.update({'account_id': lines[0].get('account_id', False)})
|
||||
for line in move.line_ids:
|
||||
balance += line.debit - line.credit
|
||||
if balance < 0:
|
||||
rec.update({'debit': -balance})
|
||||
if balance > 0:
|
||||
rec.update({'credit': balance})
|
||||
|
||||
# Set the partner/account to the same value as the two last lines if they are equal
|
||||
if len(move.line_ids) > 1:
|
||||
last_lines = move.line_ids[-2:]
|
||||
if last_lines[0].account_id == last_lines[1].account_id:
|
||||
rec['account_id'] = last_lines[0].account_id.id
|
||||
if last_lines[0].partner_id == last_lines[1].partner_id:
|
||||
rec['partner_id'] = last_lines[0].partner_id.id
|
||||
|
||||
return rec
|
||||
|
||||
@api.multi
|
||||
@@ -821,21 +813,22 @@ class AccountMoveLine(models.Model):
|
||||
In case of full reconciliation, all moves belonging to the reconciliation will belong to the same account_full_reconcile object.
|
||||
"""
|
||||
# Get first all aml involved
|
||||
todo = self.env['account.partial.reconcile'].search_read(['|', ('debit_move_id', 'in', self.ids), ('credit_move_id', 'in', self.ids)], ['debit_move_id', 'credit_move_id'])
|
||||
amls = set(self.ids)
|
||||
part_recs = self.env['account.partial.reconcile'].search(['|', ('debit_move_id', 'in', self.ids), ('credit_move_id', 'in', self.ids)])
|
||||
amls = self
|
||||
todo = set(part_recs)
|
||||
seen = set()
|
||||
while todo:
|
||||
aml_ids = [rec['debit_move_id'][0] for rec in todo if rec['debit_move_id']] + [rec['credit_move_id'][0] for rec in todo if rec['credit_move_id']]
|
||||
amls |= set(aml_ids)
|
||||
seen |= set([rec['id'] for rec in todo])
|
||||
todo = self.env['account.partial.reconcile'].search_read(['&', '|', ('credit_move_id', 'in', aml_ids), ('debit_move_id', 'in', aml_ids), '!', ('id', 'in', list(seen))], ['debit_move_id', 'credit_move_id'])
|
||||
|
||||
partial_rec_ids = list(seen)
|
||||
partial_rec = todo.pop()
|
||||
seen.add(partial_rec)
|
||||
for aml in [partial_rec.debit_move_id, partial_rec.credit_move_id]:
|
||||
if aml not in amls:
|
||||
amls += aml
|
||||
for x in aml.matched_debit_ids | aml.matched_credit_ids:
|
||||
if x not in seen:
|
||||
todo.add(x)
|
||||
partial_rec_ids = [x.id for x in seen]
|
||||
if not amls:
|
||||
return
|
||||
else:
|
||||
amls = self.browse(list(amls))
|
||||
|
||||
# If we have multiple currency, we can only base ourselve on debit-credit to see if it is fully reconciled
|
||||
currency = set([a.currency_id for a in amls if a.currency_id.id != False])
|
||||
multiple_currency = False
|
||||
@@ -998,7 +991,10 @@ class AccountMoveLine(models.Model):
|
||||
debit_moves = debit_moves.sorted(key=lambda a: (a.date_maturity or a.date, a.currency_id))
|
||||
credit_moves = credit_moves.sorted(key=lambda a: (a.date_maturity or a.date, a.currency_id))
|
||||
# Compute on which field reconciliation should be based upon:
|
||||
field = self[0].account_id.currency_id and 'amount_residual_currency' or 'amount_residual'
|
||||
if self[0].account_id.currency_id and self[0].account_id.currency_id != self[0].account_id.company_id.currency_id:
|
||||
field = 'amount_residual_currency'
|
||||
else:
|
||||
field = 'amount_residual'
|
||||
#if all lines share the same currency, use amount_residual_currency to avoid currency rounding error
|
||||
if self[0].currency_id and all([x.amount_currency and x.currency_id == self[0].currency_id for x in self]):
|
||||
field = 'amount_residual_currency'
|
||||
@@ -1712,6 +1708,7 @@ class AccountPartialReconcile(models.Model):
|
||||
'move_id': newly_created_move.id,
|
||||
'partner_id': line.partner_id.id,
|
||||
'tax_repartition_line_id': line.tax_repartition_line_id.id,
|
||||
'tax_base_amount': line.tax_base_amount,
|
||||
'tag_ids': [(6, 0, line.tag_ids.ids)],
|
||||
})
|
||||
if line.account_id.reconcile:
|
||||
@@ -1737,6 +1734,7 @@ class AccountPartialReconcile(models.Model):
|
||||
'amount_currency': self.amount_currency and line.currency_id.round(line.amount_currency * amount / line.balance) or 0.0,
|
||||
'partner_id': line.partner_id.id,
|
||||
'tax_repartition_line_id': line.tax_repartition_line_id.id,
|
||||
'tax_base_amount': line.tax_base_amount,
|
||||
'tag_ids': [(6, 0, line.tag_ids.ids)],
|
||||
})
|
||||
self.env['account.move.line'].with_context(check_move_validity=False).create({
|
||||
|
||||
@@ -894,7 +894,9 @@ class AccountTaxTemplate(models.Model):
|
||||
'account_dict': dictionary containing a to-do list with all the accounts to assign on new taxes
|
||||
}
|
||||
"""
|
||||
ChartTemplate = self.env['account.chart.template']
|
||||
# default_company_id is needed in context to allow creation of default
|
||||
# repartition lines on taxes
|
||||
ChartTemplate = self.env['account.chart.template'].with_context(default_company_id=company.id)
|
||||
todo_dict = {'account.tax': {}, 'account.tax.repartition.line': {}}
|
||||
tax_template_to_tax = {}
|
||||
|
||||
@@ -926,7 +928,7 @@ class AccountTaxTemplate(models.Model):
|
||||
# We also have to delay the assignation of accounts to repartition lines
|
||||
all_tax_rep_lines = tax.invoice_repartition_line_ids + tax.refund_repartition_line_ids
|
||||
all_template_rep_lines = template.invoice_repartition_line_ids + template.refund_repartition_line_ids
|
||||
for i in range(0, len(all_tax_rep_lines)):
|
||||
for i in range(0, len(all_template_rep_lines)):
|
||||
# We assume template and tax repartition lines are in the same order
|
||||
template_account = all_template_rep_lines[i].account_id
|
||||
if template_account:
|
||||
|
||||
@@ -81,4 +81,5 @@ class ProductProduct(models.Model):
|
||||
'analytic_tag_ids': line.get('analytic_tag_ids', False),
|
||||
'tax_repartition_line_id': line.get('tax_repartition_line_id'),
|
||||
'tag_ids': line.get('tag_ids'),
|
||||
'tax_base_amount': line.get('tax_base_amount'),
|
||||
}
|
||||
|
||||
@@ -83,28 +83,43 @@ class AccountReconciliation(models.AbstractModel):
|
||||
|
||||
@api.model
|
||||
def _get_bank_statement_line_partners(self, st_lines):
|
||||
params = []
|
||||
|
||||
# Add the res.partner.ban's IR rules. In case partners are not shared between companies,
|
||||
# identical bank accounts may exist in a company we don't have access to.
|
||||
ir_rules_query = self.env['res.partner.bank']._where_calc([])
|
||||
self.env['res.partner.bank']._apply_ir_rules(ir_rules_query, 'read')
|
||||
from_clause, where_clause, where_clause_params = ir_rules_query.get_sql()
|
||||
if where_clause:
|
||||
where_bank = ('AND %s' % where_clause).replace('res_partner_bank', 'bank')
|
||||
params += where_clause_params
|
||||
else:
|
||||
where_bank = ''
|
||||
|
||||
# Add the res.partner's IR rules. In case partners are not shared between companies,
|
||||
# identical partners may exist in a company we don't have access to.
|
||||
ir_rules_query = self.env['res.partner']._where_calc([])
|
||||
self.env['res.partner']._apply_ir_rules(ir_rules_query, 'read')
|
||||
from_clause, where_clause, where_clause_params = ir_rules_query.get_sql()
|
||||
if where_clause:
|
||||
where_partner = ('AND %s' % where_clause).replace('res_partner', 'p3')
|
||||
params += where_clause_params
|
||||
else:
|
||||
where_partner = ''
|
||||
|
||||
query = '''
|
||||
SELECT
|
||||
st_line.id AS id,
|
||||
COALESCE(p1.id,p2.id,p3.id) AS partner_id
|
||||
FROM account_bank_statement_line st_line
|
||||
LEFT JOIN res_partner_bank bank ON bank.id = st_line.bank_account_id OR bank.acc_number = st_line.account_number
|
||||
LEFT JOIN res_partner p1 ON st_line.partner_id=p1.id
|
||||
LEFT JOIN res_partner p2 ON bank.partner_id=p2.id
|
||||
LEFT JOIN res_partner p3 ON p3.name ILIKE st_line.partner_name
|
||||
WHERE st_line.id IN %s
|
||||
'''
|
||||
params = [tuple(st_lines.ids)]
|
||||
query += 'LEFT JOIN res_partner_bank bank ON bank.id = st_line.bank_account_id OR bank.acc_number = st_line.account_number %s\n' % (where_bank)
|
||||
query += 'LEFT JOIN res_partner p1 ON st_line.partner_id=p1.id \n'
|
||||
query += 'LEFT JOIN res_partner p2 ON bank.partner_id=p2.id \n'
|
||||
query += 'LEFT JOIN res_partner p3 ON p3.name ILIKE st_line.partner_name %s\n' % (where_partner)
|
||||
query += 'WHERE st_line.id IN %s'
|
||||
|
||||
# Add the res.partner's IR rules to the WHERE clause. In case partners are not shared
|
||||
# between companies, identical partners may exist in a company we don't have access to.
|
||||
ir_rules_query = self.env['res.partner']._where_calc([])
|
||||
self.env['res.partner']._apply_ir_rules(ir_rules_query, 'read')
|
||||
from_clause, where_clause, where_clause_params = ir_rules_query.get_sql()
|
||||
where_p3 = (" AND %s" % where_clause).replace('res_partner', 'p3') if where_clause else ''
|
||||
if where_p3:
|
||||
query += where_p3
|
||||
params += where_clause_params
|
||||
params += [tuple(st_lines.ids)]
|
||||
|
||||
self._cr.execute(query, params)
|
||||
|
||||
|
||||
@@ -112,13 +112,13 @@ class AccountInvoiceReport(models.Model):
|
||||
1 AS nbr,
|
||||
ai.id AS invoice_id, ai.type, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id AS account_line_id,
|
||||
ai.partner_bank_id,
|
||||
SUM ((invoice_type.sign_qty * ail.quantity) / u.factor * u2.factor) AS product_qty,
|
||||
SUM ((invoice_type.sign_qty * ail.quantity) / COALESCE(u.factor,1) * COALESCE(u2.factor,1)) AS product_qty,
|
||||
SUM(ail.price_subtotal_signed * invoice_type.sign) AS price_total,
|
||||
(ai.amount_total * invoice_type.sign) / (SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id) *
|
||||
ai.amount_total_signed / (SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id) *
|
||||
count(*) * invoice_type.sign AS amount_total,
|
||||
SUM(ABS(ail.price_subtotal_signed)) / CASE
|
||||
WHEN SUM(ail.quantity / u.factor * u2.factor) <> 0::numeric
|
||||
THEN SUM(ail.quantity / u.factor * u2.factor)
|
||||
WHEN SUM(ail.quantity / COALESCE(u.factor,1) * COALESCE(u2.factor,1)) <> 0::numeric
|
||||
THEN SUM(ail.quantity / COALESCE(u.factor,1) * COALESCE(u2.factor,1))
|
||||
ELSE 1::numeric
|
||||
END AS price_average,
|
||||
ai.residual_company_signed / (SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id) *
|
||||
|
||||
@@ -346,9 +346,12 @@ var StatementAction = AbstractAction.extend({
|
||||
'context': self.model.getContext(),
|
||||
});
|
||||
_.each(result.handles, function (handle) {
|
||||
self._getWidget(handle).destroy();
|
||||
var index = _.findIndex(self.widgets, function (widget) {return widget.handle===handle;});
|
||||
self.widgets.splice(index, 1);
|
||||
var widget = self._getWidget(handle);
|
||||
if (widget) {
|
||||
widget.destroy();
|
||||
var index = _.findIndex(self.widgets, function (widget) {return widget.handle===handle;});
|
||||
self.widgets.splice(index, 1);
|
||||
}
|
||||
});
|
||||
// Get number of widget and if less than constant and if there are more to laod, load until constant
|
||||
if (self.widgets.length < self.model.defaultDisplayQty
|
||||
|
||||
@@ -623,13 +623,13 @@ var StatementModel = BasicModel.extend({
|
||||
prop = this._formatQuickCreate(line);
|
||||
line.reconciliation_proposition.push(prop);
|
||||
}
|
||||
if (!line.reconciliation_proposition.slice(0,-1).every(function(prop) {return prop.to_check == values.to_check;})) {
|
||||
if ('to_check' in values && !line.reconciliation_proposition.slice(0,-1).every(function(prop) {return prop.to_check == values.to_check;})) {
|
||||
new CrashManager().show_warning({data: {
|
||||
exception_type: _t("Incorrect Operation"),
|
||||
message: _t("You cannot mix items with and without the 'To Check' checkbox ticked.")
|
||||
}});
|
||||
// FIXME: model should not be tied to the DOM !
|
||||
$('.create_to_check input').click();
|
||||
$('.create_to_check input:visible').prop('checked', !values.to_check).change();
|
||||
return Promise.resolve();
|
||||
}
|
||||
_.each(values, function (value, fieldName) {
|
||||
|
||||
@@ -938,10 +938,12 @@ var ManualLineRenderer = LineRenderer.extend({
|
||||
* @override
|
||||
*/
|
||||
_renderCreate: function (state) {
|
||||
var parentPromise = this._super(state);
|
||||
this.$('.create .create_journal_id').show();
|
||||
this.$('.create .create_date').removeClass('d-none');
|
||||
this.$('.create .create_journal_id .o_input').addClass('o_required_modifier');
|
||||
var self = this;
|
||||
var parentPromise = this._super(state).then(function() {
|
||||
self.$('.create .create_journal_id').show();
|
||||
self.$('.create .create_date').removeClass('d-none');
|
||||
self.$('.create .create_journal_id .o_input').addClass('o_required_modifier');
|
||||
});
|
||||
return parentPromise;
|
||||
},
|
||||
|
||||
|
||||
@@ -306,30 +306,30 @@ class TestAccountCustomerInvoice(AccountTestUsers):
|
||||
dashboard_data = journal.get_journal_dashboard_datas()
|
||||
|
||||
self.assertEquals(dashboard_data['number_draft'], 2)
|
||||
self.assertEquals(dashboard_data['sum_draft'], '$ 68.42')
|
||||
self.assertIn('68.42', dashboard_data['sum_draft'])
|
||||
|
||||
self.assertEquals(dashboard_data['number_waiting'], 0)
|
||||
self.assertEquals(dashboard_data['sum_waiting'], '$ 0.00')
|
||||
self.assertIn('0.00', dashboard_data['sum_waiting'])
|
||||
|
||||
# Check Both
|
||||
invoice.action_invoice_open()
|
||||
|
||||
dashboard_data = journal.get_journal_dashboard_datas()
|
||||
self.assertEquals(dashboard_data['number_draft'], 1)
|
||||
self.assertEquals(dashboard_data['sum_draft'], '$ -13.30')
|
||||
self.assertIn('-13.30', dashboard_data['sum_draft'])
|
||||
|
||||
self.assertEquals(dashboard_data['number_waiting'], 1)
|
||||
self.assertEquals(dashboard_data['sum_waiting'], '$ 81.72')
|
||||
self.assertIn('81.72', dashboard_data['sum_waiting'])
|
||||
|
||||
# Check waiting payment
|
||||
refund.action_invoice_open()
|
||||
|
||||
dashboard_data = journal.get_journal_dashboard_datas()
|
||||
self.assertEquals(dashboard_data['number_draft'], 0)
|
||||
self.assertEquals(dashboard_data['sum_draft'], '$ 0.00')
|
||||
self.assertIn('0.00', dashboard_data['sum_draft'])
|
||||
|
||||
self.assertEquals(dashboard_data['number_waiting'], 2)
|
||||
self.assertEquals(dashboard_data['sum_waiting'], '$ 68.42')
|
||||
self.assertIn('68.42', dashboard_data['sum_waiting'])
|
||||
|
||||
# Check partial
|
||||
receivable_account = refund.move_id.line_ids.mapped('account_id').filtered(lambda a: a.internal_type == 'receivable')
|
||||
@@ -353,12 +353,12 @@ class TestAccountCustomerInvoice(AccountTestUsers):
|
||||
|
||||
dashboard_data = journal.get_journal_dashboard_datas()
|
||||
self.assertEquals(dashboard_data['number_draft'], 0)
|
||||
self.assertEquals(dashboard_data['sum_draft'], '$ 0.00')
|
||||
self.assertIn('0.00', dashboard_data['sum_draft'])
|
||||
|
||||
self.assertEquals(dashboard_data['number_waiting'], 2)
|
||||
self.assertEquals(dashboard_data['sum_waiting'], '$ 78.42')
|
||||
self.assertIn('78.42', dashboard_data['sum_waiting'])
|
||||
|
||||
with patch('odoo.fields.Date.today', patched_today):
|
||||
dashboard_data = journal.get_journal_dashboard_datas()
|
||||
self.assertEquals(dashboard_data['number_late'], 2)
|
||||
self.assertEquals(dashboard_data['sum_late'], '$ 78.42')
|
||||
self.assertIn('78.42', dashboard_data['sum_late'])
|
||||
|
||||
@@ -100,8 +100,8 @@ class TestInvoiceTaxes(AccountingTestCase):
|
||||
Expected:
|
||||
Tax | Taxes | Base | Amount
|
||||
--------------------------------------------
|
||||
21% incl | / | 100 | 21
|
||||
12% | 21% incl | 121 | 14.52
|
||||
21% incl | 12% | 100 | 21
|
||||
12% | / | 121 | 14.52
|
||||
12% | / | 100 | 12
|
||||
'''
|
||||
invoice = self._create_invoice([
|
||||
@@ -110,9 +110,8 @@ class TestInvoiceTaxes(AccountingTestCase):
|
||||
])
|
||||
invoice.action_invoice_open()
|
||||
self.assertRecordValues(invoice.tax_line_ids.sorted(lambda x: x.amount), [
|
||||
{'name': self.percent_tax_2.name, 'base': 100, 'amount': 12, 'tax_ids': []},
|
||||
{'name': self.percent_tax_2.name, 'base': 121, 'amount': 14.52, 'tax_ids': [self.percent_tax_1_incl.id]},
|
||||
{'name': self.percent_tax_1_incl.name, 'base': 100, 'amount': 21, 'tax_ids': []},
|
||||
{'name': self.percent_tax_1_incl.name, 'base': 100, 'amount': 21, 'tax_ids': [self.percent_tax_2.id]},
|
||||
{'name': self.percent_tax_2.name, 'base': 221, 'amount': 26.52, 'tax_ids': []},
|
||||
])
|
||||
|
||||
def test_group_of_taxes(self):
|
||||
@@ -135,9 +134,8 @@ class TestInvoiceTaxes(AccountingTestCase):
|
||||
])
|
||||
invoice.action_invoice_open()
|
||||
self.assertRecordValues(invoice.tax_line_ids.sorted(lambda x: x.amount), [
|
||||
{'name': self.percent_tax_2.name, 'base': 100, 'amount': 12, 'tax_ids': []},
|
||||
{'name': self.percent_tax_2.name, 'base': 121, 'amount': 14.52, 'tax_ids': [self.percent_tax_1_incl.id]},
|
||||
{'name': self.percent_tax_1_incl.name, 'base': 100, 'amount': 21, 'tax_ids': []},
|
||||
{'name': self.percent_tax_1_incl.name, 'base': 100, 'amount': 21, 'tax_ids': [self.percent_tax_2.id]},
|
||||
{'name': self.percent_tax_2.name, 'base': 221, 'amount': 26.52, 'tax_ids': []},
|
||||
])
|
||||
|
||||
def _create_tax_tag(self, tag_name):
|
||||
|
||||
@@ -91,6 +91,11 @@ class TestReconciliation(AccountingTestCase):
|
||||
'code': 'CABA',
|
||||
'type': 'general',
|
||||
})
|
||||
self.general_journal = self.env['account.journal'].create({
|
||||
'name': 'general',
|
||||
'code': 'GENE',
|
||||
'type': 'general',
|
||||
})
|
||||
|
||||
# Tax Cash Basis
|
||||
self.tax_cash_basis = self.env['account.tax'].create({
|
||||
@@ -1304,6 +1309,7 @@ class TestReconciliationExec(TestReconciliation):
|
||||
'debit': 16.67,
|
||||
'move_id': purchase_move.id,
|
||||
'tax_repartition_line_id': self.tax_cash_basis.invoice_repartition_line_ids.filtered(lambda x: x.repartition_type == 'tax').id,
|
||||
'tax_base_amount': 83.33,
|
||||
})
|
||||
purchase_move.post()
|
||||
|
||||
@@ -1422,6 +1428,7 @@ class TestReconciliationExec(TestReconciliation):
|
||||
'debit': 5,
|
||||
'move_id': purchase_move.id,
|
||||
'tax_repartition_line_id': tax_cash_basis10percent.invoice_repartition_line_ids.filtered(lambda x: x.repartition_type == 'tax').id,
|
||||
'tax_base_amount': 50,
|
||||
})
|
||||
AccountMoveLine.create({
|
||||
'name': 'expenseTaxed 20%',
|
||||
@@ -1436,6 +1443,7 @@ class TestReconciliationExec(TestReconciliation):
|
||||
'debit': 16.67,
|
||||
'move_id': purchase_move.id,
|
||||
'tax_repartition_line_id': self.tax_cash_basis.invoice_repartition_line_ids.filtered(lambda x: x.repartition_type == 'tax').id,
|
||||
'tax_base_amount': 83.33,
|
||||
})
|
||||
purchase_move.post()
|
||||
|
||||
@@ -1646,6 +1654,7 @@ class TestReconciliationExec(TestReconciliation):
|
||||
'currency_id': self.currency_usd_id,
|
||||
'amount_currency': 848.16,
|
||||
'tax_repartition_line_id': self.tax_cash_basis.invoice_repartition_line_ids.filtered(lambda x: x.repartition_type == 'tax').id,
|
||||
'tax_base_amount': 106841.65,
|
||||
})
|
||||
purchase_payable_line0 = aml_obj.create({
|
||||
'name': 'Payable',
|
||||
@@ -1816,6 +1825,7 @@ class TestReconciliationExec(TestReconciliation):
|
||||
'debit': 17094.66,
|
||||
'move_id': purchase_move.id,
|
||||
'tax_repartition_line_id': self.tax_cash_basis.invoice_repartition_line_ids.filtered(lambda x: x.repartition_type == 'tax').id,
|
||||
'tax_base_amount': 106841.65,
|
||||
'currency_id': self.currency_usd_id,
|
||||
'amount_currency': 848.16,
|
||||
})
|
||||
@@ -1975,6 +1985,7 @@ class TestReconciliationExec(TestReconciliation):
|
||||
'debit': 5,
|
||||
'move_id': purchase_move.id,
|
||||
'tax_repartition_line_id': tax_cash_basis10percent.invoice_repartition_line_ids.filtered(lambda x: x.repartition_type == 'tax').id,
|
||||
'tax_base_amount': 50,
|
||||
})
|
||||
AccountMoveLine.create({
|
||||
'name': 'expenseTaxed 20%',
|
||||
@@ -1989,6 +2000,7 @@ class TestReconciliationExec(TestReconciliation):
|
||||
'debit': 20,
|
||||
'move_id': purchase_move.id,
|
||||
'tax_repartition_line_id': self.tax_cash_basis.invoice_repartition_line_ids.filtered(lambda x: x.repartition_type == 'tax').id,
|
||||
'tax_base_amount': 100,
|
||||
})
|
||||
purchase_move.post()
|
||||
|
||||
@@ -2056,6 +2068,71 @@ class TestReconciliationExec(TestReconciliation):
|
||||
self.assertTrue(pay_receivable_line1.reconciled)
|
||||
self.assertEqual(pay_receivable_line1.matched_debit_ids, move_caba1.tax_cash_basis_rec_id)
|
||||
|
||||
def test_reconciliation_with_currency(self):
|
||||
#reconciliation on an account having a foreign currency being
|
||||
#the same as the company one
|
||||
account_rcv = self.account_rcv
|
||||
account_rcv.currency_id = self.currency_euro_id
|
||||
aml_obj = self.env['account.move.line'].with_context(
|
||||
check_move_validity=False)
|
||||
general_move1 = self.env['account.move'].create({
|
||||
'name': 'general1',
|
||||
'journal_id': self.general_journal.id,
|
||||
})
|
||||
aml_obj.create({
|
||||
'name': 'debit1',
|
||||
'account_id': account_rcv.id,
|
||||
'debit': 11,
|
||||
'move_id': general_move1.id,
|
||||
})
|
||||
aml_obj.create({
|
||||
'name': 'credit1',
|
||||
'account_id': self.account_rsa.id,
|
||||
'credit': 11,
|
||||
'move_id': general_move1.id,
|
||||
})
|
||||
general_move1.post()
|
||||
general_move2 = self.env['account.move'].create({
|
||||
'name': 'general2',
|
||||
'journal_id': self.general_journal.id,
|
||||
})
|
||||
aml_obj.create({
|
||||
'name': 'credit2',
|
||||
'account_id': account_rcv.id,
|
||||
'credit': 10,
|
||||
'move_id': general_move2.id,
|
||||
})
|
||||
aml_obj.create({
|
||||
'name': 'debit2',
|
||||
'account_id': self.account_rsa.id,
|
||||
'debit': 10,
|
||||
'move_id': general_move2.id,
|
||||
})
|
||||
general_move2.post()
|
||||
general_move3 = self.env['account.move'].create({
|
||||
'name': 'general3',
|
||||
'journal_id': self.general_journal.id,
|
||||
})
|
||||
aml_obj.create({
|
||||
'name': 'credit3',
|
||||
'account_id': account_rcv.id,
|
||||
'credit': 1,
|
||||
'move_id': general_move3.id,
|
||||
})
|
||||
aml_obj.create({
|
||||
'name': 'debit3',
|
||||
'account_id': self.account_rsa.id,
|
||||
'debit': 1,
|
||||
'move_id': general_move3.id,
|
||||
})
|
||||
general_move3.post()
|
||||
to_reconcile = ((general_move1 + general_move2 + general_move3)
|
||||
.mapped('line_ids')
|
||||
.filtered(lambda l: l.account_id.id == account_rcv.id))
|
||||
to_reconcile.reconcile()
|
||||
for aml in to_reconcile:
|
||||
self.assertEqual(aml.amount_residual, 0.0)
|
||||
|
||||
def test_reconciliation_process_move_lines_with_mixed_currencies(self):
|
||||
# Delete any old rate - to make sure that we use the ones we need.
|
||||
old_rates = self.env['res.currency.rate'].search(
|
||||
|
||||
@@ -384,6 +384,7 @@
|
||||
<field name="amount_total" invisible="1"/>
|
||||
<field name="currency_id" invisible="1" force_save="1"/>
|
||||
<field name="tax_repartition_line_id" invisible="1"/> <!--Needed in order for the onchange computing the taxes to keep the repartition lines-->
|
||||
<field name="tag_ids" invisible="1"/> <!--Needed in order for the onchange computing the taxes to keep the tags-->
|
||||
<field name="base" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -655,6 +656,7 @@
|
||||
<field name="amount_total"/>
|
||||
<field name="currency_id" invisible="1" force_save="1"/>
|
||||
<field name="tax_repartition_line_id" invisible="1"/> <!--Needed in order for the onchange computing the taxes to keep the repartition lines-->
|
||||
<field name="tag_ids" invisible="1"/> <!--Needed in order for the onchange computing the taxes to keep the tags-->
|
||||
<field name="base" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -357,6 +357,7 @@
|
||||
<field name="recompute_tax_line" invisible="1" readonly="1"/>
|
||||
<field name="tax_line_grouping_key" invisible="1" readonly="1"/>
|
||||
<field name="tax_repartition_line_id" invisible="1"/> <!--Not to be removed, we need it so that the call to new() takes it into account when autocompleting the lines of a tax-->
|
||||
<field name="tax_base_amount" invisible="1"/> <!--Not to be removed, we need it so that the call to new() takes it into account when autocompleting the lines of a tax-->
|
||||
<field name="tag_ids" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -99,7 +99,8 @@
|
||||
<filter string="Payment Method" name="paymentmethod" domain="[]" context="{'group_by': 'payment_method_id'}"/>
|
||||
<filter string="State" name="state" domain="[]" context="{'group_by': 'state'}"/>
|
||||
<filter string="Currency" name="currency" domain="[]" context="{'group_by': 'currency_id'}" groups="base.group_multi_currency"/>
|
||||
<filter string="Company" name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
|
||||
<!-- company_id is not stored (cdca5d4751a979f6b694f02d88160843f81a77f5). But we can't break structure-->
|
||||
<filter string="Company" name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company" invisible="1" />
|
||||
<separator/>
|
||||
<filter string="Late Activities" name="activities_overdue"
|
||||
domain="[('activity_ids.date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
|
||||
@@ -37,6 +37,7 @@ class TaxAdjustments(models.TransientModel):
|
||||
'credit': not is_debit and abs(self.amount) or 0,
|
||||
'account_id': is_debit and self.debit_account_id.id or self.credit_account_id.id,
|
||||
'tax_repartition_line_id': repartition_line.id,
|
||||
'tax_base_amount': tax_vals['base'],
|
||||
'tag_ids': [(6, False, repartition_line.tag_ids.ids)],
|
||||
}))
|
||||
|
||||
|
||||
@@ -70,13 +70,27 @@ class AccountInvoiceLine(models.Model):
|
||||
|
||||
@api.onchange('product_id', 'account_id')
|
||||
def _onchange_product_id_account_id(self):
|
||||
rec = self.env['account.analytic.default'].account_get(product_id=self.product_id.id, partner_id=self.invoice_id.commercial_partner_id.id, account_id=self.account_id.id, user_id=self.env.uid, date=self.invoice_id.date_due, company_id=self.invoice_id.company_id.id)
|
||||
rec = self.env['account.analytic.default'].account_get(
|
||||
product_id=self.product_id.id,
|
||||
partner_id=self.invoice_id.commercial_partner_id.id,
|
||||
account_id=self.account_id.id,
|
||||
user_id=self.invoice_id.user_id.id or self.env.uid,
|
||||
date=self.invoice_id.date_due,
|
||||
company_id=self.invoice_id.company_id.id,
|
||||
)
|
||||
self.account_analytic_id = rec.analytic_id.id
|
||||
self.analytic_tag_ids = rec.analytic_tag_ids.ids
|
||||
|
||||
def _set_additional_fields(self):
|
||||
if not self.account_analytic_id or not self.analytic_tag_ids:
|
||||
rec = self.env['account.analytic.default'].account_get(product_id=self.product_id.id, partner_id=self.invoice_id.commercial_partner_id.id, account_id=self.account_id.id, user_id=self.env.uid, date=self.invoice_id.date_due, company_id=self.invoice_id.company_id.id)
|
||||
rec = self.env['account.analytic.default'].account_get(
|
||||
product_id=self.product_id.id,
|
||||
partner_id=self.invoice_id.commercial_partner_id.id,
|
||||
account_id=self.account_id.id,
|
||||
user_id=self.invoice_id.user_id.id or self.env.uid,
|
||||
date=self.invoice_id.date_due,
|
||||
company_id=self.invoice_id.company_id.id,
|
||||
)
|
||||
if rec:
|
||||
if not self.account_analytic_id:
|
||||
self.account_analytic_id = rec.analytic_id.id
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from werkzeug.urls import url_encode
|
||||
|
||||
from odoo import http, _
|
||||
from odoo.addons.portal.controllers.portal import _build_url_w_params
|
||||
from odoo.addons.payment.controllers.portal import PaymentProcessing
|
||||
@@ -17,8 +19,6 @@ class PaymentPortal(http.Controller):
|
||||
|
||||
:return html: form containing all values related to the acquirer to
|
||||
redirect customers to the acquirer website """
|
||||
success_url = kwargs.get('success_url', '/my')
|
||||
|
||||
invoice_sudo = request.env['account.invoice'].sudo().browse(invoice_id)
|
||||
if not invoice_sudo:
|
||||
return False
|
||||
@@ -30,6 +30,10 @@ class PaymentPortal(http.Controller):
|
||||
|
||||
if request.env.user._is_public():
|
||||
save_token = False # we avoid to create a token for the public user
|
||||
|
||||
success_url = kwargs.get(
|
||||
'success_url', "%s?%s" % (invoice_sudo.access_url, url_encode({'access_token': access_token}) if access_token else '')
|
||||
)
|
||||
vals = {
|
||||
'acquirer_id': acquirer_id,
|
||||
'return_url': success_url,
|
||||
@@ -54,7 +58,6 @@ class PaymentPortal(http.Controller):
|
||||
def invoice_pay_token(self, invoice_id, pm_id=None, **kwargs):
|
||||
""" Use a token to perform a s2s transaction """
|
||||
error_url = kwargs.get('error_url', '/my')
|
||||
success_url = kwargs.get('success_url', '/my')
|
||||
access_token = kwargs.get('access_token')
|
||||
params = {}
|
||||
if access_token:
|
||||
@@ -65,6 +68,9 @@ class PaymentPortal(http.Controller):
|
||||
params['error'] = 'pay_invoice_invalid_doc'
|
||||
return request.redirect(_build_url_w_params(error_url, params))
|
||||
|
||||
success_url = kwargs.get(
|
||||
'success_url', "%s?%s" % (invoice_sudo.access_url, url_encode({'access_token': access_token}) if access_token else '')
|
||||
)
|
||||
try:
|
||||
token = request.env['payment.token'].sudo().browse(int(pm_id))
|
||||
except (ValueError, TypeError):
|
||||
|
||||
@@ -37,7 +37,7 @@ class AccountVoucher(models.Model):
|
||||
('purchase', 'Purchase')
|
||||
], string='Type', readonly=True, states={'draft': [('readonly', False)]}, oldname="type")
|
||||
name = fields.Char('Payment Memo',
|
||||
readonly=True, states={'draft': [('readonly', False)]}, default='')
|
||||
readonly=True, states={'draft': [('readonly', False)]}, default='',copy=False)
|
||||
date = fields.Date("Bill Date", readonly=True,
|
||||
index=True, states={'draft': [('readonly', False)]},
|
||||
copy=False, default=fields.Date.context_today)
|
||||
|
||||
@@ -38,3 +38,7 @@ class BusController(Controller):
|
||||
if request.registry.in_test_mode():
|
||||
raise exceptions.UserError(_("bus.Bus not available in test mode"))
|
||||
return self._poll(request.db, channels, last, options)
|
||||
|
||||
@route('/longpolling/im_status', type="json", auth="user")
|
||||
def im_status(self, partner_ids):
|
||||
return request.env['res.partner'].search_read([['id', 'in', partner_ids]], ['id', 'im_status'])
|
||||
|
||||
@@ -245,7 +245,7 @@ class AlarmManager(models.AbstractModel):
|
||||
_name = 'calendar.alarm_manager'
|
||||
_description = 'Event Alarm Manager'
|
||||
|
||||
def get_next_potential_limit_alarm(self, alarm_type, seconds=None, partner_id=None):
|
||||
def _get_next_potential_limit_alarm(self, alarm_type, seconds=None, partner_id=None):
|
||||
result = {}
|
||||
delta_request = """
|
||||
SELECT
|
||||
@@ -325,6 +325,12 @@ class AlarmManager(models.AbstractModel):
|
||||
'rrule': rule
|
||||
}
|
||||
|
||||
# determine accessible events
|
||||
events = self.env['calendar.event'].browse(result)
|
||||
result = {
|
||||
key: result[key]
|
||||
for key in set(events._filter_access_rules('read').ids)
|
||||
}
|
||||
return result
|
||||
|
||||
def do_check_alarm_for_one_date(self, one_date, event, event_maxdelta, in_the_next_X_seconds, alarm_type, after=False, missing=False):
|
||||
@@ -376,7 +382,7 @@ class AlarmManager(models.AbstractModel):
|
||||
|
||||
cron_interval = cron.interval_number * interval_to_second[cron.interval_type]
|
||||
|
||||
all_meetings = self.get_next_potential_limit_alarm('email', seconds=cron_interval)
|
||||
all_meetings = self._get_next_potential_limit_alarm('email', seconds=cron_interval)
|
||||
|
||||
for meeting in self.env['calendar.event'].browse(all_meetings):
|
||||
max_delta = all_meetings[meeting.id]['max_duration']
|
||||
@@ -406,7 +412,7 @@ class AlarmManager(models.AbstractModel):
|
||||
if not partner:
|
||||
return []
|
||||
|
||||
all_meetings = self.get_next_potential_limit_alarm('notification', partner_id=partner.id)
|
||||
all_meetings = self._get_next_potential_limit_alarm('notification', partner_id=partner.id)
|
||||
time_limit = 3600 * 24 # return alarms of the next 24 hours
|
||||
for event_id in all_meetings:
|
||||
max_delta = all_meetings[event_id]['max_duration']
|
||||
|
||||
@@ -52,7 +52,7 @@ class AlarmManager(models.AbstractModel):
|
||||
}
|
||||
|
||||
cron_interval = cron.interval_number * interval_to_second[cron.interval_type]
|
||||
events_data = self.get_next_potential_limit_alarm('sms', seconds=cron_interval)
|
||||
events_data = self._get_next_potential_limit_alarm('sms', seconds=cron_interval)
|
||||
|
||||
for event in self.env['calendar.event'].browse(events_data):
|
||||
max_delta = events_data[event.id]['max_duration']
|
||||
|
||||
@@ -54,7 +54,10 @@ class Lead(models.Model):
|
||||
_primary_email = 'email_from'
|
||||
|
||||
def _default_probability(self):
|
||||
stage_id = self._default_stage_id()
|
||||
if 'default_stage_id' in self._context:
|
||||
stage_id = self._context.get('default_stage_id')
|
||||
else:
|
||||
stage_id = self._default_stage_id()
|
||||
if stage_id:
|
||||
return self.env['crm.stage'].browse(stage_id).probability
|
||||
return 10
|
||||
@@ -305,9 +308,10 @@ class Lead(models.Model):
|
||||
if vals.get('user_id') and 'date_open' not in vals:
|
||||
vals['date_open'] = fields.Datetime.now()
|
||||
|
||||
if context.get('default_partner_id') and not vals.get('email_from'):
|
||||
partner = self.env['res.partner'].browse(context['default_partner_id'])
|
||||
vals['email_from'] = partner.email
|
||||
partner_id = vals.get('partner_id') or context.get('default_partner_id')
|
||||
onchange_values = self._onchange_partner_id_values(partner_id)
|
||||
onchange_values.update(vals) # we don't want to overwrite any existing key
|
||||
vals = onchange_values
|
||||
|
||||
return super(Lead, self.with_context(context)).create(vals)
|
||||
|
||||
@@ -316,7 +320,8 @@ class Lead(models.Model):
|
||||
# stage change: update date_last_stage_update
|
||||
if 'stage_id' in vals:
|
||||
vals['date_last_stage_update'] = fields.Datetime.now()
|
||||
if vals.get('user_id') and 'date_open' not in vals:
|
||||
# Only write the 'date_open' if no salesperson was assigned.
|
||||
if vals.get('user_id') and 'date_open' not in vals and not self.mapped('user_id'):
|
||||
vals['date_open'] = fields.Datetime.now()
|
||||
# stage change with new stage: update probability and date_closed
|
||||
if vals.get('stage_id') and 'probability' not in vals:
|
||||
|
||||
@@ -81,7 +81,7 @@ class SaleOrderLine(models.Model):
|
||||
@api.onchange('event_ticket_id')
|
||||
def _onchange_event_ticket_id(self):
|
||||
company = self.event_id.company_id or self.env.company
|
||||
currency = company.currency_id
|
||||
currency = company.currency_id or self.env.company.currency_id
|
||||
self.price_unit = currency._convert(
|
||||
self.event_ticket_id.price, self.order_id.currency_id, self.order_id.company_id, self.order_id.date_order or fields.Date.today())
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class Users(models.Model):
|
||||
_inherit = 'res.users'
|
||||
@@ -18,26 +21,9 @@ class Users(models.Model):
|
||||
|
||||
@api.depends('karma')
|
||||
def _compute_karma_position(self):
|
||||
where_query = self._where_calc([])
|
||||
self._apply_ir_rules(where_query, 'read')
|
||||
from_clause, where_clause, where_clause_params = where_query.get_sql()
|
||||
|
||||
query = """
|
||||
SELECT sub.id, sub.karma_position
|
||||
FROM (
|
||||
SELECT id, row_number() OVER (ORDER BY res_users.karma DESC) AS karma_position
|
||||
FROM {from_clause}
|
||||
WHERE {where_clause}
|
||||
) sub
|
||||
WHERE sub.id IN %s
|
||||
""".format(from_clause=from_clause, where_clause=where_clause)
|
||||
|
||||
self.env.cr.execute(query, where_clause_params + [tuple(self.ids)])
|
||||
|
||||
position_map = {item['id']: item['karma_position'] for item in self.env.cr.dictfetchall()}
|
||||
|
||||
_logger.warning("The field karma_position from res.users is deprecated. Don't use it anymore.")
|
||||
for user in self:
|
||||
user.karma_position = position_map.get(user.id, 0)
|
||||
user.karma_position = 0
|
||||
|
||||
@api.multi
|
||||
@api.depends('badge_ids')
|
||||
|
||||
@@ -189,12 +189,12 @@ class GoogleService(models.TransientModel):
|
||||
status = error.response.status_code
|
||||
response = ""
|
||||
else:
|
||||
req = json.loads(error.request.body)
|
||||
req = json.loads(error.request.body or 'null')
|
||||
res = error.response.json()
|
||||
_logger.exception("Error while requesting Google Services\nRequest:\n%s\nResponse:\n%s", pformat(req), pformat(res))
|
||||
if error.response.status_code in (400, 401, 410):
|
||||
raise UserError(_("Error while requesting Google Services: %s" % res['error']['message']))
|
||||
raise self.env['res.config.settings'].get_config_warning(_("Something went wrong with your request to google"))
|
||||
raise UserError(_("Error while requesting Google Services: %s") % res['error']['message'])
|
||||
raise self.env['res.config.settings'].get_config_warning(_("Something went wrong with your request to google: %s") % res['error']['message'])
|
||||
return (status, response, ask_time)
|
||||
|
||||
# TODO : remove me, it is only used in google calendar. Make google_calendar use the constants
|
||||
|
||||
@@ -15,7 +15,7 @@ class User(models.Model):
|
||||
job_title = fields.Char(related='employee_id.job_title', readonly=False)
|
||||
work_phone = fields.Char(related='employee_id.work_phone', readonly=False)
|
||||
mobile_phone = fields.Char(related='employee_id.mobile_phone', readonly=False)
|
||||
phone = fields.Char(related='employee_id.phone', readonly=False, related_sudo=False)
|
||||
employee_phone = fields.Char(related='employee_id.phone', readonly=False, related_sudo=False)
|
||||
work_email = fields.Char(related='employee_id.work_email', readonly=False, related_sudo=False)
|
||||
category_ids = fields.Many2many(related='employee_id.category_ids', string="Employee Tags", readonly=False, related_sudo=False)
|
||||
department_id = fields.Many2one(related='employee_id.department_id', readonly=False, related_sudo=False)
|
||||
@@ -99,7 +99,7 @@ class User(models.Model):
|
||||
'parent_id',
|
||||
'passport_id',
|
||||
'permit_no',
|
||||
'phone',
|
||||
'employee_phone',
|
||||
'pin',
|
||||
'place_of_birth',
|
||||
'spouse_birthdate',
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
It should be different from the work address.
|
||||
</div>
|
||||
<field name="km_home_work"/>
|
||||
<field name="phone"/>
|
||||
<field name="employee_phone"/>
|
||||
<field name="employee_bank_account_id"/>
|
||||
</group>
|
||||
<group string="Citizenship">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<record id="hr_employee_view_kanban" model="ir.ui.view">
|
||||
<field name="name">hr.employee</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr_presence.hr_employee_view_kanban"/>
|
||||
<field name="inherit_id" ref="hr_presence.hr_employee_view_kanban_inherit"/>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//span[@name='presence_absent']" position="attributes">
|
||||
|
||||
@@ -60,12 +60,12 @@ class Contract(models.Model):
|
||||
|
||||
@api.constrains('employee_id', 'state', 'date_start', 'date_end')
|
||||
def _check_current_contract(self):
|
||||
""" Two contracts in state [incoming | pending | open | close] cannot overlap """
|
||||
for contract in self.filtered(lambda c: c.state not in ['draft', 'cancel']):
|
||||
""" Two contracts in state [incoming | pending | open] cannot overlap """
|
||||
for contract in self.filtered(lambda c: c.state not in ['draft', 'cancel', 'close']):
|
||||
domain = [
|
||||
('id', '!=', contract.id),
|
||||
('employee_id', '=', contract.employee_id.id),
|
||||
('state', 'in', ['incoming', 'pending', 'open', 'close']),
|
||||
('state', 'in', ['incoming', 'pending', 'open']),
|
||||
]
|
||||
|
||||
if not contract.date_end:
|
||||
|
||||
@@ -151,14 +151,14 @@ class HrExpense(models.Model):
|
||||
|
||||
@api.model
|
||||
def get_empty_list_help(self, help_message):
|
||||
if help_message and "oe_view_nocontent_smiling_face" not in help_message:
|
||||
if help_message and "o_view_nocontent_smiling_face" not in help_message:
|
||||
use_mailgateway = self.env['ir.config_parameter'].sudo().get_param('hr_expense.use_mailgateway')
|
||||
alias_record = use_mailgateway and self.env.ref('hr_expense.mail_alias_expense') or False
|
||||
if alias_record and alias_record.alias_domain and alias_record.alias_name:
|
||||
link = "<a id='o_mail_test' href='mailto:%(email)s?subject=Lunch%%20with%%20customer%%3A%%20%%2412.32'>%(email)s</a>" % {
|
||||
'email': '%s@%s' % (alias_record.alias_name, alias_record.alias_domain)
|
||||
}
|
||||
return '<p class="oe_view_nocontent_smiling_face">%s</p><p class="oe_view_nocontent_alias">%s</p>' % (
|
||||
return '<p class="o_view_nocontent_smiling_face">%s</p><p class="oe_view_nocontent_alias">%s</p>' % (
|
||||
_('Add a new expense,'),
|
||||
_('or send receipts by email to %s.') % (link),)
|
||||
return super(HrExpense, self).get_empty_list_help(help_message)
|
||||
@@ -211,6 +211,25 @@ class HrExpense(models.Model):
|
||||
# Business
|
||||
# ----------------------------------------
|
||||
|
||||
@api.multi
|
||||
def _prepare_move_values(self):
|
||||
"""
|
||||
This function prepares move values related to an expense
|
||||
"""
|
||||
self.ensure_one()
|
||||
journal = self.sheet_id.bank_journal_id if self.payment_mode == 'company_account' else self.sheet_id.journal_id
|
||||
account_date = self.sheet_id.accounting_date or self.date
|
||||
move_values = {
|
||||
'journal_id': journal.id,
|
||||
'company_id': self.env.company.id,
|
||||
'date': account_date,
|
||||
'ref': self.sheet_id.name,
|
||||
# force the name to the default value, to avoid an eventual 'default_name' in the context
|
||||
# to set it to '' which cause no number to be given to the account.move when posted.
|
||||
'name': '/',
|
||||
}
|
||||
return move_values
|
||||
|
||||
@api.multi
|
||||
def _get_account_move_by_sheet(self):
|
||||
""" Return a mapping between the expense sheet of current expense and its account move
|
||||
@@ -219,18 +238,8 @@ class HrExpense(models.Model):
|
||||
move_grouped_by_sheet = {}
|
||||
for expense in self:
|
||||
# create the move that will contain the accounting entries
|
||||
account_date = expense.sheet_id.accounting_date or expense.date
|
||||
if expense.sheet_id.id not in move_grouped_by_sheet:
|
||||
journal = expense.sheet_id.bank_journal_id if expense.payment_mode == 'company_account' else expense.sheet_id.journal_id
|
||||
move = self.env['account.move'].create({
|
||||
'journal_id': journal.id,
|
||||
'company_id': self.env.company.id,
|
||||
'date': account_date,
|
||||
'ref': expense.sheet_id.name,
|
||||
# force the name to the default value, to avoid an eventual 'default_name' in the context
|
||||
# to set it to '' which cause no number to be given to the account.move when posted.
|
||||
'name': '/',
|
||||
})
|
||||
move = self.env['account.move'].create(expense._prepare_move_values())
|
||||
move_grouped_by_sheet[expense.sheet_id.id] = move
|
||||
else:
|
||||
move = move_grouped_by_sheet[expense.sheet_id.id]
|
||||
@@ -325,6 +334,7 @@ class HrExpense(models.Model):
|
||||
'amount_currency': amount_currency if different_currency else 0.0,
|
||||
'account_id': tax['account_id'] or move_line_src['account_id'],
|
||||
'tax_repartition_line_id': tax['tax_repartition_line_id'],
|
||||
'tax_base_amount': tax['base'],
|
||||
'expense_id': expense.id,
|
||||
'partner_id': partner_id,
|
||||
'currency_id': expense.currency_id.id if different_currency else False,
|
||||
|
||||
@@ -153,8 +153,8 @@ class HrEmployeeBase(models.AbstractModel):
|
||||
hr_vals['manager_id'] = values['parent_id']
|
||||
if values.get('department_id') is not None:
|
||||
hr_vals['department_id'] = values['department_id']
|
||||
holidays = self.env['hr.leave'].search(['|', ('state', 'in', ['draft', 'confirm']), ('date_from', '>', today_date), ('employee_id', 'in', self.ids)])
|
||||
holidays = self.env['hr.leave'].sudo().search(['|', ('state', 'in', ['draft', 'confirm']), ('date_from', '>', today_date), ('employee_id', 'in', self.ids)])
|
||||
holidays.write(hr_vals)
|
||||
allocations = self.env['hr.leave.allocation'].search([('state', 'in', ['draft', 'confirm']), ('employee_id', 'in', self.ids)])
|
||||
allocations = self.env['hr.leave.allocation'].sudo().search([('state', 'in', ['draft', 'confirm']), ('employee_id', 'in', self.ids)])
|
||||
allocations.write(hr_vals)
|
||||
return res
|
||||
|
||||
@@ -13,6 +13,7 @@ from odoo import api, fields, models, tools, SUPERUSER_ID
|
||||
from odoo.addons.resource.models.resource import float_to_time, HOURS_PER_DAY
|
||||
from odoo.exceptions import AccessError, UserError, ValidationError
|
||||
from odoo.tools import float_compare
|
||||
from odoo.tools.float_utils import float_round
|
||||
from odoo.tools.translate import _
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
@@ -146,6 +147,8 @@ class HolidaysRequest(models.Model):
|
||||
number_of_hours_display = fields.Float(
|
||||
'Duration in hours', compute='_compute_number_of_hours_display', copy=False, readonly=True,
|
||||
help='Number of hours of the time off request according to your working schedule. Used for interface.')
|
||||
duration_display = fields.Char('Requested (Days/Hours)', compute='_compute_duration_display',
|
||||
help="Field allowing to see the leave request duration in days or hours depending on the leave_type_request_unit") # details
|
||||
# details
|
||||
meeting_id = fields.Many2one('calendar.event', string='Meeting')
|
||||
parent_id = fields.Many2one('hr.leave', string='Parent', copy=False)
|
||||
@@ -355,11 +358,17 @@ class HolidaysRequest(models.Model):
|
||||
self.mode_company_id = False
|
||||
self.department_id = False
|
||||
|
||||
@api.multi
|
||||
def _sync_employee_details(self):
|
||||
for holiday in self:
|
||||
holiday.manager_id = holiday.employee_id.parent_id.id
|
||||
if holiday.employee_id:
|
||||
holiday.department_id = holiday.employee_id.department_id
|
||||
|
||||
@api.onchange('employee_id')
|
||||
def _onchange_employee_id(self):
|
||||
self.manager_id = self.employee_id.parent_id.id
|
||||
if self.employee_id:
|
||||
self.department_id = self.employee_id.department_id
|
||||
self._sync_employee_details()
|
||||
self.holiday_status_id = False
|
||||
|
||||
@api.onchange('date_from', 'date_to', 'employee_id')
|
||||
def _onchange_leave_dates(self):
|
||||
@@ -385,6 +394,16 @@ class HolidaysRequest(models.Model):
|
||||
else:
|
||||
holiday.number_of_hours_display = 0
|
||||
|
||||
@api.multi
|
||||
@api.depends('number_of_hours_display', 'number_of_days_display')
|
||||
def _compute_duration_display(self):
|
||||
for leave in self:
|
||||
leave.duration_display = '%g %s' % (
|
||||
(float_round(leave.number_of_hours_display, precision_digits=2)
|
||||
if leave.leave_type_request_unit == 'hour'
|
||||
else float_round(leave.number_of_days_display, precision_digits=2)),
|
||||
_('hour(s)') if leave.leave_type_request_unit == 'hour' else _('day(s)'))
|
||||
|
||||
@api.multi
|
||||
@api.depends('state', 'employee_id', 'department_id')
|
||||
def _compute_can_reset(self):
|
||||
@@ -413,7 +432,7 @@ class HolidaysRequest(models.Model):
|
||||
def _check_date(self):
|
||||
for holiday in self:
|
||||
domain = [
|
||||
('date_from', '<=', holiday.date_to),
|
||||
('date_from', '<', holiday.date_to),
|
||||
('date_to', '>', holiday.date_from),
|
||||
('employee_id', '=', holiday.employee_id.id),
|
||||
('id', '!=', holiday.id),
|
||||
@@ -456,7 +475,10 @@ class HolidaysRequest(models.Model):
|
||||
res = []
|
||||
for leave in self:
|
||||
if self.env.context.get('short_name'):
|
||||
res.append((leave.id, _("%s : %.2f day(s)") % (leave.name or leave.holiday_status_id.name, leave.number_of_days)))
|
||||
if leave.leave_type_request_unit == 'hour':
|
||||
res.append((leave.id, _("%s : %.2f hour(s)") % (leave.name or leave.holiday_status_id.name, leave.number_of_hours_display)))
|
||||
else:
|
||||
res.append((leave.id, _("%s : %.2f day(s)") % (leave.name or leave.holiday_status_id.name, leave.number_of_days)))
|
||||
else:
|
||||
if leave.holiday_type == 'company':
|
||||
target = leave.mode_company_id.name
|
||||
@@ -466,11 +488,18 @@ class HolidaysRequest(models.Model):
|
||||
target = leave.category_id.name
|
||||
else:
|
||||
target = leave.employee_id.name
|
||||
res.append(
|
||||
(leave.id,
|
||||
_("%s on %s: %.2f day(s)") %
|
||||
(target, leave.holiday_status_id.name, leave.number_of_days))
|
||||
)
|
||||
if leave.leave_type_request_unit == 'hour':
|
||||
res.append(
|
||||
(leave.id,
|
||||
_("%s on %s : %.2f hour(s)") %
|
||||
(target, leave.holiday_status_id.name, leave.number_of_hours_display))
|
||||
)
|
||||
else:
|
||||
res.append(
|
||||
(leave.id,
|
||||
_("%s on %s: %.2f day(s)") %
|
||||
(target, leave.holiday_status_id.name, leave.number_of_days))
|
||||
)
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
@@ -511,7 +540,7 @@ class HolidaysRequest(models.Model):
|
||||
if holiday.validation_type == 'hr':
|
||||
holiday.message_subscribe(partner_ids=(holiday.employee_id.parent_id.user_id.partner_id | holiday.employee_id.leave_manager_id.partner_id).ids)
|
||||
if employee_id:
|
||||
holiday._onchange_employee_id()
|
||||
holiday._sync_employee_details()
|
||||
if 'number_of_days' not in values and ('date_from' in values or 'date_to' in values):
|
||||
holiday._onchange_leave_dates()
|
||||
if leave_type.validation_type == 'no_validation':
|
||||
@@ -550,7 +579,7 @@ class HolidaysRequest(models.Model):
|
||||
for holiday in self:
|
||||
if employee_id:
|
||||
holiday.add_follower(employee_id)
|
||||
holiday._onchange_employee_id()
|
||||
self._sync_employee_details()
|
||||
if 'number_of_days' not in values and ('date_from' in values or 'date_to' in values):
|
||||
holiday._onchange_leave_dates()
|
||||
return result
|
||||
|
||||
@@ -218,7 +218,10 @@ class HolidaysAllocation(models.Model):
|
||||
@api.depends('number_of_days', 'employee_id')
|
||||
def _compute_number_of_hours_display(self):
|
||||
for allocation in self:
|
||||
allocation.number_of_hours_display = allocation.number_of_days * (allocation.employee_id.resource_calendar_id.hours_per_day or HOURS_PER_DAY)
|
||||
if allocation.parent_id and allocation.parent_id.type_request_unit == "hour":
|
||||
allocation.number_of_hours_display = allocation.number_of_days * HOURS_PER_DAY
|
||||
else:
|
||||
allocation.number_of_hours_display = allocation.number_of_days * (allocation.employee_id.resource_calendar_id.hours_per_day or HOURS_PER_DAY)
|
||||
|
||||
@api.multi
|
||||
@api.depends('number_of_hours_display', 'number_of_days_display')
|
||||
|
||||
@@ -158,9 +158,9 @@ class TestLeaveRequests(TestHrHolidaysBase):
|
||||
self.employee_hrmanager.write({'department_id': self.hr_dept.id})
|
||||
self.assertFalse(self.env['hr.leave'].search([('employee_id', 'in', self.hr_dept.member_ids.ids)]))
|
||||
leave_form = Form(self.env['hr.leave'].sudo(self.user_hrmanager), view='hr_holidays.hr_leave_view_form_manager')
|
||||
leave_form.holiday_status_id = self.holidays_type_1
|
||||
leave_form.holiday_type = 'department'
|
||||
leave_form.department_id = self.hr_dept
|
||||
leave_form.holiday_status_id = self.holidays_type_1
|
||||
leave = leave_form.save()
|
||||
leave.action_approve()
|
||||
member_ids = self.hr_dept.member_ids.ids
|
||||
|
||||
@@ -387,7 +387,7 @@
|
||||
<field name="name"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="number_of_days" string="Number of Days" sum="Total time off"/>
|
||||
<field name="duration_display"/>
|
||||
<field name="state"/>
|
||||
<field name="payslip_status" widget="toggle_button" options='{"active": "Reported in last payslips", "inactive": "To Report in Payslip"}' groups="hr_holidays.group_hr_holidays_manager"/>
|
||||
<field name="category_id" invisible="1"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="%(maintenance.hr_equipment_action)d"
|
||||
context="{'search_default_my':1}"
|
||||
context="{'search_default_employee_id': id}"
|
||||
groups="maintenance.group_equipment_manager"
|
||||
class="o_stat_button"
|
||||
icon="fa-cubes"
|
||||
|
||||
@@ -56,7 +56,7 @@ class HrOrgChartController(http.Controller):
|
||||
return {}
|
||||
|
||||
# compute employee data for org chart
|
||||
ancestors, current = request.env['hr.employee.public'], employee
|
||||
ancestors, current = request.env['hr.employee.public'].sudo(), employee.sudo()
|
||||
while current.parent_id and len(ancestors) < self._managers_level+1:
|
||||
ancestors += current.parent_id
|
||||
current = current.parent_id
|
||||
|
||||
@@ -893,14 +893,23 @@ class Escpos:
|
||||
self._raw(PAPER_FULL_CUT)
|
||||
|
||||
|
||||
def cashdraw(self, pin):
|
||||
""" Send pulse to kick the cash drawer """
|
||||
if pin == 2:
|
||||
self._raw(CD_KICK_2)
|
||||
elif pin == 5:
|
||||
self._raw(CD_KICK_5)
|
||||
else:
|
||||
raise CashDrawerError()
|
||||
def cashdraw(self, pin, tries=5):
|
||||
""" Send pulse to kick the cash drawer
|
||||
|
||||
With some printers the drawer will not open after one pulse, for this reason we will check
|
||||
the drawer status up to 'tries' times and send a new pulse if the drawer is still closed. If the
|
||||
drawer status is open, we will stop sending pulses.
|
||||
"""
|
||||
for i in range(tries):
|
||||
if pin == 2:
|
||||
self._raw(CD_KICK_2)
|
||||
elif pin == 5:
|
||||
self._raw(CD_KICK_5)
|
||||
else:
|
||||
raise CashDrawerError()
|
||||
|
||||
if i != tries - 1 and not self.get_printer_status()['printer']['drawer_pin_high']:
|
||||
break
|
||||
|
||||
|
||||
def hw(self, hw):
|
||||
|
||||
@@ -8,7 +8,7 @@ import time
|
||||
|
||||
from collections import namedtuple
|
||||
from os import listdir
|
||||
from threading import Thread, Lock
|
||||
from threading import Event, Lock, Thread
|
||||
|
||||
from odoo import http
|
||||
|
||||
@@ -134,6 +134,7 @@ class Scale(Thread):
|
||||
self.path_to_scale = ''
|
||||
self.protocol = None
|
||||
self.disabled = False
|
||||
self.weight_request_event = Event()
|
||||
|
||||
def lockedstart(self):
|
||||
with self.lock:
|
||||
@@ -261,8 +262,8 @@ class Scale(Thread):
|
||||
return None
|
||||
|
||||
def get_weight(self):
|
||||
self.repeats = 5
|
||||
self.disabled = False
|
||||
self.weight_request_event.set()
|
||||
self.lockedstart()
|
||||
return self.weight
|
||||
|
||||
@@ -361,11 +362,13 @@ class Scale(Thread):
|
||||
self.device = self.get_device()
|
||||
if not self.device:
|
||||
# retry later to support "plug and play"
|
||||
time.sleep(10)
|
||||
self.weight_request_event.clear()
|
||||
self.weight_request_event.wait(10)
|
||||
else:
|
||||
self.disabled = self.protocol.disable
|
||||
else:
|
||||
time.sleep(10)
|
||||
self.weight_request_event.clear()
|
||||
self.weight_request_event.wait(10)
|
||||
|
||||
|
||||
scale_thread = None
|
||||
|
||||
@@ -162,7 +162,7 @@ class IapAccount(models.Model):
|
||||
|
||||
@api.model
|
||||
def get(self, service_name, force_create=True):
|
||||
account = self.search([('service_name', '=', service_name), ('company_id', 'in', [self.env.company.id, False])])
|
||||
account = self.search([('service_name', '=', service_name), ('company_id', 'in', [self.env.company.id, False])], limit=1, order='company_id desc, id desc')
|
||||
if not account and force_create:
|
||||
account = self.create({'service_name': service_name})
|
||||
# Since the account did not exist yet, we will encounter a NoCreditError,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_client_iap_account_manager,iap.account.manager,model_iap_account,base.group_system,1,1,1,0
|
||||
access_client_iap_account_manager,iap.account.manager,model_iap_account,base.group_system,1,1,1,1
|
||||
access_client_iap_account_user,iap.account.user,model_iap_account,base.group_user,1,0,1,0
|
||||
|
||||
|
@@ -162,8 +162,11 @@ class ImLivechatChannel(models.Model):
|
||||
operator_partner_id = operator.partner_id.id
|
||||
# partner to add to the mail.channel
|
||||
channel_partner_to_add = [(4, operator_partner_id)]
|
||||
if self.env.user and self.env.user.active: # valid session user (not public)
|
||||
channel_partner_to_add.append((4, self.env.user.partner_id.id))
|
||||
visitor_user = False
|
||||
if user_id:
|
||||
visitor_user = self.env['res.users'].browse(user_id)
|
||||
if visitor_user and visitor_user.active: # valid session user (not public)
|
||||
channel_partner_to_add.append((4, visitor_user.partner_id.id))
|
||||
# create the session, and add the link with the given channel
|
||||
mail_channel = self.env["mail.channel"].with_context(mail_create_nosubscribe=False).sudo().create({
|
||||
'channel_partner_ids': channel_partner_to_add,
|
||||
@@ -172,7 +175,7 @@ class ImLivechatChannel(models.Model):
|
||||
'anonymous_name': False if user_id else anonymous_name,
|
||||
'country_id': country_id,
|
||||
'channel_type': 'livechat',
|
||||
'name': ', '.join([self.env['res.users'].browse(user_id).name if user_id else anonymous_name, operator.livechat_username if operator.livechat_username else operator.name]),
|
||||
'name': ', '.join([visitor_user.name if visitor_user else anonymous_name, operator.livechat_username if operator.livechat_username else operator.name]),
|
||||
'public': 'private',
|
||||
'email_send': False,
|
||||
})
|
||||
|
||||
@@ -24,6 +24,11 @@ class TestGetMailChannel(TransactionCase):
|
||||
'login': 'georges'
|
||||
}])
|
||||
|
||||
self.visitor_user = self.env['res.users'].create({
|
||||
'name': 'Rajesh',
|
||||
'login': 'rajesh',
|
||||
})
|
||||
|
||||
self.livechat_channel = self.env['im_livechat.channel'].create({
|
||||
'name': 'The channel',
|
||||
'user_ids': (6, 0, self.operators.ids)
|
||||
@@ -46,6 +51,9 @@ class TestGetMailChannel(TransactionCase):
|
||||
channel_operator_ids = [channel_operator[0] for channel_operator in channel_operators]
|
||||
self.assertTrue(all(partner_id in channel_operator_ids for partner_id in self.operators.mapped('partner_id').ids))
|
||||
|
||||
visitor_user_channel = self.livechat_channel._get_mail_channel('Visitor', user_id=self.visitor_user.id)
|
||||
self.assertEqual(visitor_user_channel['correspondent_name'], self.visitor_user.name, "Chat title should be correct")
|
||||
|
||||
def _get_mail_channels(self):
|
||||
mail_channels = []
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ var SupportMessage = Message.extend({
|
||||
*/
|
||||
init: function () {
|
||||
this._super.apply(this, arguments);
|
||||
if (this._serverAuthorID !== this.call('mail_service', 'getOdoobotID')) {
|
||||
if (
|
||||
!this._serverAuthorID ||
|
||||
this._serverAuthorID[0] !== this.call('mail_service', 'getOdoobotID')[0]
|
||||
) {
|
||||
if (!this._serverAuthorID[0]) {
|
||||
// the author is the client
|
||||
this._serverAuthorID = [session.partner_id, session.name];
|
||||
|
||||
@@ -14,11 +14,15 @@ United Arab Emirates accounting chart and localization.
|
||||
""",
|
||||
'depends': ['base', 'account'],
|
||||
'data': [
|
||||
'data/l10n_ae_data.xml',
|
||||
'data/account_data.xml',
|
||||
'data/l10n_ae_chart_data.xml',
|
||||
'data/account.account.template.csv',
|
||||
'data/l10n_ae_chart_post_data.xml',
|
||||
'data/account_tax_report_data.xml',
|
||||
'data/account_tax_template_data.xml',
|
||||
'data/fiscal_templates_data.xml',
|
||||
'data/account_chart_template_data.xml',
|
||||
'views/report_invoice_templates.xml',
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<data noupdate="0">
|
||||
<!-- Account Tax Group -->
|
||||
<record id="tax_group_15" model="account.tax.group">
|
||||
<field name="name">Tax 15%</field>
|
||||
<record id="ae_tax_group_5" model="account.tax.group">
|
||||
<field name="name">Tax 5%</field>
|
||||
</record>
|
||||
<record id="ae_tax_group_0" model="account.tax.group">
|
||||
<field name="name">Tax 0%</field>
|
||||
</record>
|
||||
<record id="ae_tax_group_exempted" model="account.tax.group">
|
||||
<field name="name">Tax Exempted</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -0,0 +1,421 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="tax_report_line_base_all_sales" model="account.tax.report.line">
|
||||
<field name="name">VAT on Sales and all other Outputs (Base)</field>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base" model="account.tax.report.line">
|
||||
<field name="name">1. Standard Rated supplies (Base)</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_abu_dhabi" model="account.tax.report.line">
|
||||
<field name="name">a. Abu Dhabi</field>
|
||||
<field name="tag_name">a. Abu Dhabi</field>
|
||||
<field name="code">STD_RATE_SUPP_BASE_AB</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_dubai" model="account.tax.report.line">
|
||||
<field name="name">b. Dubai</field>
|
||||
<field name="tag_name">b. Dubai</field>
|
||||
<field name="code">STD_RATE_SUPP_BASE_DB</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_sharjah" model="account.tax.report.line">
|
||||
<field name="name">c. Sharjah</field>
|
||||
<field name="tag_name">c. Sharjah</field>
|
||||
<field name="code">STD_RATE_SUPP_BASE_SJ</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_ajman" model="account.tax.report.line">
|
||||
<field name="name">d. Ajman</field>
|
||||
<field name="tag_name">d. Ajman</field>
|
||||
<field name="code">STD_RATE_SUPP_BASE_AJ</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_umm_al_quwain" model="account.tax.report.line">
|
||||
<field name="name">e. Umm Al Quwain</field>
|
||||
<field name="tag_name">e. Umm Al Quwain</field>
|
||||
<field name="code">STD_RATE_SUPP_BASE_UM</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="5"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_ras_al_khaima" model="account.tax.report.line">
|
||||
<field name="name">f. Ras Al-Khaima</field>
|
||||
<field name="tag_name">f. Ras Al-Khaima</field>
|
||||
<field name="code">STD_RATE_SUPP_BASE_RA</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="6"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_fujairah" model="account.tax.report.line">
|
||||
<field name="name">g. Fujairah</field>
|
||||
<field name="tag_name">g. Fujairah</field>
|
||||
<field name="code">STD_RATE_SUPP_BASE_FU</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="7"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_base_subtotal" model="account.tax.report.line">
|
||||
<field name="name">Sub Total</field>
|
||||
<field name="formula">STD_RATE_SUPP_BASE_AB + STD_RATE_SUPP_BASE_DB + STD_RATE_SUPP_BASE_SJ + STD_RATE_SUPP_BASE_AJ + STD_RATE_SUPP_BASE_UM + STD_RATE_SUPP_BASE_RA + STD_RATE_SUPP_BASE_FU</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_base"/>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_tax_refund_tourist_base" model="account.tax.report.line">
|
||||
<field name="name">2. Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme</field>
|
||||
<field name="tag_name">2. Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme</field>
|
||||
<field name="code">TAX_REF_TOUR_SCHEME_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_supplies_reverse_charge_base" model="account.tax.report.line">
|
||||
<field name="name">3. Supplies subject to reverse charge provisions</field>
|
||||
<field name="tag_name">3. Supplies subject to reverse charge provisions</field>
|
||||
<field name="code">REVERSE_CHARGE_PRO_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_zero_rated_supplies_base" model="account.tax.report.line">
|
||||
<field name="name">4. Zero rated supplies</field>
|
||||
<field name="tag_name">4. Zero rated supplies</field>
|
||||
<field name="code">ZERO_RATE_SUPP_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_exempt_supplies_base" model="account.tax.report.line">
|
||||
<field name="name">5. Exempt supplies</field>
|
||||
<field name="tag_name">5. Exempt supplies</field>
|
||||
<field name="code">EXAMPT_SUPP_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="5"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_supplies_out_of_scope_base" model="account.tax.report.line">
|
||||
<field name="name">6. Out of scope</field>
|
||||
<field name="code">OUT_OF_SCOPE_BASE_0</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="6"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_import_uae_base" model="account.tax.report.line">
|
||||
<field name="name">7. Goods imported into the UAE</field>
|
||||
<field name="tag_name">7. Goods imported into the UAE</field>
|
||||
<field name="code">GOODS_IMPORT_IN_UAE_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="7"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_adjustment_import_uae_base" model="account.tax.report.line">
|
||||
<field name="name">8. Adjustments to goods imported into the UAE</field>
|
||||
<field name="code">ADJUST_GOODS_IMPORT_IN_UAE_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_base_all_sales_total" model="account.tax.report.line">
|
||||
<field name="name">9. Total</field>
|
||||
<field name="formula">ADJUST_GOODS_IMPORT_IN_UAE_BASE + GOODS_IMPORT_IN_UAE_BASE + OUT_OF_SCOPE_BASE_0 + EXAMPT_SUPP_BASE + ZERO_RATE_SUPP_BASE + REVERSE_CHARGE_PRO_BASE + TAX_REF_TOUR_SCHEME_BASE + (STD_RATE_SUPP_BASE_AB + STD_RATE_SUPP_BASE_DB + STD_RATE_SUPP_BASE_SJ + STD_RATE_SUPP_BASE_AJ + STD_RATE_SUPP_BASE_UM + STD_RATE_SUPP_BASE_RA + STD_RATE_SUPP_BASE_FU)</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_sales"/>
|
||||
<field name="sequence" eval="9"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_base_all_expense" model="account.tax.report.line">
|
||||
<field name="name">VAT on Expenses and all other Inputs (Base)</field>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_expense_base" model="account.tax.report.line">
|
||||
<field name="name">10. Standard rated expenses</field>
|
||||
<field name="tag_name">10. Standard rated expenses</field>
|
||||
<field name="code">STD_RATE_EXPENSES_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_expense"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_expense_supplies_reverse_base" model="account.tax.report.line">
|
||||
<field name="name">11. Supplies subject to the reverse charge provisions</field>
|
||||
<field name="tag_name">11. Supplies subject to the reverse charge provisions</field>
|
||||
<field name="code">SUPP_REV_CHARGE_PRO_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_expense"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_expense_out_of_scope" model="account.tax.report.line">
|
||||
<field name="name">12. Out of scope</field>
|
||||
<field name="code">OUT_OF_SCOPE_1_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_expense"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_base_all_expense_total" model="account.tax.report.line">
|
||||
<field name="name">13. Totals</field>
|
||||
<field name="formula">OUT_OF_SCOPE_1_BASE + SUPP_REV_CHARGE_PRO_BASE + STD_RATE_EXPENSES_BASE</field>
|
||||
<field name="parent_id" ref="tax_report_line_base_all_expense"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_vat_all_sales" model="account.tax.report.line">
|
||||
<field name="name">VAT on Sales and all other Outputs (Tax)</field>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat" model="account.tax.report.line">
|
||||
<field name="name">1. Standard Rated supplies (Tax)</field>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_abu_dhabi" model="account.tax.report.line">
|
||||
<field name="name">a. Abu Dhabi</field>
|
||||
<field name="tag_name">a. Abu Dhabi</field>
|
||||
<field name="code">STD_RATE_SUPP_TAX_AB</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_dubai" model="account.tax.report.line">
|
||||
<field name="name">b. Dubai</field>
|
||||
<field name="tag_name">b. Dubai</field>
|
||||
<field name="code">STD_RATE_SUPP_TAX_DB</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_sharjah" model="account.tax.report.line">
|
||||
<field name="name">c. Sharjah</field>
|
||||
<field name="tag_name">c. Sharjah</field>
|
||||
<field name="code">STD_RATE_SUPP_TAX_SJ</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_ajman" model="account.tax.report.line">
|
||||
<field name="name">d. Ajman</field>
|
||||
<field name="tag_name">d. Ajman</field>
|
||||
<field name="code">STD_RATE_SUPP_TAX_AJ</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_umm_al_quwain" model="account.tax.report.line">
|
||||
<field name="name">e. Umm Al Quwain</field>
|
||||
<field name="tag_name">e. Umm Al Quwain</field>
|
||||
<field name="code">STD_RATE_SUPP_TAX_UM</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="5"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_ras_al_khaima" model="account.tax.report.line">
|
||||
<field name="name">f. Ras Al-Khaima</field>
|
||||
<field name="tag_name">f. Ras Al-Khaima</field>
|
||||
<field name="code">STD_RATE_SUPP_TAX_RA</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="6"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_fujairah" model="account.tax.report.line">
|
||||
<field name="name">g. Fujairah</field>
|
||||
<field name="tag_name">g. Fujairah</field>
|
||||
<field name="code">STD_RATE_SUPP_TAX_FU</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="7"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_supplies_vat_subtotal" model="account.tax.report.line">
|
||||
<field name="name">Sub Total</field>
|
||||
<field name="formula">STD_RATE_SUPP_TAX_AB + STD_RATE_SUPP_TAX_DB + STD_RATE_SUPP_TAX_SJ + STD_RATE_SUPP_TAX_AJ + STD_RATE_SUPP_TAX_UM + STD_RATE_SUPP_TAX_RA + STD_RATE_SUPP_TAX_FU</field>
|
||||
<field name="parent_id" ref="tax_report_line_standard_rated_supplies_vat"/>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_tax_refund_tourist_vat" model="account.tax.report.line">
|
||||
<field name="name">2. Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme</field>
|
||||
<field name="tag_name">2. Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme</field>
|
||||
<field name="code">TAX_REF_TOUR_SCHEME_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_supplies_reverse_charge_vat" model="account.tax.report.line">
|
||||
<field name="name">3. Supplies subject to reverse charge provisions</field>
|
||||
<field name="tag_name">3. Supplies subject to reverse charge provisions</field>
|
||||
<field name="code">REVERSE_CHARGE_PRO_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_zero_rated_supplies_vat" model="account.tax.report.line">
|
||||
<field name="name">4. Zero rated supplies</field>
|
||||
<field name="tag_name">4. Zero rated supplies</field>
|
||||
<field name="code">ZERO_RATE_SUPP_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_exempt_supplies_vat" model="account.tax.report.line">
|
||||
<field name="name">5. Exempt supplies</field>
|
||||
<field name="tag_name">5. Exempt supplies</field>
|
||||
<field name="code">EXAMPT_SUPP_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="5"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_supplies_out_of_scope_vat" model="account.tax.report.line">
|
||||
<field name="name">6. Out of scope</field>
|
||||
<field name="code">OUT_OF_SCOPE_TAX_0</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="6"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_import_uae_vat" model="account.tax.report.line">
|
||||
<field name="name">7. Goods imported into the UAE</field>
|
||||
<field name="tag_name">7. Goods imported into the UAE</field>
|
||||
<field name="code">GOODS_IMPORT_IN_UAE_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="7"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_adjustment_import_uae_vat" model="account.tax.report.line">
|
||||
<field name="name">8. Adjustments to goods imported into the UAE</field>
|
||||
<field name="code">ADJUST_GOODS_IMPORT_IN_UAE_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_vat_all_sales_total" model="account.tax.report.line">
|
||||
<field name="name">9. Total</field>
|
||||
<field name="formula">(STD_RATE_SUPP_TAX_AB + STD_RATE_SUPP_TAX_DB + STD_RATE_SUPP_TAX_SJ + STD_RATE_SUPP_TAX_AJ + STD_RATE_SUPP_TAX_UM + STD_RATE_SUPP_TAX_RA + STD_RATE_SUPP_TAX_FU) + OUT_OF_SCOPE_TAX_0 + ADJUST_GOODS_IMPORT_IN_UAE_TAX + GOODS_IMPORT_IN_UAE_TAX + EXAMPT_SUPP_TAX + ZERO_RATE_SUPP_TAX + REVERSE_CHARGE_PRO_TAX + TAX_REF_TOUR_SCHEME_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_sales"/>
|
||||
<field name="sequence" eval="9"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_vat_all_expense" model="account.tax.report.line">
|
||||
<field name="name">VAT on Expenses and all other Inputs (Tax)</field>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_standard_rated_expense_vat" model="account.tax.report.line">
|
||||
<field name="name">10. Standard rated expenses</field>
|
||||
<field name="tag_name">10. Standard rated expenses</field>
|
||||
<field name="code">STD_RATE_EXPENSES_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_expense"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_expense_supplies_reverse_vat" model="account.tax.report.line">
|
||||
<field name="name">11. Supplies subject to the reverse charge provisions</field>
|
||||
<field name="tag_name">11. Supplies subject to the reverse charge provisions</field>
|
||||
<field name="code">SUPP_REV_CHARGE_PRO_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_expense"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_expense_out_of_scope_vat" model="account.tax.report.line">
|
||||
<field name="name">12. Out of scope</field>
|
||||
<field name="code">OUT_OF_SCOPE_1_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_expense"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_vat_all_expense_total" model="account.tax.report.line">
|
||||
<field name="name">13. Totals</field>
|
||||
<field name="formula">OUT_OF_SCOPE_1_TAX + SUPP_REV_CHARGE_PRO_TAX + STD_RATE_EXPENSES_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_vat_all_expense"/>
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_net_vat_due" model="account.tax.report.line">
|
||||
<field name="name">Net VAT Due</field>
|
||||
<field name="sequence" eval="5"/>
|
||||
<field name="formula">((STD_RATE_SUPP_TAX_AB + STD_RATE_SUPP_TAX_DB + STD_RATE_SUPP_TAX_SJ + STD_RATE_SUPP_TAX_AJ + STD_RATE_SUPP_TAX_UM + STD_RATE_SUPP_TAX_RA + STD_RATE_SUPP_TAX_FU) + OUT_OF_SCOPE_TAX_0 + ADJUST_GOODS_IMPORT_IN_UAE_TAX + GOODS_IMPORT_IN_UAE_TAX + EXAMPT_SUPP_TAX + ZERO_RATE_SUPP_TAX + REVERSE_CHARGE_PRO_TAX + TAX_REF_TOUR_SCHEME_TAX) - (OUT_OF_SCOPE_1_TAX + SUPP_REV_CHARGE_PRO_TAX + STD_RATE_EXPENSES_TAX)</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_total_value_due_tax_period" model="account.tax.report.line">
|
||||
<field name="name">14. Total value of due tax for the period</field>
|
||||
<field name="formula">(STD_RATE_SUPP_TAX_AB + STD_RATE_SUPP_TAX_DB + STD_RATE_SUPP_TAX_SJ + STD_RATE_SUPP_TAX_AJ + STD_RATE_SUPP_TAX_UM + STD_RATE_SUPP_TAX_RA + STD_RATE_SUPP_TAX_FU) + OUT_OF_SCOPE_TAX_0 + ADJUST_GOODS_IMPORT_IN_UAE_TAX + GOODS_IMPORT_IN_UAE_TAX + EXAMPT_SUPP_TAX + ZERO_RATE_SUPP_TAX + REVERSE_CHARGE_PRO_TAX + TAX_REF_TOUR_SCHEME_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_net_vat_due"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_total_value_recoverable_tax_period" model="account.tax.report.line">
|
||||
<field name="name">15. Total value of recoverable tax for the period</field>
|
||||
<field name="formula">OUT_OF_SCOPE_1_TAX + SUPP_REV_CHARGE_PRO_TAX + STD_RATE_EXPENSES_TAX</field>
|
||||
<field name="parent_id" ref="tax_report_line_net_vat_due"/>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
<record id="tax_report_line_net_vat_due_period" model="account.tax.report.line">
|
||||
<field name="name">16. Net VAT due (or reclaimed) for the period</field>
|
||||
<field name="formula">((STD_RATE_SUPP_TAX_AB + STD_RATE_SUPP_TAX_DB + STD_RATE_SUPP_TAX_SJ + STD_RATE_SUPP_TAX_AJ + STD_RATE_SUPP_TAX_UM + STD_RATE_SUPP_TAX_RA + STD_RATE_SUPP_TAX_FU) + OUT_OF_SCOPE_TAX_0 + ADJUST_GOODS_IMPORT_IN_UAE_TAX + GOODS_IMPORT_IN_UAE_TAX + EXAMPT_SUPP_TAX + ZERO_RATE_SUPP_TAX + REVERSE_CHARGE_PRO_TAX + TAX_REF_TOUR_SCHEME_TAX) - (OUT_OF_SCOPE_1_TAX + SUPP_REV_CHARGE_PRO_TAX + STD_RATE_EXPENSES_TAX)</field>
|
||||
<field name="parent_id" ref="tax_report_line_net_vat_due"/>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -1,17 +1,264 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="sale_tax_template" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="name">Tax 10%</field>
|
||||
<field name="amount">10</field>
|
||||
<record id="uae_sale_tax_5_dubai" model="account.tax.template">
|
||||
<field name="name">TVA 5% (Dubai)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="tax_group_id" ref="tax_group_15"/>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_dubai')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_dubai')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_dubai')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_dubai')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_5_abu_dhabi" model="account.tax.template">
|
||||
<field name="name">TVA 5% (Abu Dhabi)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_abu_dhabi')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_abu_dhabi')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_abu_dhabi')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_abu_dhabi')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_5_sharjah" model="account.tax.template">
|
||||
<field name="name">TVA 5% (Sharjah)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_sharjah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_sharjah')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_sharjah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_sharjah')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_5_ajman" model="account.tax.template">
|
||||
<field name="name">TVA 5% (Ajman)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_ajman')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ajman')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_ajman')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ajman')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_5_umm_al_quwain" model="account.tax.template">
|
||||
<field name="name">TVA 5% (Umm Al Quwain)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_umm_al_quwain')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_umm_al_quwain')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_umm_al_quwain')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_umm_al_quwain')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_5_ras_al_khaima" model="account.tax.template">
|
||||
<field name="name">TVA 5% (Ras Al-Khaima)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_ras_al_khaima')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ras_al_khaima')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_ras_al_khaima')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ras_al_khaima')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_5_fujairah" model="account.tax.template">
|
||||
<field name="name">TVA 5% (Fujairah)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_fujairah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_fujairah')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_base_fujairah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_fujairah')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_exempted" model="account.tax.template">
|
||||
<field name="name">Exempted Tax</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Exempted</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_exempted"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_exempt_supplies_base')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
@@ -22,8 +269,8 @@
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_exempt_supplies_base')],
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
@@ -31,22 +278,54 @@
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="purchase_tax_template" model="account.tax.template">
|
||||
<record id="uae_sale_tax_0" model="account.tax.template">
|
||||
<field name="name">TVA 0%</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 0%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_0"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_zero_rated_supplies_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_zero_rated_supplies_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_export_tax" model="account.tax.template">
|
||||
<field name="name">Export Tax 0%</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Export Tax</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="name">Purchase Tax 10%</field>
|
||||
<field name="amount">10</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="tax_group_id" ref="tax_group_15"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
@@ -54,11 +333,545 @@
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_reverse_charge_dubai" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision (Dubai)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_dubai')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_dubai')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_dubai')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_dubai')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_reverse_charge_abu_dhabi" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision (Abi Dhabi)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_abu_dhabi')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_abu_dhabi')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_abu_dhabi')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_abu_dhabi')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_reverse_charge_sharjah" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision (Sharjah)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_sharjah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_sharjah')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_sharjah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_sharjah')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_reverse_charge_ajman" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision (Ajman)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_ajman')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ajman')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_ajman')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ajman')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_reverse_charge_umm_al_quwain" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision (Umm Al Quwain)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_umm_al_quwain')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_umm_al_quwain')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_umm_al_quwain')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_umm_al_quwain')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_reverse_charge_ras_al_khaima" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision (Ras Al-Khaima)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_ras_al_khaima')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ras_al_khaima')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_ras_al_khaima')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_ras_al_khaima')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_reverse_charge_fujairah" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision (Fujairah)</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_fujairah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_fujairah')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_base'),ref('tax_report_line_standard_rated_supplies_base_fujairah')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_supplies_reverse_charge_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3785'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_supplies_vat_fujairah')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_sale_tax_tourist_refund" model="account.tax.template">
|
||||
<field name="name">Tourist Refund scheme 5%</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="amount">5.0</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_tax_refund_tourist_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_tax_refund_tourist_vat')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_tax_refund_tourist_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_tax_refund_tourist_vat')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<!-- purchase taxes -->
|
||||
<record id="uae_purchase_tax_5" model="account.tax.template">
|
||||
<field name="name">TVA 5%</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 5%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_5"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_expense_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_expense_vat')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_expense_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_expense_vat')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_purchase_tax_exempted" model="account.tax.template">
|
||||
<field name="name">Exempted Tax</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Exempted Tax</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_exempted"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_exempt_supplies_vat')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_exempt_supplies_vat')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_purchase_tax_0" model="account.tax.template">
|
||||
<field name="name">TVA 0%</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">TVA 0%</field>
|
||||
<field name="tax_group_id" ref="ae_tax_group_0"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_zero_rated_supplies_vat')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_zero_rated_supplies_vat')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_import_tax" model="account.tax.template">
|
||||
<field name="name">Import Tax 5%</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Import Tax</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_import_uae_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'plus_report_line_ids': [ref('tax_report_line_import_uae_vat')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_import_uae_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'minus_report_line_ids': [ref('tax_report_line_import_uae_vat')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
<record id="uae_purchase_tax_reverse_charge" model="account.tax.template">
|
||||
<field name="name">Reverse Charge Provision</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="description">Supplies subject to reverse charge provisions</field>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('tax_report_line_expense_supplies_reverse_base'),ref('tax_report_line_standard_rated_expense_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_expense_supplies_reverse_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'minus_report_line_ids': [ref('tax_report_line_standard_rated_expense_vat')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('tax_report_line_expense_supplies_reverse_base'),ref('tax_report_line_standard_rated_expense_base')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': -100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_expense_supplies_reverse_vat')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('uae_account_3726'),
|
||||
'plus_report_line_ids': [ref('tax_report_line_standard_rated_expense_vat')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="account_fiscal_position_dubai" model="account.fiscal.position.template">
|
||||
<field name="name">Dubai</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="sequence">16</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
<field name="state_ids" eval="[(6,0,[ref('base.state_ae_du')])]"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_abu_dhabi" model="account.fiscal.position.template">
|
||||
<field name="name">Abu Dhabi</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="sequence">16</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
<field name="state_ids" eval="[(6,0,[ref('base.state_ae_az')])]"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
<record id="account_fiscal_position_abu_dhabi_01" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_sale_tax_5_dubai"/>
|
||||
<field name="tax_dest_id" ref="uae_sale_tax_5_abu_dhabi"/>
|
||||
<field name="position_id" ref="account_fiscal_position_abu_dhabi"/>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_sharjah" model="account.fiscal.position.template">
|
||||
<field name="name">Sharjah</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="sequence">16</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
<field name="state_ids" eval="[(6,0,[ref('base.state_ae_sh')])]"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
<record id="account_fiscal_position_sharjah_01" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_sale_tax_5_dubai"/>
|
||||
<field name="tax_dest_id" ref="uae_sale_tax_5_sharjah"/>
|
||||
<field name="position_id" ref="account_fiscal_position_sharjah"/>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_ajman" model="account.fiscal.position.template">
|
||||
<field name="name">Ajman</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="sequence">16</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
<field name="state_ids" eval="[(6,0,[ref('base.state_ae_aj')])]"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
<record id="account_fiscal_position_ajman_01" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_sale_tax_5_dubai"/>
|
||||
<field name="tax_dest_id" ref="uae_sale_tax_5_ajman"/>
|
||||
<field name="position_id" ref="account_fiscal_position_ajman"/>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_umm_al_quwain" model="account.fiscal.position.template">
|
||||
<field name="name">Umm Al Quwain</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="sequence">16</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
<field name="state_ids" eval="[(6,0,[ref('base.state_ae_uq')])]"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
<record id="account_fiscal_position_umm_al_quwain_01" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_sale_tax_5_dubai"/>
|
||||
<field name="tax_dest_id" ref="uae_sale_tax_5_umm_al_quwain"/>
|
||||
<field name="position_id" ref="account_fiscal_position_umm_al_quwain"/>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_ras_al_khaima" model="account.fiscal.position.template">
|
||||
<field name="name">Ras Al-Khaima</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="sequence">16</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
<field name="state_ids" eval="[(6,0,[ref('base.state_ae_rk')])]"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
<record id="account_fiscal_position_ras_al_khaima_01" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_sale_tax_5_dubai"/>
|
||||
<field name="tax_dest_id" ref="uae_sale_tax_5_ras_al_khaima"/>
|
||||
<field name="position_id" ref="account_fiscal_position_ras_al_khaima"/>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_fujairah" model="account.fiscal.position.template">
|
||||
<field name="name">Fujairah</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="sequence">16</field>
|
||||
<field name="country_id" ref="base.ae"/>
|
||||
<field name="state_ids" eval="[(6,0,[ref('base.state_ae_fu')])]"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
<record id="account_fiscal_position_fujairah_01" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_sale_tax_5_dubai"/>
|
||||
<field name="tax_dest_id" ref="uae_sale_tax_5_fujairah"/>
|
||||
<field name="position_id" ref="account_fiscal_position_fujairah"/>
|
||||
</record>
|
||||
|
||||
<record id="account_fiscal_position_non_uae_countries" model="account.fiscal.position.template">
|
||||
<field name="name">Non-UAE</field>
|
||||
<field name="sequence">20</field>
|
||||
<field name="auto_apply" eval="True"/>
|
||||
<field name="chart_template_id" ref="uae_chart_template_standard"/>
|
||||
</record>
|
||||
<record id="acccount_fiscal_position_tax_non_uae_01" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_sale_tax_5_dubai"/>
|
||||
<field name="tax_dest_id" ref="uae_sale_tax_0"/>
|
||||
<field name="position_id" ref="account_fiscal_position_non_uae_countries"/>
|
||||
</record>
|
||||
<record id="acccount_fiscal_position_tax_non_uae_02" model="account.fiscal.position.tax.template">
|
||||
<field name="tax_src_id" ref="uae_purchase_tax_5"/>
|
||||
<field name="tax_dest_id" ref="uae_purchase_tax_0"/>
|
||||
<field name="position_id" ref="account_fiscal_position_non_uae_countries"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<menuitem id="account_reports_ae_statements_menu" name="UAE" parent="account.menu_finance_reports" sequence="0" groups="account.group_account_user"/>
|
||||
|
||||
<record id="uae_chart_template_standard" model="account.chart.template">
|
||||
<field name="name">U.A.E Chart of Accounts - Standard</field>
|
||||
<field name="code_digits">6</field>
|
||||
@@ -7,6 +9,6 @@
|
||||
<field name="cash_account_code_prefix">105</field>
|
||||
<field name="transfer_account_code_prefix">100</field>
|
||||
<field name="currency_id" ref="base.AED" />
|
||||
<field name="complete_tax_set" eval="False"/>
|
||||
<field name="complete_tax_set" eval="True"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- set VAT label to show on invoice report -->
|
||||
<record id="base.ae" model="res.country">
|
||||
<field name="vat_label">TRN</field>
|
||||
</record>
|
||||
<record id="base.AED" model="res.currency">
|
||||
<field name="symbol">AED</field>
|
||||
</record>
|
||||
<record id="gcc_countries_group" model="res.country.group">
|
||||
<field name="name">GCC VAT implementing States</field>
|
||||
<field name="country_ids" eval="[(6,0,[ref('base.ae'),ref('base.sa'),ref('base.bh')])]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
||||
<xpath expr="//p[@name='payment_term']" position="after">
|
||||
<p t-if="o.company_id.country_id.code == 'AE' and o.partner_id.country_id.code != 'AE' and o.env.ref('l10n_ae.gcc_countries_group') in o.partner_id.country_id.country_group_ids">
|
||||
Supply between <b>United Arad Emirates</b> and <b><span t-field="o.partner_id.country_id.name"/></b>
|
||||
</p>
|
||||
</xpath>
|
||||
<xpath expr="//h2/span" position="before">
|
||||
<span t-if="o.company_id.country_id.code == 'AE' and o.type in ['out_invoice', 'out_refund']">Tax</span>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('clearfix')]" position="after">
|
||||
<div t-if="o.company_id.country_id.code == 'AE' and o.currency_id != o.company_id.currency_id" id="aed_amounts" class="row clearfix ml-auto my-3 text-nowrap table">
|
||||
<t t-set="aed_rate" t-value="o.env['res.currency']._get_conversion_rate(o.currency_id, o.company_id.currency_id, o.company_id, o.date_invoice or datetime.date.today())"/>
|
||||
<div name="exchange_rate" class="col-auto">
|
||||
<strong>Exchange Rate</strong>
|
||||
<p class="m-0" t-esc="aed_rate" t-options='{"widget": "float", "precision": 5}'/>
|
||||
</div>
|
||||
<div name="aed_subtotal" class="col-auto">
|
||||
<strong>Subtotal (AED)</strong>
|
||||
<p class="m-0" t-esc="o.amount_untaxed_signed" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
|
||||
</div>
|
||||
<div name="aed_vat_amount" class="col-auto">
|
||||
<strong>Tax Amount (AED)</strong>
|
||||
<p class="m-0" t-esc="o.currency_id._convert(o.amount_tax, o.company_id.currency_id, o.company_id, o.date_invoice or datetime.date.today())" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
|
||||
</div>
|
||||
<div name="aed_total" class="col-auto">
|
||||
<strong>Total (AED)</strong>
|
||||
<p class="m-0" t-esc="o.amount_total_company_signed" t-options='{"widget": "monetary", "display_currency": o.company_currency_id}'/>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -3325,7 +3325,7 @@
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'plus_report_line_ids': [ref('tax_report_line_62')],
|
||||
'minus_report_line_ids': [ref('tax_report_line_62')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Note for later versions, the group Employee Manager should become contract manager -->
|
||||
<record id="hr.group_hr_manager" model="res.groups">
|
||||
<field name="implied_ids" eval="[(4, ref('fleet.fleet_group_manager'))]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -84,7 +84,6 @@
|
||||
<field name="amount">100</field>
|
||||
<field name="amount_type">group</field>
|
||||
<field name="children_tax_ids" eval="[(6,0,[ref('pst_bc_sale_en'), ref('gstpst_sale_bc_gst_en')])]"/>
|
||||
<field name="tag_ids" eval="[(6,0,[ref('tag_gstpst_bc_sale')])]"/>
|
||||
<field name="tax_group_id" ref="tax_group_fix"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='bank_acc_number']" position="after">
|
||||
<xpath expr="//field[@name='bank_account_id']" position="after">
|
||||
<field name="l10n_ch_postal" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -305,7 +305,7 @@ class AccountFrFec(models.TransientModel):
|
||||
END
|
||||
AS PieceRef,
|
||||
TO_CHAR(am.date, 'YYYYMMDD') AS PieceDate,
|
||||
CASE WHEN aml.name IS NULL THEN '/' ELSE replace(replace(aml.name, '|', '/'), '\t', '') END AS EcritureLib,
|
||||
CASE WHEN aml.name IS NULL OR aml.name = '' THEN '/' ELSE replace(replace(aml.name, '|', '/'), '\t', '') END AS EcritureLib,
|
||||
replace(CASE WHEN aml.debit = 0 THEN '0,00' ELSE to_char(aml.debit, '000000000000000D99') END, '.', ',') AS Debit,
|
||||
replace(CASE WHEN aml.credit = 0 THEN '0,00' ELSE to_char(aml.credit, '000000000000000D99') END, '.', ',') AS Credit,
|
||||
CASE WHEN rec.name IS NULL THEN '' ELSE rec.name END AS EcritureLet,
|
||||
@@ -388,7 +388,7 @@ class AccountFrFec(models.TransientModel):
|
||||
rows_length = len(rows)
|
||||
for i, row in enumerate(rows):
|
||||
if not i == rows_length - 1:
|
||||
row.append(lineterminator)
|
||||
row[-1] += lineterminator
|
||||
writer.writerow(row)
|
||||
|
||||
fecvalue = fecfile.getvalue()
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
<field name="description">ISV por Cobrar</field>
|
||||
<field name="amount" eval="15"/>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="account_id" ref="cta110301"/>
|
||||
<field name="refund_account_id" ref="cta110301"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="price_include" eval="True"/>
|
||||
<field name="tax_group_id" ref="tax_group_iva_15"/>
|
||||
|
||||
@@ -70,8 +70,8 @@ class AccountInvoice(models.Model):
|
||||
vals['quantity'] = invoice_tax_line.l10n_in_quantity
|
||||
return res
|
||||
|
||||
def _prepare_tax_line_vals(self, line, tax, tax_ids):
|
||||
vals = super(AccountInvoice, self)._prepare_tax_line_vals(line, tax, tax_ids)
|
||||
def _prepare_tax_line_vals(self, line, tax):
|
||||
vals = super(AccountInvoice, self)._prepare_tax_line_vals(line, tax)
|
||||
vals['l10n_in_product_id'] = line.product_id.id
|
||||
vals['l10n_in_uom_id'] = line.uom_id.id
|
||||
vals['l10n_in_quantity'] = line.quantity
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
id,name
|
||||
tax_group_iva_2,IVA 2%
|
||||
tax_group_iva_4,IVA 4%
|
||||
tax_group_iva_5,IVA 5%
|
||||
tax_group_iva_10,IVA 10%
|
||||
tax_group_iva_12,IVA 12%
|
||||
tax_group_iva_21,IVA 21%
|
||||
|
||||
|
@@ -205,6 +205,74 @@
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="5v" model="account.tax.template">
|
||||
<field name="description">5v</field>
|
||||
<field name="chart_template_id" ref="l10n_it_chart_template_generic"/>
|
||||
<field name="name">Iva al 5% (debito)</field>
|
||||
<field name="sequence">5</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="price_include">False</field>
|
||||
<field name="tax_group_id" ref="tax_group_iva_5"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('2601'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('2601'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="5a" model="account.tax.template">
|
||||
<field name="description">5a</field>
|
||||
<field name="chart_template_id" ref="l10n_it_chart_template_generic"/>
|
||||
<field name="name">Iva al 5% (credito)</field>
|
||||
<field name="sequence">6</field>
|
||||
<field name="amount">5</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="price_include">False</field>
|
||||
<field name="tax_group_id" ref="tax_group_iva_5"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('1601'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('1601'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="10v" model="account.tax.template">
|
||||
<field name="description">10v</field>
|
||||
<field name="chart_template_id" ref="l10n_it_chart_template_generic"/>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
{
|
||||
"name" : "Mongolia - Accounting",
|
||||
"version" : "1.0",
|
||||
'category': 'Localization',
|
||||
"description": """
|
||||
This is the module to manage the accounting chart for Mongolia.
|
||||
===============================================================
|
||||
|
||||
* the Mongolia Official Chart of Accounts,
|
||||
* the Tax Code Chart for Mongolia
|
||||
* the main taxes used in Mongolia
|
||||
|
||||
Financial requirement contributor: Baskhuu Lodoikhuu. BumanIT LLC
|
||||
""",
|
||||
"depends": ['account'],
|
||||
'data': [
|
||||
'data/account_chart_template_data.xml',
|
||||
'data/account.account.tag.csv',
|
||||
'data/account.account.template.csv',
|
||||
'data/account.tax.group.csv',
|
||||
'data/account_tax_template_data.xml',
|
||||
'data/account_fiscal_position_template_data.xml',
|
||||
'data/account.chart.template.csv',
|
||||
'data/account_chart_template_configuration_data.xml',
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
id,name,applicability
|
||||
account.account_tag_operating,CF: Үндсэн: Бусад,accounts
|
||||
account.account_tag_financing,CF: Хөрөнгө оруулалт: Бусад Урт хугацаат хөрөнгө,accounts
|
||||
account.account_tag_investing,CF: Санхүү: Ногдол ашиг,accounts
|
||||
account_tag_operating_product,CF: Үндсэн: Бараа үйлчилгээ,accounts
|
||||
account_tag_operating_loyalty,CF: Үндсэн: Эрхийн шимтгэл хураамж,accounts
|
||||
account_tag_operating_insurance,CF: Үндсэн: Нийгмийн Даатгал,accounts
|
||||
account_tag_operating_insurance2,CF: Үндсэн: Бусад Даатгал,accounts
|
||||
account_tag_operating_taxrefund,CF: Үндсэн: Татвар,accounts
|
||||
account_tag_operating_funding,CF: Үндсэн: Татаас санхүүжилт,accounts
|
||||
account_tag_operating_employee,CF: Үндсэн: Ажилчид,accounts
|
||||
account_tag_operating_cost,CF: Үндсэн: Ашиглалтын зардал,accounts
|
||||
account_tag_operating_transport,CF: Үндсэн: Түлш тээвэр сэлбэг,accounts
|
||||
account_tag_operating_interest,CF: Үндсэн: Зээлийн хүү,accounts
|
||||
account_tag_investing_fasset,CF: Хөрөнгө оруулалт: Үндсэн хөрөнгө,accounts
|
||||
account_tag_investing_iasset,CF: Хөрөнгө оруулалт: Биет бус хөрөнгө,accounts
|
||||
account_tag_investing_invest,CF: Хөрөнгө оруулалт: Хөрөнгө оруулалт,accounts
|
||||
account_tag_investing_loan,CF: Хөрөнгө оруулалт: Зээл урьдчилгаа,accounts
|
||||
account_tag_investing_interest,CF: Хөрөнгө оруулалт: Зээлийн хүү,accounts
|
||||
account_tag_investing_dividends,CF: Хөрөнгө оруулалт: Ногдол ашиг,accounts
|
||||
account_tag_financing_loan,"CF: Санхүү: Зээл, өрийн үнэт цаас",accounts
|
||||
account_tag_financing_rental,CF: Санхүү: Санхүүгийн түрээс,accounts
|
||||
account_tag_financing_stock,CF: Санхүү: Хувьцаа өмчийн бусад үнэт цаас,accounts
|
||||
account_tag_financing_donation,CF: Санхүү: Хандив,accounts
|
||||
account_tag_exchange,CF: Валютын ханшийн зөрүү,accounts
|
||||
vat_report_tag2,ТТ3а: НӨАТ-аас чөлөөлөгдөх борлуулалтын орлого (2),taxes
|
||||
vat_report_tag5,ТТ3a: Дотоодын зах зээлд борлуулсан барааны борлуулалтын орлого (5),taxes
|
||||
vat_report_tag6,ТТ3a: Бусад барааны борлуулалтын орлого (6),taxes
|
||||
vat_report_tag7,ТТ3a: Эрх борлуулсны орлого (7),taxes
|
||||
vat_report_tag8,ТТ3a: Татан буугдах үед үлдсэн барааны орлого (8),taxes
|
||||
vat_report_tag9,ТТ3a: Өрийн төлбөрт шилжүүлсэн барааны орлого (9),taxes
|
||||
vat_report_tag11,ТТ3a: Наториатын үйлчилгээний орлого (11),taxes
|
||||
vat_report_tag12,ТТ3a: Өрийн төлбөрт тооцсон ажил үйлчилгээний орлого (12),taxes
|
||||
vat_report_tag13,"ТТ3a: Цахилгаан, дулаан, ус, шуудан, холбооны үйлчилгээ үзүүлсний орлого (13)",taxes
|
||||
vat_report_tag14,"ТТ3a: Бараа түрээслүүлэх, эзэмшүүлэх, ашиглуулах үйлчилгээний орлого (14)",taxes
|
||||
vat_report_tag15,"ТТ3a: Байр түрээслүүлэх, эзэмшүүлэх, ашиглуулах үйлчилгээний орлого (15)",taxes
|
||||
vat_report_tag16,"ТТ3a: Үл хөдлөх, хөдлөх хөрөнгө түрээслүүлэх, эзэмшүүлэх ашиглуулах үйлчилгээий орлого (16)",taxes
|
||||
vat_report_tag17,"ТТ3a: Шинэ бүтээл, загвар, зохиогчийн эрх, барааны тэмдэг худалдсаны орлого (17)",taxes
|
||||
vat_report_tag18,"ТТ3a: Хонжворт сугалаа, төлбөрт таавар, бооцоот тоглоомын орлого (18)",taxes
|
||||
vat_report_tag19,ТТ3a: Зуучлалын үйлчилгээний орлого (19),taxes
|
||||
vat_report_tag20,"ТТ3a: Бусдаас авсан хүү, торгууль, алдангийн орлого (20)",taxes
|
||||
vat_report_tag21,ТТ3a: Хөрөнгийн үнэлгээний үйлчилгээний орлого (21),taxes
|
||||
vat_report_tag22,"ТТ3a: Төсвийн санхүүжилт, татаас, урамшууллын орлого (22)",taxes
|
||||
vat_report_tag23,"ТТ3a: Өмгөөлөл, хууль зүйн үйлчилгээний орлого (23)",taxes
|
||||
vat_report_tag24,"ТТ3a: Үсчин, гоо сайхан, засвар үйлчилгээ, угаалга, хими цэвэрлэгээний үйлчилгээний орлого (24)",taxes
|
||||
vat_report_tag25,ТТ3a: Хуулийн 13-т зааснаас бусад үйлчилгээний орлого (25),taxes
|
||||
vat_report_tag28,ТТ3a: Экспортонд гаргасан барааны борлуулалтын орлого (28),taxes
|
||||
vat_report_tag29,ТТ3a: Экспортолсон үйлчилгээний борлуулалтын орлого (29),taxes
|
||||
vat_report_tag33,"ТТ3а: Худалдан авсан нийт бараа, ажил үйлчилгээ (33)",taxes
|
||||
vat_report_tag35,"ТТ3a: НӨАТ-тэй авсан Импортын бараа, ажил үйлчилгээний худалдан авалт (35)",taxes
|
||||
vat_report_tag36,"ТТ3a: Дотоодын зах зээлээс НӨАТ-тэй авсан бараа, ажил, үйлчилгээ (36)",taxes
|
||||
vat_report_tag37,"ТТ3a: Суутган төлөгчөөр бүртгүүлэх үед НӨАТ-тэй авсан бараа, үйлчилгээ (37)",taxes
|
||||
vat_report_tag38,"ТТ3a: Мал аж ахуй, тариалан эрхлэгчээс НӨАТ-тэй авсан бараа, үйлчилгээ (38)",taxes
|
||||
vat_report_tag41,"ТТ3а: Суудлын автомашин, түүний эд анги сэлбэгт төлсөн НӨАТ (41)",taxes
|
||||
vat_report_tag42,"ТТ3а: Ажлын хэрэгцээнд зориулж авсан бараа, үйлчилгээнд төлсөн НӨАТ (42)",taxes
|
||||
vat_report_tag43,"ТТ3а: Үндсэн хөрөнгө бэлтгэхэд зориулж импортоор авсан бараа, үйлчилгээнд төлсөн НӨАТ (43)",taxes
|
||||
vat_report_tag44,"ТТ3а: Чөлөөлөгдөх үйлдвэрлэл, үйлчилгээнд зориулж авсан бараа, ажил, үйлчилгээнд төлсөн НӨАТ (44)",taxes
|
||||
vat_report_tag45,"ТТ3а: Хайгуулын ажил болон ашиглалтын өмнөх үйл ажиллагаанд зориулж импортоор авсан бараа, ажил, үйлчилгээнд төлсөн НӨАТ (45)",taxes
|
||||
vat_report_tag46,"ТТ3а: Импортоор оруулсан бусад хамааралгүй бараа, ажил, үйлчилгээнд төлсөн НӨАТ (46)",taxes
|
||||
vat_report_tag48,ТТ3а: Cанхүүгийн түрээсээр дотоодын зах зээлд борлуулсны орлого (48),taxes
|
||||
vat_report_tag49,"ТТ3а: Факторинг, форфайтинг хэлцлийн үйлчилгээний орлого (49)",taxes
|
||||
vat_report_tag51,ТТ3а: Санхүүгийн түрээсийн зүйлийг худалдан авахад төлсөн түрээсийн төлбөр (51),taxes
|
||||
vat_report_tag52,"ТТ3а: Факторинг, форфайтинг хэлцлийг авахад төлсөн төлбөр (52)",taxes
|
||||
vat_report_tag58,"ТТ3а: Борлуулалтын орлогын буцаалт, хөнгөлөлт (58)",accounts
|
||||
vat_report_tag59,"ТТ3а: Худалдан авалтын буцаалт, хөнгөлөлт (59)",accounts
|
||||
tax_report_tag2,ТТ02: Татвараас чөлөөлөгдөх орлого (2),accounts
|
||||
tax_report_tag5,ТТ02: Бусад орлогын дүн (5),accounts
|
||||
tax_report_tag7,ТТ02: Үндсэн ажил үйлчилгээний орлого (7),accounts
|
||||
tax_report_tag8,ТТ02: Туслах ажил үйлчилгээний орлого (8),accounts
|
||||
tax_report_tag9,"ТТ02: Хувьцаа, үнэт цаас борлуулсны орлого (9)",accounts
|
||||
tax_report_tag10,"ТТ02: Үнэ төлбөргүйгээр бусдаас авсан бараа, үйлчилгээ (10)",accounts
|
||||
tax_report_tag11,ТТ02: Биет бус хөрөнгө борлуулсны орлого (11),accounts
|
||||
tax_report_tag12,ТТ02: Техникийн зөвлөх үйлчилгээний орлого (12),accounts
|
||||
tax_report_tag13,"ТТ02: Гэрээний хүү, торгууль, хохирлын нөхөн төлбөрийн орлого (13)",accounts
|
||||
tax_report_tag14,ТТ02: Гадаад валютын ханшийн зөрүүгийн бодит орлого (14),accounts
|
||||
tax_report_tag15,ТТ02: Хөдлөх болон үл хөдлөх эд хөрөнгийн түрээсийн орлого (15),accounts
|
||||
tax_report_tag16,ТТ02: Хөдлөх эд хөрөнгө борлуулсны орлого (16),accounts
|
||||
tax_report_tag17,ТТ02: Албан татвар ногдох бусад орлого (17),accounts
|
||||
tax_report_tag22,ТТ02: Татвар ногдох орлогоос хасагдахгүй зардал (22),accounts
|
||||
tax_report_tag23,ТТ02: Татвар ногдох орлогыг бууруулах (23),accounts
|
||||
tax_report_tag25,ТТ02: Сайн дурын даатгалын хураамжийн хэтрэлт (25),accounts
|
||||
tax_report_tag27,ТТ02: Өмнөх жилийн татварын алдагдлаас тайлант хугацаанд шилжүүлсэн дүн (27),accounts
|
||||
tax_report_tag30,ТТ02: Татварын хөнгөлөлт (30),accounts
|
||||
tax_report_tag32,"ТТ02: Эротик хэвлэл, бичлэг, тоглолт борлуулалтын орлого (32)",accounts
|
||||
tax_report_tag34,"ТТ02: Таавар, бооцоот тоглоом, хонжворт сугалааны орлого (34)",accounts
|
||||
tax_report_tag35,"ТТ02: Таавар, бооцоот тоглоом, хонжворт сугалааны орлого олоход зарцуулсан зардал (35)",accounts
|
||||
tax_report_tag36,ТТ02: Хонжворт олгосон мөнгө болон барааны үнэ (36),accounts
|
||||
tax_report_tag39,ТТ02: Хүүгийн орлого (39),accounts
|
||||
tax_report_tag41,"ТТ02: Гадаад улсад олсон ногдол ашиг, хүүгийн орлого (41)",accounts
|
||||
tax_report_tag43,ТТ02: Гадаад улсад олсон орлого (43),accounts
|
||||
tax_report_tag46,ТТ02: Ногдол ашгийн орлого (46),accounts
|
||||
tax_report_tag48,ТТ02: Эрхийн шимтгэлийн орлого (48),accounts
|
||||
tax_report_tag50,ТТ02: Эрх борлуулсны орлого (50),accounts
|
||||
tax_report_tag52,ТТ02: Үл хөдлөх хөрөнгө борлуулсны орлого (52),accounts
|
||||
|
@@ -0,0 +1,285 @@
|
||||
id,code,name,user_type_id/id,tag_ids/id,reconcile,chart_template_id:id
|
||||
account_template_1001_0101,10010101,Бэлэн мөнгө,account.data_account_type_liquidity,,0,mn_chart_1
|
||||
account_template_1003_0101,10030101,Жижиг мөнгөн сан,account.data_account_type_liquidity,,0,mn_chart_1
|
||||
account_template_1101_0101,11010101,Банкинд байгаа мөнгө,account.data_account_type_liquidity,,0,mn_chart_1
|
||||
account_template_1103_0101,11030101,Хугацаагүй хадгаламж,account.data_account_type_liquidity,,0,mn_chart_1
|
||||
account_template_1104_0101,11040101,Банкны төлбөрийн темринал,account.data_account_type_liquidity,,0,mn_chart_1
|
||||
account_template_1109_0101,11090101,Замд яваа мөнгө,account.data_account_type_current_assets,,1,mn_chart_1
|
||||
account_template_1110_0101,11100101,Бусад мөнгө түүнтэй адилтгах хөрөнгө,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1201_0101,12010101,Худалдааны авлага ААН,account.data_account_type_receivable,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_1201_0201,12010201,Худалдааны авлага Хувь хүн,account.data_account_type_receivable,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_1201_0301,12010301,Худалдааны авлага Холбоотой тал,account.data_account_type_receivable,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_1202_0101,12020101,Авлагын бичиг,account.data_account_type_current_assets,account_tag_operating_product,0,mn_chart_1
|
||||
account_template_1203_0101,12030101,Найдваргүй авлагын хасагдуулга,account.data_account_type_current_assets,account_tag_operating_product,0,mn_chart_1
|
||||
account_template_1204_0101,12040101,Урьдчилж төлсөн ААНОАТатвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0201,12040201,Урьдчилж төлсөн ХХОАТатвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0301,12040301,Урьдчилж төлсөн НӨАТатвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0401,12040401,Урьдчилж төлсөн Гаалийн албан татвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0501,12040501,Урьдчилж төлсөн Үл хөдлөх хөрөнгийн албан татвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0601,12040601,Урьдчилж төлсөн Газрын төлбөр,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0701,12040701,Урьдчилж төлсөн АТӨЯХАТатвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0801,12040801,Урьдчилж төлсөн Агаарын бохирдлын татвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_0901,12040901,Урьдчилж төлсөн Онцгой албан татвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_1001,12041001,Урьдчилж төлсөн Байгалийн нөөц ашиглалтын төлбөр,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1204_9901,12049901,Урьдчилж төлсөн Бусад татвар,account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1205_0101,12050101,"Урьдчилж төлсөн ЭМ, НДШ",account.data_account_type_current_assets,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_1205_0201,12050201,Урьдчилж төлсөн Сайн дурын даатгалын хураамж,account.data_account_type_current_assets,account_tag_operating_insurance2,0,mn_chart_1
|
||||
account_template_1206_0101,12060101,"Цалингийн урьдчилгаа, богино хугацаат зээл",account.data_account_type_receivable,account_tag_operating_employee,1,mn_chart_1
|
||||
account_template_1206_0201,12060201,"Төлбөр, дутагдал",account.data_account_type_receivable,account_tag_operating_employee,1,mn_chart_1
|
||||
account_template_1206_0301,12060301,Худалдааны бус авлага ААН,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1206_0401,12060401,Худалдааны бус авлага Хувь хүн,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1206_0501,12060501,Худалдааны бус авлага Холбоотой тал,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1206_0601,12060601,Богино хугацаат зээлийн авлага ААН,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1206_0701,12060701,Богино хугацаат зээлийн авлага Хувь хүн,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1206_0801,12060801,Богино хугацаат зээлийн авлага Холбоотой тал,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1206_0901,12060901,Ногдол ашгийн авлага,account.data_account_type_receivable,account_tag_investing_dividends,1,mn_chart_1
|
||||
account_template_1206_1001,12061001,Барьцаалсан авлага,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1206_1101,12061101,Хүүний авлага,account.data_account_type_receivable,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_1206_1201,12061201,Үндсэн хөрөнгө худалдааны авлага,account.data_account_type_receivable,account_tag_investing_fasset,1,mn_chart_1
|
||||
account_template_1206_1301,12061301,Биет бус хөрөнгө худалдааны авлага,account.data_account_type_receivable,account_tag_investing_iasset,1,mn_chart_1
|
||||
account_template_1206_1401,12061401,Хөрөнгө оруулалт худалдааны авлага,account.data_account_type_receivable,account_tag_investing_invest,1,mn_chart_1
|
||||
account_template_1206_9901,12069901,Бусад худалдааны бус авлага,account.data_account_type_receivable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_1301_0101,13010101,Түргэн борлогдох үнэт цаас,account.data_account_type_current_assets,account.account_tag_financing,0,mn_chart_1
|
||||
account_template_1301_0201,13010201,Хугацаат хадгаламж,account.data_account_type_current_assets,account.account_tag_financing,0,mn_chart_1
|
||||
account_template_1302_0101,13020101,Бусад дэлгэрэнгүй орлого болох бодит үнэ цэнээр илэрхийлэх санхүүгийн хөрөнгө,account.data_account_type_current_assets,account.account_tag_operating,0,mn_chart_1
|
||||
account_template_1303_0101,13030101,Хорогдуулсан өртөгөөр илэрхийлэгдэх санхүүгийн өртөг,account.data_account_type_current_assets,account.account_tag_operating,0,mn_chart_1
|
||||
account_template_1401_0101,14010101,Агуулахад байгаа бараа материал,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1401_0401,14010401,Татан авалтын өртөгийн зөрүү,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1401_0701,14010701,Амьтан,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1401_0801,14010801,Мал,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1401_0901,14010901,Ургамал,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1402_0101,14020101,Агуулахад байгаа түүхий эд материал,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1403_0301,14030301,Агуулахад байгаа үндсэн хөрөнгийн хэсэг,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1403_0401,14030401,Агуулахад байгаа хангамжийн материал,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1403_0501,14030501,Ашиглалтанд байгаа хангамжийн материал,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1403_0502,14030502,Ашиглалтанд байгаа хангамжийн материалын элэгдэл,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1404_0101,14040101,Дуусаагүй үйлдвэрлэл - Шууд материал,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1404_0201,14040201,Дуусаагүй үйлдвэрлэл - Шууд хөдөлмөр,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1404_0301,14040301,Дуусаагүй үйлдвэрлэл - НЗ,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1404_0401,14040401,Хагас боловсруулсан бүтээгдэхүүн,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1405_0101,14050101,Агентад байгаа бараа,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1406_0101,14060101,Замд яваа бараа,account.data_account_type_current_assets,,0,mn_chart_1
|
||||
account_template_1407_0101,14070101,Ирж буй барааны өртөгийн түр данс,account.data_account_type_current_assets,,1,mn_chart_1
|
||||
account_template_1408_0101,14080101,Гарч буй барааны өртөгийн түр данс,account.data_account_type_current_assets,,1,mn_chart_1
|
||||
account_template_1501_0101,15010101,Урьдчилж төлсөн түрээс,account.data_account_type_prepayments,account_tag_operating_cost,0,mn_chart_1
|
||||
account_template_1501_0201,15010201,Урьдчилж төлсөн хураамж,account.data_account_type_prepayments,account_tag_operating_loyalty,0,mn_chart_1
|
||||
account_template_1501_0301,15010301,Урьдчилж төлсөн цалин,account.data_account_type_prepayments,account_tag_operating_employee,0,mn_chart_1
|
||||
account_template_1501_0901,15010901,Урьдчилж төлсөн бусад зардал,account.data_account_type_prepayments,account.account_tag_operating,0,mn_chart_1
|
||||
account_template_1502_0101,15020101,Бэлтгэн нийлүүлэгчид төлсөн урьдчилгаа,account.data_account_type_prepayments,account_tag_operating_product,0,mn_chart_1
|
||||
account_template_1502_0201,15020201,"Дараа тайлангийн урьдчилгаа, томилолт",account.data_account_type_prepayments,account_tag_operating_employee,0,mn_chart_1
|
||||
account_template_1502_0301,15020301,Үндсэн хөрөнгө худалдан авахад төлсөн урьдчилгаа,account.data_account_type_prepayments,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_1502_0401,15020401,Биет бус хөрөнгө худалдан авахад төлсөн урьдчилгаа,account.data_account_type_prepayments,account_tag_investing_iasset,0,mn_chart_1
|
||||
account_template_1502_0501,15020501,Хөрөнгө оруулалт худалдан авахад төлсөн урьдчилгаа,account.data_account_type_prepayments,account_tag_investing_invest,0,mn_chart_1
|
||||
account_template_1502_0601,15020601,Хангамжийн зүйлс худалдан авахад төлсөн урьдчилгаа,account.data_account_type_prepayments,account_tag_operating_product,0,mn_chart_1
|
||||
account_template_1502_0901,15020901,Бусад худалдааны бус урьдчилгаа,account.data_account_type_prepayments,account.account_tag_operating,0,mn_chart_1
|
||||
account_template_1601_0101,16010101,Бусад эргэлтийн хөрөнгө,account.data_account_type_current_assets,account.account_tag_operating,0,mn_chart_1
|
||||
account_template_1701_0101,17010101,Борлуулах зорилгоор эзэмшиж буй эргэлтийн бус хөрөнгө,account.data_account_type_current_assets,account.account_tag_operating,0,mn_chart_1
|
||||
account_template_2001_0101,20010101,Биет хөрөнгө - Газрын сайржуулалт,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2001_0201,20010201,Биет хөрөнгө - Газрын сайжруулалтын элэгдэл,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2002_0101,20020101,"Биет хөрөнгө - Барилга, байгууламж",account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2002_0201,20020201,"Биет хөрөнгө - Барилга, байгууламжын элэгдэл",account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2003_0101,20030101,Биет хөрөнгө - Машин тоног төхөөрөмж,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2003_0201,20030201,Биет хөрөнгө - Машин тоног төхөөрөмжийн элэгдэл,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2004_0101,20040101,Биет хөрөнгө - Тээврийн хэрэгсэл,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2004_0201,20040201,Биет хөрөнгө - Тээврийн хэрэгслийн элэгдэл,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2005_0101,20050101,Биет хөрөнгө - Тавилга эд хогшил,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2005_0201,20050201,Биет хөрөнгө - Тавилга эд хогшлын элэгдэл,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2006_0101,20060101,"Биет хөрөнгө - Компьютер, дагалдах хэрэгсэл",account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2006_0201,20060201,"Биет хөрөнгө - Компьютер, дагалдах хэрэгслийн элэгдэл",account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2008_0101,20080101,Биет хөрөнгө - Дуусаагүй барилга,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2008_0201,20080201,Биет хөрөнгө - Дуусаагүй барилгын элэгдэл,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2009_0101,20090101,Биет хөрөнгө - Бусад хөрөнгө,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2009_0201,20090201,Биет хөрөнгө - Бусад хөрөнгийн элэгдэл,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2101_0101,21010101,Биет бус хөрөнгө - Зохиогчийн эрх,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2101_0201,21010201,Биет бус хөрөнгө - Зохиогчийн эрхийн хорогдол,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2102_0101,21020101,Биет бус хөрөнгө - Програм хангамж,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2102_0201,21020201,Биет бус хөрөнгө - Програм хангамжын хорогдол,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2103_0101,21030101,Биет бус хөрөнгө - Патент,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2103_0201,21030201,Биет бус хөрөнгө - Патентын хорогдол,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2104_0101,21040101,Биет бус хөрөнгө - Барааны тэмдэг,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2104_0201,21040201,Биет бус хөрөнгө - Барааны тэмдэгийн хорогдол,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2105_0101,21050101,Биет бус хөрөнгө - Тусгай зөвшөөрөл,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2105_0201,21050201,Биет бус хөрөнгө - Тусгай зөвшөөрлийн хорогдол,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2109_0101,21090101,Биет бус хөрөнгө - Бусад хөрөнгө,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2109_0201,21090201,Биет бус хөрөнгө - Бусад хөрөнгийн элэгдэл,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2401_0101,24010101,Биологийн хөрөнгө - Мал амьтад,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2401_0201,24010201,Биологийн хөрөнгө - Мал амьтадын хорогдол,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2402_0101,24020101,Биологийн хөрөнгө - Ургамал,account.data_account_type_fixed_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2402_0201,24020201,Биологийн хөрөнгө - Ургамалын хорогдол,account.data_account_type_fixed_assets,,0,mn_chart_1
|
||||
account_template_2201_0101,22010101,Ашиг алдагдлаарх бодит үнэ цэнээр илэрхийлэх санхүүгийн хөрөнгө,account.data_account_type_non_current_assets,account_tag_investing_invest,0,mn_chart_1
|
||||
account_template_2204_0101,22040101,"Хараат компани, хамтарсан үйлдвэрт оруулсан хөрөнгө оруулалт",account.data_account_type_non_current_assets,account_tag_investing_invest,0,mn_chart_1
|
||||
account_template_2205_0101,22050101,Охин компанид оруулсан хөрөнгө оруулалт,account.data_account_type_non_current_assets,account_tag_investing_invest,0,mn_chart_1
|
||||
account_template_2301_0101,23010101,Хайгуул ба үнэлгээний хөрөнгө,account.data_account_type_non_current_assets,account_tag_investing_invest,0,mn_chart_1
|
||||
account_template_2501_0101,25010101,Хойшлогдсон татварын хөрөнгө,account.data_account_type_non_current_assets,account.account_tag_financing,0,mn_chart_1
|
||||
account_template_2601_0101,26010101,Хөрөнгө оруулалтын зориулалттай үндсэн хөрөнгө,account.data_account_type_non_current_assets,account_tag_investing_invest,0,mn_chart_1
|
||||
account_template_2601_0201,26010201,Үндсэн хөрөнгийн үнэ цэнийн бууралт,account.data_account_type_non_current_assets,account_tag_investing_fasset,0,mn_chart_1
|
||||
account_template_2701_0101,27010101,Урт хугацаат зээлийн авлага ААН,account.data_account_type_non_current_assets,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_2701_0201,27010201,Урт хугацаат зээлийн авлага Хувь хүн,account.data_account_type_non_current_assets,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_2701_0301,27010301,Урт хугацаат зээлийн авлага Холбоотой тал,account.data_account_type_non_current_assets,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_2709_0101,27090101,Бусад эргэлтийн бус хөрөнгө,account.data_account_type_non_current_assets,account.account_tag_financing,0,mn_chart_1
|
||||
account_template_3101_0101,31010101,Худалдааны БН-д өгөх өглөг ААН,account.data_account_type_payable,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_3101_0201,31010201,Худалдааны БН-д өгөх өглөг Хувь хүн,account.data_account_type_payable,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_3101_0301,31010301,Худалдааны БН-д өгөх өглөг Холбоотой тал,account.data_account_type_payable,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_3201_0101,32010101,Урьдчилж орсон худалдааны орлого,account.data_account_type_current_liabilities,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_3202_0101,32020101,Урьдчилж орсон түрээсийн орлого,account.data_account_type_current_liabilities,account_tag_operating_product,1,mn_chart_1
|
||||
account_template_3203_0101,32030101,Урьдчилж орсон зээлийн хүүгийн орлого,account.data_account_type_current_liabilities,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_3301_0101,33010101,Цалингийн өглөг,account.data_account_type_payable,account_tag_operating_employee,1,mn_chart_1
|
||||
account_template_3401_0101,34010101,Татварын өглөг - ААНОАТатвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0201,34010201,Татварын өглөг - НӨАТатвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0301,34010301,Татварын өглөг - ХХОАТатвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0401,34010401,Татварын өглөг - Гаалийн албан татвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0501,34010501,Татварын өглөг - Үл хөдлөх хөрөнгийн албан татвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0601,34010601,Татварын өглөг - Газрын албан татвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0701,34010701,Татварын өглөг - АТӨЯХАТатвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0801,34010801,Татварын өглөг - Агаарын бохирдлын татвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_0901,34010901,Татварын өглөг - Онцгой албан татвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_1001,34011001,Татварын өглөг - Байгалийн нөөц ашиглалтын татвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_1101,34011101,Татварын өглөг – НХАТатвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3401_9901,34019901,Татварын өглөг - Бусад татвар,account.data_account_type_current_liabilities,account_tag_operating_taxrefund,0,mn_chart_1
|
||||
account_template_3402_0101,34020101,"ЭМ, НДШ-ийн өглөг",account.data_account_type_current_liabilities,account_tag_operating_insurance,0,mn_chart_1
|
||||
account_template_3402_0201,34020201,Сайн дурын даатгалын өглөг,account.data_account_type_current_liabilities,account_tag_operating_insurance2,0,mn_chart_1
|
||||
account_template_3501_0101,35010101,Банкны богино хугацаат зээлийн өглөг,account.data_account_type_payable,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_3501_0201,35010201,ББСБ-ын богино хугацаат зээлийн өглөг,account.data_account_type_payable,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_3501_0301,35010301,Хувь хүний богино хугацаат зээлийн өглөг,account.data_account_type_payable,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_3502_0101,35020101,Банкны богино хугацаат зээлийн хүү,account.data_account_type_payable,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_3502_0201,35020201,ББСБ-ын богино хугацаат зээлийн хүү,account.data_account_type_payable,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_3502_0301,35020301,Хувь хүний богино хугацаат зээлийн хүү,account.data_account_type_payable,account_tag_operating_interest,1,mn_chart_1
|
||||
account_template_3601_0101,36010101,Ногдол ашгийн өглөг,account.data_account_type_current_liabilities,account_tag_investing_dividends,0,mn_chart_1
|
||||
account_template_3701_0101,37010101,Нөөц өр төлбөр,account.data_account_type_current_liabilities,account_tag_exchange,0,mn_chart_1
|
||||
account_template_3801_0101,38010101,Даатгалын өглөг,account.data_account_type_payable,account_tag_operating_insurance2,1,mn_chart_1
|
||||
account_template_3802_0101,38020101,Гишүүнчлэлийн өглөг,account.data_account_type_payable,account_tag_operating_loyalty,1,mn_chart_1
|
||||
account_template_3803_0101,38030101,Ажилчдад өгөх өглөг,account.data_account_type_payable,account_tag_operating_employee,1,mn_chart_1
|
||||
account_template_3804_0101,38040101,Хувь хүмүүст өгөх өглөг,account.data_account_type_payable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_3805_0101,38050101,"Баталгаа, барьцааны өглөг",account.data_account_type_payable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_3806_0101,38060101,Худалдааны бус бэлтгэн нийлүүлэгчид өгөх өглөг - ААН,account.data_account_type_payable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_3806_0201,38060201,Худалдааны бус бэлтгэн нийлүүлэгчид өгөх өглөг - Хувь хүн,account.data_account_type_payable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_3806_0301,38060301,Худалдааны бус бэлтгэн нийлүүлэгчид өгөх өглөг - Холбоотой тал,account.data_account_type_payable,account.account_tag_operating,1,mn_chart_1
|
||||
account_template_3806_0401,38060401,Худалдан авсан үндсэн хөрөнгийн өглөг,account.data_account_type_payable,account_tag_investing_fasset,1,mn_chart_1
|
||||
account_template_3806_0501,38060501,Худалдан авсан хөрөнгө оруулалтын өглөг,account.data_account_type_payable,account_tag_investing_fasset,1,mn_chart_1
|
||||
account_template_3809_0101,38090101,Бусад богино хугацаат өр төлбөр,account.data_account_type_current_liabilities,account.account_tag_operating,0,mn_chart_1
|
||||
account_template_3901_0101,39010101,Борлуулах зорилгоор эзэмшиж буй эргэлтийн бус хөрөнгөнд хамаарах өр,account.data_account_type_current_liabilities,account_tag_exchange,0,mn_chart_1
|
||||
account_template_4001_0101,40010101,Банкны урт хугацаат зээл,account.data_account_type_non_current_liabilities,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_4001_0201,40010201,ББСБ-ын урт хугацаат зээл,account.data_account_type_non_current_liabilities,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_4001_0301,40010301,Хувь хүнээс авсан урт хугацаат зээл,account.data_account_type_non_current_liabilities,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_4001_0401,40010401,Холбоотой талын урт хугацаат зээл,account.data_account_type_non_current_liabilities,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_4002_0101,40020101,Урт хугацаат нөөц өр төлбөр,account.data_account_type_non_current_liabilities,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_4003_0101,40030101,Хойшлогдсон татварын өр,account.data_account_type_non_current_liabilities,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_4009_0101,40090101,Бусад урт хугацаат өр төлбөр,account.data_account_type_non_current_liabilities,account_tag_investing_loan,0,mn_chart_1
|
||||
account_template_4101_0101,41010101,Эздийн өмч - төрийн,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4102_0101,41020101,Эздийн өмч - хувийн,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4103_0101,41030101,Эздийн өмч - хувьцаат,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4201_0101,42010101,Халаасны хувьцаа,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4301_0101,43010101,Нэмж төлөгдсөн капитал,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4401_0101,44010101,Хөрөнгийн дахин үнэлгээний нэмэгдэл,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4501_0101,45010101,Гадаад валютын хөрвүүлэлтийн нөөц,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4509_0101,45090101,Эздийн өмчийн бусад хэсэг,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4601_0101,46010101,Тайлант үеийн хуримтлагдсан ашиг,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_4601_0201,46010201,Өмнөх үеийн хуримтлагдсан ашиг,account.data_account_type_equity,,0,mn_chart_1
|
||||
account_template_5101_0101,51010101,Борлуулалтын орлого,account.data_account_type_revenue,"account_tag_operating_product,tax_report_tag7",0,mn_chart_1
|
||||
account_template_5101_0201,51010201,Борлуулалтын орлого (НӨАТ-с чөлөөлөгдөх),account.data_account_type_revenue,"account_tag_operating_product,tax_report_tag2",0,mn_chart_1
|
||||
account_template_5102_0101,51020101,Түрээсийн орлого,account.data_account_type_other_income,"account_tag_operating_product,tax_report_tag5",0,mn_chart_1
|
||||
account_template_5103_0101,51030101,Хүүний орлого,account.data_account_type_other_income,"account_tag_operating_interest,tax_report_tag39",0,mn_chart_1
|
||||
account_template_5104_0101,51040101,Ногдол ашгийн орлого,account.data_account_type_other_income,"account_tag_investing_dividends,tax_report_tag46",0,mn_chart_1
|
||||
account_template_5105_0101,51050101,Эрхийн шимтгэлийн орлого,account.data_account_type_other_income,"account_tag_operating_loyalty,tax_report_tag48",0,mn_chart_1
|
||||
account_template_5201_0101,52010101,Тооллогын зөрүүний олз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5201_0201,52010201,Тооллогын зөрүүний алдагдал,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5201_0901,52010901,Бусад дэлгэрэнгүй орлого,account.data_account_type_other_income,"account.account_tag_operating,tax_report_tag8",0,mn_chart_1
|
||||
account_template_5301_0101,53010101,Валютын ханшийн зөрүүний хэрэгжсэн олз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5301_0201,53010201,Валютын ханшийн зөрүүний хэрэгжээгүй олз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5302_0101,53020101,Валютын ханшийн зөрүүний хэрэгжсэн гарз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5302_0201,53020201,Валютын ханшийн зөрүүний хэрэгжээгүй гарз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5401_0101,54010101,Үндсэн хөрөнгө борлуулсны олз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5401_0201,54010201,Үндсэн хөрөнгө борлуулсны гарз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5501_0101,55010101,Биет бус хөрөнгө борлуулсны олз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5501_0201,55010201,Биет бус хөрөнгө борлуулсны гарз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5601_0101,56010101,Хөрөнгө оруулалт борлуулсны олз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5601_0201,56010201,Хөрөнгө оруулалт борлуулсны гарз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5701_0101,57010101,Үндсэн бус үйл ажиллагааны бусад олз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_5701_0201,57010201,Үндсэн бус үйл ажиллагааны бусад гарз,account.data_account_type_other_income,,0,mn_chart_1
|
||||
account_template_6001_0101,60010101,Борлуулалтын хөнгөлөлт,account.data_account_type_revenue,,0,mn_chart_1
|
||||
account_template_6002_0101,60020101,Борлуулалтын урамшуулал,account.data_account_type_revenue,,0,mn_chart_1
|
||||
account_template_6003_0101,60030101,Борлуулалтын буцаалт,account.data_account_type_revenue,,0,mn_chart_1
|
||||
account_template_6004_0101,60040101,Бэлнээр төлсөний хөнгөлөлт,account.data_account_type_revenue,,0,mn_chart_1
|
||||
account_template_6005_0101,60050101,Хугацаанаас өмнө төлсний хөнгөлөлт,account.data_account_type_revenue,,0,mn_chart_1
|
||||
account_template_6006_0101,60060101,Борлуулалтын үнийн бууралт,account.data_account_type_revenue,,0,mn_chart_1
|
||||
account_template_6101_0101,61010101,"Борлуулсан бараа, бүтээгдэхүүний өртөг",account.data_account_type_direct_costs,,0,mn_chart_1
|
||||
account_template_6102_0101,61020101,Борлуулсан үйлчилгээний өртөг,account.data_account_type_direct_costs,,0,mn_chart_1
|
||||
account_template_7001_0101,70010101,Удирд - Үндсэн цалингийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7001_0201,70010201,Удирд - Нэмэгдэл цалингийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0101,70020101,Удирд - ЭМД-ийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0201,70020201,Удирд - НДШ-ийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0301,70020301,Удирд - Банкны шимтгэл хураамжын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0401,70020401,Удирд - Гадаад томилолтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0402,70020402,Удирд - Дотоод томилолтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0501,70020501,Удирд - Бичиг хэргийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0601,70020601,Удирд - Шуудан холбооны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0602,70020602,Удирд - Суурин утасны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0603,70020603,Удирд - Үүрэн утасны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0604,70020604,Удирд - Интернетийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0701,70020701,Удирд - Мэргэжлийн үйлчилгээний зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0801,70020801,Удирд - Хүний нөөцийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_0901,70020901,Удирд - Сонин сэтгүүл захиалгын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1001,70021001,Удирд - Даатгалын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1101,70021101,Удирд - Ашиглалтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1201,70021201,Удирд - Засварын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1301,70021301,Удирд - Элэгдэл хорогдлын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1401,70021401,Удирд - Түрээсийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1501,70021501,Удирд - Харуул хамгаалалтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1601,70021601,Удирд - Цэвэрлэгээ үйлчилгээний зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1701,70021701,Удирд - Тээврийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1801,70021801,Удирд - Шатахууны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_1901,70021901,Удирд - Хүлээн авалтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_2001,70022001,Удирд - Зар сурталчилгааны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_2101,70022101,Удирд - Төсөл хөгжлийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_2201,70022201,"Удирд - Судалгаа, туршилтын зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_2301,70022301,"Удирд - Хүргэлт, түгээлтийн зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7002_9901,70029901,Удирд - Үйл ажиллагааны бусад зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7101_0101,71010101,Борл - Үндсэн цалингийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7101_0201,71010201,Борл - Нэмэгдэл цалингийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0101,71020101,Борл - ЭМД-ийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0201,71020201,Борл - НДШ-ийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0301,71020301,Борл - Банкны шимтгэл хураамжын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0401,71020401,Борл - Гадаад томилолтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0402,71020402,Борл - Дотоод томилолтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0501,71020501,Борл - Бичиг хэргийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0601,71020601,Борл - Шуудан холбооны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0602,71020602,Борл - Суурин утасны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0603,71020603,Борл - Үүрэн утасны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0604,71020604,Борл - Интернетийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0701,71020701,Борл - Мэргэжлийн үйлчилгээний зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0801,71020801,Борл - Хүний нөөцийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_0901,71020901,Борл - Сонин сэтгүүл захиалгын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1001,71021001,Борл - Даатгалын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1101,71021101,Борл - Ашиглалтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1201,71021201,Борл - Засварын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1301,71021301,Борл - Элэгдэл хорогдлын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1401,71021401,Борл - Түрээсийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1501,71021501,Борл - Харуул хамгаалалтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1601,71021601,Борл - Цэвэрлэгээ үйлчилгээний зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1701,71021701,Борл - Тээврийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1801,71021801,Борл - Шатахууны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_1901,71021901,Борл - Хүлээн авалтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_2001,71022001,Борл - Зар сурталчилгааны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_2101,71022101,Борл - Төсөл хөгжлийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_2201,71022201,"Борл - Судалгаа, туршилтын зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_2301,71022301,"Борл - Хүргэлт, түгээлтийн зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7102_9901,71029901,Борл - Үйл ажиллагааны бусад зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7201_0101,72010101,Эргэлтийн хөрөнгө санхүүжүүлэх зээлийн хүүгийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7202_0101,72020101,Үндсэн хөрөнгө санхүүжүүлэх зээлийн хүүгийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7203_0101,72030101,Төсөл санхүүжүүлэх зээлийн хүүгийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7301_0101,73010101,"Хайгуул, үнэлгээний зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7401_0101,74010101,"Алданги, торгуулийн зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7402_0101,74020101,"Хандив, тусламжийн зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7403_0101,74030101,Найдваргүй авлагын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7404_0101,74040101,Болзошгүй алдагдлын санд төвлөрүүлсэн хөрөнгийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7405_0101,74050101,Франчайзын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7406_0101,74060101,Банкны үйлчилгээний шимтгэлийн зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7407_0101,74070101,Хөрөнгө акталж устгасны зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7408_0101,74080101,Үйлдвэрийн ослын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7409_0101,74090101,"Туслах үйлдвэрлэл, үйлчилгээний зардал",account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7410_0101,74100101,Үндсэн хөрөнгийн үнэ цэнийн бууралтын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_7499_0101,74990101,Бусад ерөнхий зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_9101_0101,91010101,Тайлант үеийн орлогын албан татварын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_9102_0101,91020101,Хойшлогдсон татварын зардал,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_9103_0101,91030101,Татвар ногдохгүй бусад дэлгэрэнгүй орлого,account.data_account_type_expenses,,0,mn_chart_1
|
||||
account_template_9301_0101,93010101,Эхний үлдэгдлийн эх үүсвэр,account.data_unaffected_earnings,,0,mn_chart_1
|
||||
|
@@ -0,0 +1,2 @@
|
||||
id,property_account_receivable_id/id,property_account_payable_id/id,property_account_expense_categ_id/id,property_account_income_categ_id/id,income_currency_exchange_account_id/id,expense_currency_exchange_account_id/id
|
||||
mn_chart_1,account_template_1201_0201,account_template_3101_0201,account_template_7002_1101,account_template_5101_0201,account_template_5301_0201,account_template_5302_0201
|
||||
|
@@ -0,0 +1,7 @@
|
||||
id,name,sequence
|
||||
account_tax_group1,НӨАТ ногдох бараа,10
|
||||
account_tax_group2,НӨАТ ногдох үйлчилгээ,10
|
||||
account_tax_group3,Экспортын борлуулалт,11
|
||||
account_tax_group4,"Худалдан авсан бараа, үйлчилгээ",12
|
||||
account_tax_group5,Санхүүгийн түрээсийн зүйл,13
|
||||
account_tax_group6,НӨАТ-с чөлөөлөгдөх,14
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<function model="account.chart.template" name="try_loading_for_current_company">
|
||||
<value eval="[ref('l10n_mn.mn_chart_1')]"/>
|
||||
</function>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<menuitem id="account_reports_mn_statements_menu" name="Mongolia" parent="account.menu_finance_reports" sequence="0" groups="account.group_account_user"/>
|
||||
|
||||
<record id="mn_chart_1" model="account.chart.template">
|
||||
<field name="name">Mongolia</field>
|
||||
<field name="bank_account_code_prefix">11</field>
|
||||
<field name="cash_account_code_prefix">10</field>
|
||||
<field name="transfer_account_code_prefix">1109</field>
|
||||
<field name="code_digits">8</field>
|
||||
<field name="currency_id" ref="base.MNT"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,399 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- = = = = = = = = = = = = = = = -->
|
||||
<!-- Fiscal Position Templates -->
|
||||
<!-- = = = = = = = = = = = = = = = -->
|
||||
<record id="fiscal_position_vat0" model="account.fiscal.position.template">
|
||||
<field name="name">Дотоодын борлуулалт - Худалдан авалт</field>
|
||||
<field name="chart_template_id" ref="mn_chart_1"/>
|
||||
<field name="auto_apply" eval="True" />
|
||||
<field name="country_id" ref="base.mn"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_vat2" model="account.fiscal.position.template">
|
||||
<field name="name">НӨАТ 0% (3000000)</field>
|
||||
<field name="chart_template_id" ref="mn_chart_1"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_vat3" model="account.fiscal.position.template">
|
||||
<field name="name">НӨАТ-гүй (2000000)</field>
|
||||
<field name="chart_template_id" ref="mn_chart_1"/>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_position_vat4" model="account.fiscal.position.template">
|
||||
<field name="name">Гадаад борлуулалт - Худалдан авалт</field>
|
||||
<field name="chart_template_id" ref="mn_chart_1"/>
|
||||
<field name="auto_apply" eval="True" />
|
||||
</record>
|
||||
|
||||
<!-- = = = = = = = = = = = = = = = -->
|
||||
<!-- Fiscal Position Tax Templates -->
|
||||
<!-- = = = = = = = = = = = = = = = -->
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat1" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat1" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat4" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat4" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat5" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat5" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat6" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat6" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat7" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat7" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat8" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat8" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat9" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat9" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat10" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat10" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat11" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat11" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat12" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat12" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat13" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat13" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat14" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat14" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat15" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat15" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat16" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat16" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat17" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat17" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat18" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat18" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat19" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat19" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat20" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat20" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat21" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat21" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat2_sale_vat22" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat2" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat22" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat2" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat1" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat1" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat4" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat4" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat5" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat5" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat6" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat6" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat7" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat7" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat8" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat8" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat9" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat9" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat10" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat10" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat11" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat11" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat12" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat12" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat13" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat13" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat14" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat14" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat15" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat15" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat16" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat16" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat17" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat17" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat18" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat18" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat19" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat19" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat20" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat20" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat21" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat21" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat22" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat3" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat22" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat3" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat1" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat1" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat23" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat4" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat4" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat23" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat5" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat5" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat23" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat6" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat6" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat23" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat7" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat7" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat23" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat8" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat8" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat9" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat9" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat10" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat10" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat11" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat11" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat12" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat12" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat13" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat13" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat14" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat14" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat15" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat15" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat16" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat16" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat17" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat17" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat18" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat18" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat19" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat19" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat20" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat20" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat21" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat21" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_sale_vat22" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_sale_vat22" />
|
||||
<field name="tax_dest_id" ref="account_tax_sale_vat24" />
|
||||
</record>
|
||||
|
||||
<record id="fp_tax_template_vat3_purchase_vat1" model="account.fiscal.position.tax.template">
|
||||
<field name="position_id" ref="fiscal_position_vat4" />
|
||||
<field name="tax_src_id" ref="account_tax_purchase_vat1" />
|
||||
<field name="tax_dest_id" ref="account_tax_purchase_vat2" />
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -479,25 +479,25 @@
|
||||
<field name='name'>119.01 IVA pendiente de pago</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_119_02' model='account.account.tag'>
|
||||
<field name='name'>119.02 IVA de importación pendiente de pago</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_119_03' model='account.account.tag'>
|
||||
<field name='name'>119.03 IEPS pendiente de pago</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_119_04' model='account.account.tag'>
|
||||
<field name='name'>119.04 IEPS pendiente de pago en importación</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_120_01' model='account.account.tag'>
|
||||
<field name='name'>120.01 Anticipo a proveedores nacional</field>
|
||||
@@ -917,7 +917,7 @@
|
||||
<field name='name'>180.01 Crédito mercantil</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_181_01' model='account.account.tag'>
|
||||
<field name='name'>181.01 Gastos de instalación</field>
|
||||
@@ -2423,7 +2423,7 @@
|
||||
<field name='name'>503 Devoluciones, descuentos o bonificaciones sobre compras</field>
|
||||
<field name='color'>1</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>D</field>
|
||||
<field name='nature'>A</field>
|
||||
</record>
|
||||
<record id='account_tag_503_01' model='account.account.tag'>
|
||||
<field name='name'>503.01 Devoluciones, descuentos o bonificaciones sobre compras</field>
|
||||
@@ -2585,13 +2585,13 @@
|
||||
<field name='name'>505.01 Costo por venta de activo fijo</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_505_02' model='account.account.tag'>
|
||||
<field name='name'>505.02 Costo por baja de activo fijo</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_601_01' model='account.account.tag'>
|
||||
<field name='name'>601.01 Sueldos y salarios</field>
|
||||
@@ -4781,7 +4781,7 @@
|
||||
<field name='name'>607.01 Participación de los trabajadores en las utilidades</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_608_01' model='account.account.tag'>
|
||||
<field name='name'>608.01 Participación en resultados de subsidiarias</field>
|
||||
@@ -4799,7 +4799,7 @@
|
||||
<field name='name'>610.01 Participación de los trabajadores en las utilidades diferida</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_611_01' model='account.account.tag'>
|
||||
<field name='name'>611.01 Impuesto Sobre la renta</field>
|
||||
@@ -4817,7 +4817,7 @@
|
||||
<field name='name'>612.01 Gastos no deducibles para CUFIN</field>
|
||||
<field name='color'>4</field>
|
||||
<field name='applicability'>accounts</field>
|
||||
<field name='nature'>A</field>
|
||||
<field name='nature'>D</field>
|
||||
</record>
|
||||
<record id='account_tag_613_01' model='account.account.tag'>
|
||||
<field name='name'>613.01 Depreciación de edificios</field>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2017 Paradigm Digital (<http://www.paradigmdigital.co.za>).
|
||||
|
||||
{
|
||||
'name': 'South Africa - Accounting',
|
||||
'version': '1.0',
|
||||
'category': 'Localization',
|
||||
'description': """
|
||||
This is the latest basic South African localisation necessary to run Odoo in ZA:
|
||||
================================================================================
|
||||
- a generic chart of accounts
|
||||
- SARS VAT Ready Structure""",
|
||||
'author': 'Paradigm Digital',
|
||||
'website': 'https://www.paradigmdigital.co.za',
|
||||
'depends': ['account', 'base_vat'],
|
||||
'data': [
|
||||
'data/account_tax_report_data.xml',
|
||||
'data/account.tax.group.csv',
|
||||
'data/account_chart_template_data.xml',
|
||||
'data/account.account.template.csv',
|
||||
'data/account_tax_template_data.xml',
|
||||
'data/account_chart_template_post_data.xml',
|
||||
'data/account_chart_template_configure_data.xml',
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
id,name,applicability
|
||||
tag_ST1,ST1,taxes
|
||||
tag_ST1A,ST1A,taxes
|
||||
tag_ST2,ST2,taxes
|
||||
tag_ST2A,ST2A,taxes
|
||||
tag_ST3,ST3,taxes
|
||||
tag_ST5,ST5,taxes
|
||||
tag_ST7,ST7,taxes
|
||||
tag_ST10,ST10,taxes
|
||||
tag_ST12,ST12,taxes
|
||||
tag_PT14,PT14,taxes
|
||||
tag_PT14A,PT14A,taxes
|
||||
tag_PT15,PT15,taxes
|
||||
tag_PT15A,PT15A,taxes
|
||||
tag_PT16,PT16,taxes
|
||||
tag_PT17,PT17,taxes
|
||||
tag_PT18,PT18,taxes
|
||||
|
@@ -0,0 +1,111 @@
|
||||
id,code,name,user_type_id/id,reconcile,chart_template_id/id
|
||||
100020,100020,Stock Valuation Account,account.data_account_type_current_assets,True,default_chart_template
|
||||
100030,100030,Stock Work In Progress,account.data_account_type_current_assets,False,default_chart_template
|
||||
100040,100040,Stock Finished Goods,account.data_account_type_current_assets,False,default_chart_template
|
||||
100050,100050,Stock Delivered Control Account,account.data_account_type_current_assets,True,default_chart_template
|
||||
100060,100060,Purchase Tax Control Account,account.data_account_type_current_assets,False,default_chart_template
|
||||
100070,100070,Other Current Assets,account.data_account_type_current_assets,False,default_chart_template
|
||||
110010,110010,Debtors Control Account,account.data_account_type_receivable,True,default_chart_template
|
||||
110020,110020,Sundry Debtors,account.data_account_type_receivable,True,default_chart_template
|
||||
124010,124010,Credit Card Merchant Account,account.data_account_type_liquidity,False,default_chart_template
|
||||
126010,126010,Cash In Hand,account.data_account_type_liquidity,False,default_chart_template
|
||||
130010,130010,Prepayments,account.data_account_type_prepayments,False,default_chart_template
|
||||
140010,140010,Software,account.data_account_type_fixed_assets,False,default_chart_template
|
||||
140020,140020,Patents & Trademarks,account.data_account_type_fixed_assets,False,default_chart_template
|
||||
140030,140030,Fixtures & Fittings,account.data_account_type_fixed_assets,False,default_chart_template
|
||||
140040,140040,Land & Buildings,account.data_account_type_fixed_assets,False,default_chart_template
|
||||
140050,140050,Motor Vehicles,account.data_account_type_fixed_assets,False,default_chart_template
|
||||
140060,140060,Office Equipment (incl computer equipment),account.data_account_type_fixed_assets,False,default_chart_template
|
||||
140070,140070,Plant & Machinery,account.data_account_type_fixed_assets,False,default_chart_template
|
||||
150010,150010,Non-current assets,account.data_account_type_non_current_assets,False,default_chart_template
|
||||
200010,200010,Stock Received Control Account,account.data_account_type_current_liabilities,True,default_chart_template
|
||||
200020,200020,Sundry Creditors,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200030,200030,Other Creditors,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200040,200040,Accruals,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200050,200050,Bad debt provision,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200060,200060,Sales Tax Control Account,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200070,200070,Manual Adjustments & VAT,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200080,200080,Loans,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200090,200090,Hire Purchase,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
200100,200100,Mortgages,account.data_account_type_current_liabilities,False,default_chart_template
|
||||
210010,210010,Company Credit Card,account.data_account_type_credit_card,False,default_chart_template
|
||||
220010,220010,Creditors Control Account,account.data_account_type_payable,True,default_chart_template
|
||||
220020,220020,SARS - VAT Account,account.data_account_type_payable,True,default_chart_template
|
||||
220030,220030,P.A.Y.E. & UIF,account.data_account_type_payable,True,default_chart_template
|
||||
220040,220040,Net Wages,account.data_account_type_payable,True,default_chart_template
|
||||
220050,220050,Pension Fund,account.data_account_type_payable,True,default_chart_template
|
||||
220060,220060,Corporation Tax,account.data_account_type_payable,True,default_chart_template
|
||||
300010,300010,Called up share capital,account.data_account_type_equity,False,default_chart_template
|
||||
300020,300020,Share premium account,account.data_account_type_equity,False,default_chart_template
|
||||
300030,300030,Revaluation reserve,account.data_account_type_equity,False,default_chart_template
|
||||
300040,300040,Other reserves,account.data_account_type_equity,False,default_chart_template
|
||||
300050,300050,Capital,account.data_account_type_equity,False,default_chart_template
|
||||
300060,300060,Dividends,account.data_account_type_equity,False,default_chart_template
|
||||
300070,300070,Drawings,account.data_account_type_equity,False,default_chart_template
|
||||
400010,400010,Undistributed Profits/Losses,account.data_unaffected_earnings,False,default_chart_template
|
||||
500010,500010,Sales category 1,account.data_account_type_revenue,False,default_chart_template
|
||||
500020,500020,Sales category 2,account.data_account_type_revenue,False,default_chart_template
|
||||
500030,500030,Sales category 3,account.data_account_type_revenue,False,default_chart_template
|
||||
500040,500040,Sales category 4,account.data_account_type_revenue,False,default_chart_template
|
||||
500050,500050,Bank Interest received,account.data_account_type_revenue,False,default_chart_template
|
||||
500060,500060,Investment Interest received,account.data_account_type_revenue,False,default_chart_template
|
||||
500070,500070,Profits/Losses on disposals of assets,account.data_account_type_revenue,False,default_chart_template
|
||||
500080,500080,Rental Income,account.data_account_type_revenue,False,default_chart_template
|
||||
510010,510010,Other Income,account.data_account_type_other_income,False,default_chart_template
|
||||
600010,600010,Cost of sales 1,account.data_account_type_direct_costs,False,default_chart_template
|
||||
600020,600020,Cost of sales 2,account.data_account_type_direct_costs,False,default_chart_template
|
||||
600030,600030,Cost of sales 3,account.data_account_type_direct_costs,False,default_chart_template
|
||||
600040,600040,Cost of sales 4,account.data_account_type_direct_costs,False,default_chart_template
|
||||
610010,610010,Marketing,account.data_account_type_expenses,False,default_chart_template
|
||||
610020,610020,Exhibitions and events,account.data_account_type_expenses,False,default_chart_template
|
||||
610030,610030,PR,account.data_account_type_expenses,False,default_chart_template
|
||||
610040,610040,Distribution vehicles,account.data_account_type_expenses,False,default_chart_template
|
||||
610050,610050,Distribution salaries and wages,account.data_account_type_expenses,False,default_chart_template
|
||||
610060,610060,Shipping,account.data_account_type_expenses,False,default_chart_template
|
||||
610070,610070,Directors pension,account.data_account_type_expenses,False,default_chart_template
|
||||
610080,610080,Directors remuneration,account.data_account_type_expenses,False,default_chart_template
|
||||
610090,610090,Gross Salaries,account.data_account_type_expenses,False,default_chart_template
|
||||
610100,610100,Employers SDL & UIF,account.data_account_type_expenses,False,default_chart_template
|
||||
610110,610110,Subcontractors payments,account.data_account_type_expenses,False,default_chart_template
|
||||
610120,610120,Rent and rates,account.data_account_type_expenses,False,default_chart_template
|
||||
610130,610130,Light / heat and power,account.data_account_type_expenses,False,default_chart_template
|
||||
610140,610140,Repairs and maintenance,account.data_account_type_expenses,False,default_chart_template
|
||||
610150,610150,Car hire,account.data_account_type_expenses,False,default_chart_template
|
||||
610160,610160,Car fuel,account.data_account_type_expenses,False,default_chart_template
|
||||
610170,610170,Car maintenance,account.data_account_type_expenses,False,default_chart_template
|
||||
610180,610180,Telephone,account.data_account_type_expenses,False,default_chart_template
|
||||
610190,610190,Internet & hosting,account.data_account_type_expenses,False,default_chart_template
|
||||
610200,610200,Mobiles,account.data_account_type_expenses,False,default_chart_template
|
||||
610210,610210,Stationery,account.data_account_type_expenses,False,default_chart_template
|
||||
610220,610220,Office consumables,account.data_account_type_expenses,False,default_chart_template
|
||||
610230,610230,Postage and Carriage,account.data_account_type_expenses,False,default_chart_template
|
||||
610240,610240,Books,account.data_account_type_expenses,False,default_chart_template
|
||||
610250,610250,Network costs,account.data_account_type_expenses,False,default_chart_template
|
||||
610260,610260,Software expenses,account.data_account_type_expenses,False,default_chart_template
|
||||
610270,610270,Other computer costs,account.data_account_type_expenses,False,default_chart_template
|
||||
610280,610280,Recruitment fees,account.data_account_type_expenses,False,default_chart_template
|
||||
610290,610290,Other admin expenses,account.data_account_type_expenses,False,default_chart_template
|
||||
610300,610300,Accounting,account.data_account_type_expenses,False,default_chart_template
|
||||
610310,610310,Auditing,account.data_account_type_expenses,False,default_chart_template
|
||||
610320,610320,Consultancy,account.data_account_type_expenses,False,default_chart_template
|
||||
610330,610330,Legal and professional charges,account.data_account_type_expenses,False,default_chart_template
|
||||
610340,610340,Exchange gains/losses,account.data_account_type_expenses,False,default_chart_template
|
||||
610350,610350,Other sundry expenses,account.data_account_type_expenses,False,default_chart_template
|
||||
610360,610360,Bad debts,account.data_account_type_expenses,False,default_chart_template
|
||||
610370,610370,Interest paid,account.data_account_type_expenses,False,default_chart_template
|
||||
610380,610380,Bank Charges,account.data_account_type_expenses,False,default_chart_template
|
||||
610390,610390,Donations,account.data_account_type_expenses,False,default_chart_template
|
||||
610400,610400,Entertaining,account.data_account_type_expenses,False,default_chart_template
|
||||
610410,610410,Insurance,account.data_account_type_expenses,False,default_chart_template
|
||||
610420,610420,Travel and subsistence,account.data_account_type_expenses,False,default_chart_template
|
||||
610430,610430,Corporation tax expense,account.data_account_type_expenses,False,default_chart_template
|
||||
610440,610440,Foreign Exchange Gains/Losses,account.data_account_type_expenses,False,default_chart_template
|
||||
610450,610450,Price Differences Control Account,account.data_account_type_expenses,False,default_chart_template
|
||||
610460,610460,Cash Register Gains/Losses,account.data_account_type_expenses,False,default_chart_template
|
||||
620010,620010,Software Depreciation,account.data_account_type_depreciation,False,default_chart_template
|
||||
620020,620020,Patents & Trademarks Depreciation,account.data_account_type_depreciation,False,default_chart_template
|
||||
620030,620030,Fixtures and fittings Depreciation,account.data_account_type_depreciation,False,default_chart_template
|
||||
620040,620040,Land and buildings Depreciation,account.data_account_type_depreciation,False,default_chart_template
|
||||
620050,620050,Motor vehicles Depreciation,account.data_account_type_depreciation,False,default_chart_template
|
||||
620060,620060,Office equipment (inc computer equipment) Depreciation,account.data_account_type_depreciation,False,default_chart_template
|
||||
620070,620070,Plant and machinery Depreciation,account.data_account_type_depreciation,False,default_chart_template
|
||||
|
@@ -0,0 +1,3 @@
|
||||
id,name
|
||||
tax_group_0,VAT 0%
|
||||
tax_group_1,VAT 15%
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<function model="account.chart.template" name="try_loading_for_current_company">
|
||||
<value eval="[ref('l10n_za.default_chart_template')]"/>
|
||||
</function>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<menuitem id="account_reports_za_statements_menu" name="South Africa" parent="account.menu_finance_reports" sequence="0" groups="account.group_account_user"/>
|
||||
|
||||
<record id="default_chart_template" model="account.chart.template">
|
||||
<field name="name">South African Tax and Account Chart Template (by Paradigm Digital)</field>
|
||||
<field name="bank_account_code_prefix">1200</field>
|
||||
<field name="cash_account_code_prefix">1250</field>
|
||||
<field name="transfer_account_code_prefix">1010</field>
|
||||
<field name="code_digits">6</field>
|
||||
<field name="currency_id" ref="base.ZAR"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="default_chart_template" model="account.chart.template">
|
||||
<field name="property_account_receivable_id" ref="110010"/>
|
||||
<field name="property_account_payable_id" ref="220010"/>
|
||||
<field name="property_account_expense_categ_id" ref="600010"/>
|
||||
<field name="property_account_income_categ_id" ref="500010"/>
|
||||
<field name="property_stock_account_input_categ_id" ref="200010"/>
|
||||
<field name="property_stock_account_output_categ_id" ref="100050"/>
|
||||
<field name="property_stock_valuation_account_id" ref="100020"/>
|
||||
<field name="income_currency_exchange_account_id" ref="610440"/>
|
||||
<field name="expense_currency_exchange_account_id" ref="610440"/>
|
||||
<field name="use_anglo_saxon" eval="True"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,248 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="total_vat_payable" model="account.tax.report.line">
|
||||
<field name="name">[20] VAT PAYABLE/REFUNDABLE (Total A - Total B)</field>
|
||||
<field name="formula"> (VAT4 + VAT4A + (SEC6 * 60/100 + SEC7) + VAT11 + VAT12) - (VAT14 + VAT14A + VAT15 + VAT16 + VAT17 + VAT18)</field>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
<field name="sequence" eval="1"/>
|
||||
</record>
|
||||
|
||||
<record id="total_output_tax" model="account.tax.report.line">
|
||||
<field name="name">[13] Total A: TOTAL OUTPUT TAX (4 + 4A + 9 + 11 + 12)</field>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="formula">VAT4 + VAT4A + (SEC6 * 60/100 + SEC7) + VAT11 + VAT12</field>
|
||||
<field name="parent_id" ref='total_vat_payable'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="total_input_tax" model="account.tax.report.line">
|
||||
<field name="name">[19] Total B: TOTAL INPUT TAX (14 + 14A + 15 + 16 + 17 + 18)</field>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="formula">VAT14 + VAT14A + VAT15 + VAT16 + VAT17 + VAT18</field>
|
||||
<field name="parent_id" ref='total_vat_payable'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="standard_rate_exclude_capital_goods_service" model="account.tax.report.line">
|
||||
<field name="name">[1] Standard Rate (Excluding Capital goods and/or services and accomodation)</field>
|
||||
<field name="tag_name">[1] Standard Rate (Excluding Capital goods and/or services and accomodation)</field>
|
||||
<field name="code">VAT1</field>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_on_standard_rate_exclude_capital_goods_service" model="account.tax.report.line">
|
||||
<field name="name">[4] x 15/ (100 + 15)</field>
|
||||
<field name="tag_name">[4] x 15/ (100 + 15)</field>
|
||||
<field name="code">VAT4</field>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="standard_rate_only_capital_goods_service" model="account.tax.report.line">
|
||||
<field name="name">[1A] Standard Rate (Only Capital goods and/or services)</field>
|
||||
<field name="tag_name">[1A] Standard Rate (Only Capital goods and/or services)</field>
|
||||
<field name="code">VAT1A</field>
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_on_standard_rate_only_capital_goods_service" model="account.tax.report.line">
|
||||
<field name="name">[4A] x 15/ (100 + 15)</field>
|
||||
<field name="tag_name">[4A] x 15/ (100 + 15)</field>
|
||||
<field name="code">VAT4A</field>
|
||||
<field name="sequence" eval="5"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="zero_rate_exclude_goods_exported" model="account.tax.report.line">
|
||||
<field name="name">[2] Zero Rate (excluding goods exported)</field>
|
||||
<field name="tag_name">[2] Zero Rate (excluding goods exported)</field>
|
||||
<field name="code">VAT2</field>
|
||||
<field name="sequence" eval="6"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="zero_rate_only_goods_exported" model="account.tax.report.line">
|
||||
<field name="name">[2A] Zero Rate (Only goods exported)</field>
|
||||
<field name="tag_name">[2A] Zero Rate (Only goods exported)</field>
|
||||
<field name="code">VAT2A</field>
|
||||
<field name="sequence" eval="7"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="exempt_and_non_supplies" model="account.tax.report.line">
|
||||
<field name="name">[3] Exempt and Non supplies</field>
|
||||
<field name="tag_name">[3] Exempt and Non supplies</field>
|
||||
<field name="code">VAT3</field>
|
||||
<field name="sequence" eval="8"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="accomodation_exceeding_28_days" model="account.tax.report.line">
|
||||
<field name="name">[5] Accomodation exceeding 28 days</field>
|
||||
<field name="tag_name">[5] Accomodation exceeding 28 days</field>
|
||||
<field name="code">VAT5</field>
|
||||
<field name="sequence" eval="9"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="accomodation_exceeding_28_days_60_percent" model="account.tax.report.line">
|
||||
<field name="name">[6] x 60%</field>
|
||||
<field name="sequence" eval="11"/>
|
||||
<field name="formula"> VAT5 * 60 / 100</field>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="accomodation_under_28_days" model="account.tax.report.line">
|
||||
<field name="name">[7] Accomodation under 28 days</field>
|
||||
<field name="tag_name">[7] Accomodation under 28 days</field>
|
||||
<field name="code">VAT7</field>
|
||||
<field name="sequence" eval="12"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="accomodation_28_days" model="account.tax.report.line">
|
||||
<field name="name">[8] Total (6 + 7)</field>
|
||||
<field name="sequence" eval="14"/>
|
||||
<field name="formula">(VAT5 * 60 / 100) + VAT7</field>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_on_accomodation_28_days" model="account.tax.report.line">
|
||||
<field name="name">[9] x 15 / (100 ??) </field>
|
||||
<field name="sequence" eval="15"/>
|
||||
<field name="formula"> SEC6 * 60/100 + SEC7 </field>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_on_accomodation_exceeding_28_days" model="account.tax.report.line">
|
||||
<field name="name">VAT on Accomodation exceeding 28 days</field>
|
||||
<field name="tag_name">VAT on Accomodation exceeding 28 days</field>
|
||||
<field name="code">SEC6</field>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="parent_id" ref='vat_on_accomodation_28_days'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_on_accomodation_under_28_days" model="account.tax.report.line">
|
||||
<field name="name">VAT on Accomodation under 28 days</field>
|
||||
<field name="tag_name">VAT on Accomodation under 28 days</field>
|
||||
<field name="code">SEC7</field>
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="parent_id" ref='vat_on_accomodation_28_days'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_plus_base_of_second_hand_goods_export" model="account.tax.report.line">
|
||||
<field name="name">[10] Change in use and export of second-hand goods</field>
|
||||
<field name="sequence" eval="17"/>
|
||||
<field name="formula"> VAT10a + VAT11</field>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="second_hand_goods_export" model="account.tax.report.line">
|
||||
<field name="name">[10] Base Amount: Change in use and export of second-hand goods</field>
|
||||
<field name="tag_name">[10] Change in use and export of second-hand goods</field>
|
||||
<field name="code">VAT10a</field>
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="parent_id" ref='vat_plus_base_of_second_hand_goods_export'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="vat_on_second_hand_goods_export" model="account.tax.report.line">
|
||||
<field name="name">[11] x 15 / (100 + 15)</field>
|
||||
<field name="tag_name">[11] x 15 / (100 + 15)</field>
|
||||
<field name="code">VAT11</field>
|
||||
<field name="sequence" eval="18"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="other_imported_services" model="account.tax.report.line">
|
||||
<field name="name">[12] Other and imported services</field>
|
||||
<field name="tag_name">[12] Other and imported services</field>
|
||||
<field name="code">VAT12</field>
|
||||
<field name="sequence" eval="19"/>
|
||||
<field name="parent_id" ref='total_output_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="capital_goods_services_supplied" model="account.tax.report.line">
|
||||
<field name="name">[14] Capital Goods and/or services supplied to you</field>
|
||||
<field name="tag_name">[14] Capital Goods and/or services supplied to you</field>
|
||||
<field name="code">VAT14</field>
|
||||
<field name="sequence" eval="21"/>
|
||||
<field name="parent_id" ref='total_input_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="capital_goods_imported" model="account.tax.report.line">
|
||||
<field name="name">[14A] Capital Goods imported by you</field>
|
||||
<field name="tag_name">[14A] Capital Goods imported by you</field>
|
||||
<field name="code">VAT14A</field>
|
||||
<field name="sequence" eval="22"/>
|
||||
<field name="parent_id" ref='total_input_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="other_goods_services_supplied" model="account.tax.report.line">
|
||||
<field name="name">[15] Other goods and/or services supplied to you (not Capital Goods)</field>
|
||||
<field name="tag_name">[15] Other goods and/or services supplied to you (not Capital Goods)</field>
|
||||
<field name="code">VAT15</field>
|
||||
<field name="sequence" eval="23"/>
|
||||
<field name="parent_id" ref='total_input_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="other_goods_imported" model="account.tax.report.line">
|
||||
<field name="name">[15A] Other goods imported by you (not Capital Goods)</field>
|
||||
<field name="tag_name">[15A] Other goods imported by you (not Capital Goods)</field>
|
||||
<field name="code">VAT15A</field>
|
||||
<field name="sequence" eval="24"/>
|
||||
<field name="parent_id" ref='total_input_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="change_in_use" model="account.tax.report.line">
|
||||
<field name="name">[16] Change in Use</field>
|
||||
<field name="tag_name">[16] Change in Use</field>
|
||||
<field name="code">VAT16</field>
|
||||
<field name="sequence" eval="25"/>
|
||||
<field name="parent_id" ref='total_input_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="bad_debts" model="account.tax.report.line">
|
||||
<field name="name">[17] Bad Debts</field>
|
||||
<field name="tag_name">[17] Bad Debts</field>
|
||||
<field name="code">VAT17</field>
|
||||
<field name="sequence" eval="26"/>
|
||||
<field name="parent_id" ref='total_input_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
<record id="others" model="account.tax.report.line">
|
||||
<field name="name">[18] Other</field>
|
||||
<field name="tag_name">[18] Other</field>
|
||||
<field name="code">VAT18</field>
|
||||
<field name="sequence" eval="27"/>
|
||||
<field name="parent_id" ref='total_input_tax'/>
|
||||
<field name="country_id" ref="base.za"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,558 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="ST1" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Standard Rate</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('standard_rate_exclude_capital_goods_service')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'plus_report_line_ids': [ref('standard_rate_exclude_capital_goods_service'), ref('vat_on_standard_rate_exclude_capital_goods_service')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('standard_rate_exclude_capital_goods_service')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'minus_report_line_ids': [ref('standard_rate_exclude_capital_goods_service'), ref('vat_on_standard_rate_exclude_capital_goods_service')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST1A" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Standard Rate (Capital Goods)</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('standard_rate_only_capital_goods_service')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'plus_report_line_ids': [ref('standard_rate_only_capital_goods_service'), ref('vat_on_standard_rate_only_capital_goods_service')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('standard_rate_only_capital_goods_service')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'minus_report_line_ids': [ref('standard_rate_only_capital_goods_service'), ref('vat_on_standard_rate_only_capital_goods_service')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST2" model="account.tax.template">
|
||||
<field name="description">0%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Zero Rate</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="tax_group_id" ref="tax_group_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('zero_rate_exclude_goods_exported')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('zero_rate_exclude_goods_exported')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST2A" model="account.tax.template">
|
||||
<field name="description">0%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Zero Rate Exports</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="tax_group_id" ref="tax_group_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('zero_rate_only_goods_exported')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('zero_rate_only_goods_exported')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST3" model="account.tax.template">
|
||||
<field name="description">0%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Exempt and Non-Supplies</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">0</field>
|
||||
<field name="tax_group_id" ref="tax_group_0"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('exempt_and_non_supplies')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('exempt_and_non_supplies')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST5" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Accommodation (28+ days)</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('accomodation_exceeding_28_days')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'plus_report_line_ids': [ref('vat_on_accomodation_exceeding_28_days')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('accomodation_exceeding_28_days')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'minus_report_line_ids': [ref('vat_on_accomodation_exceeding_28_days')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST7" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Accommodation (Under 28 days)</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('accomodation_under_28_days')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'plus_report_line_ids': [ref('vat_on_accomodation_under_28_days')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('accomodation_under_28_days')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'minus_report_line_ids': [ref('vat_on_accomodation_under_28_days')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST10" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">Export of Second-hand Goods/ Change in Use</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'plus_report_line_ids': [ref('second_hand_goods_export')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'plus_report_line_ids': [ref('vat_on_second_hand_goods_export')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
'minus_report_line_ids': [ref('second_hand_goods_export')],
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'minus_report_line_ids': [ref('vat_on_second_hand_goods_export')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="ST12" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
<field name="name">VAT Adjustments and Manual VAT</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'plus_report_line_ids': [ref('other_imported_services')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('200060'),
|
||||
'minus_report_line_ids': [ref('other_imported_services')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="PT15" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="name">Standard Rate</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'plus_report_line_ids': [ref('other_goods_services_supplied')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'minus_report_line_ids': [ref('other_goods_services_supplied')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="PT14" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="name">Standard Rate (Capital Goods)</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'plus_report_line_ids': [ref('capital_goods_services_supplied')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'minus_report_line_ids': [ref('capital_goods_services_supplied')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="PT14A" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="name">Capital Goods Imported</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'plus_report_line_ids': [ref('capital_goods_imported')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'minus_report_line_ids': [ref('capital_goods_imported')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="PT15A" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="name">Goods and Services Imported</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'plus_report_line_ids': [ref('other_goods_imported')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'minus_report_line_ids': [ref('other_goods_imported')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="PT16" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="name">Change in Use</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'plus_report_line_ids': [ref('change_in_use')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'minus_report_line_ids': [ref('change_in_use')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="PT17" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="name">Bad Debts</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'plus_report_line_ids': [ref('bad_debts')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'minus_report_line_ids': [ref('bad_debts')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
<record id="PT18" model="account.tax.template">
|
||||
<field name="description">15%</field>
|
||||
<field name="chart_template_id" ref="default_chart_template"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
<field name="name">Other Adjustments</field>
|
||||
<field name="amount_type">percent</field>
|
||||
<field name="amount">15</field>
|
||||
<field name="tax_group_id" ref="tax_group_1"/>
|
||||
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'plus_report_line_ids': [ref('others')],
|
||||
}),
|
||||
]"/>
|
||||
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'base',
|
||||
}),
|
||||
(0,0, {
|
||||
'factor_percent': 100,
|
||||
'repartition_type': 'tax',
|
||||
'account_id': ref('100060'),
|
||||
'minus_report_line_ids': [ref('others')],
|
||||
}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -1,7 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import http, fields
|
||||
from odoo import _, http, fields
|
||||
from odoo.exceptions import AccessError
|
||||
from odoo.http import request
|
||||
from odoo.osv import expression
|
||||
from odoo.tools import float_round, float_repr
|
||||
@@ -10,6 +11,7 @@ from odoo.tools import float_round, float_repr
|
||||
class LunchController(http.Controller):
|
||||
@http.route('/lunch/infos', type='json', auth='user')
|
||||
def infos(self, user_id=None):
|
||||
self._check_user_impersonification(user_id)
|
||||
user = request.env['res.users'].browse(user_id) if user_id else request.env.user
|
||||
|
||||
infos = self._make_infos(user, order=False)
|
||||
@@ -35,6 +37,7 @@ class LunchController(http.Controller):
|
||||
|
||||
@http.route('/lunch/trash', type='json', auth='user')
|
||||
def trash(self, user_id=None):
|
||||
self._check_user_impersonification(user_id)
|
||||
user = request.env['res.users'].browse(user_id) if user_id else request.env.user
|
||||
|
||||
lines = self._get_current_lines(user.id)
|
||||
@@ -43,6 +46,7 @@ class LunchController(http.Controller):
|
||||
|
||||
@http.route('/lunch/pay', type='json', auth='user')
|
||||
def pay(self, user_id=None):
|
||||
self._check_user_impersonification(user_id)
|
||||
user = request.env['res.users'].browse(user_id) if user_id else request.env.user
|
||||
|
||||
lines = self._get_current_lines(user.id)
|
||||
@@ -60,13 +64,15 @@ class LunchController(http.Controller):
|
||||
|
||||
@http.route('/lunch/user_location_set', type='json', auth='user')
|
||||
def set_user_location(self, location_id, user_id=None):
|
||||
self._check_user_impersonification(user_id)
|
||||
user = request.env['res.users'].browse(user_id) if user_id else request.env.user
|
||||
|
||||
user.last_lunch_location_id = request.env['lunch.location'].browse(location_id)
|
||||
user.sudo().last_lunch_location_id = request.env['lunch.location'].browse(location_id)
|
||||
return True
|
||||
|
||||
@http.route('/lunch/user_location_get', type='json', auth='user')
|
||||
def get_user_location(self, user_id=None):
|
||||
self._check_user_impersonification(user_id)
|
||||
user = request.env['res.users'].browse(user_id) if user_id else request.env.user
|
||||
|
||||
return user.last_lunch_location_id.id
|
||||
@@ -87,7 +93,9 @@ class LunchController(http.Controller):
|
||||
'currency': {'symbol': currency.symbol, 'position': currency.position},
|
||||
})
|
||||
|
||||
user_location = user.last_lunch_location_id if user.last_lunch_location_id else request.env['lunch.location'].search([], limit=1)
|
||||
if not user.last_lunch_location_id:
|
||||
user.last_lunch_location_id = request.env['lunch.location'].search([], limit=1)
|
||||
user_location = user.last_lunch_location_id
|
||||
|
||||
alert_domain = expression.AND([
|
||||
[('available_today', '=', True)],
|
||||
@@ -101,6 +109,10 @@ class LunchController(http.Controller):
|
||||
|
||||
return res
|
||||
|
||||
def _check_user_impersonification(self, user_id=None):
|
||||
if (user_id and request.env.uid != user_id and not request.env.user.has_group('lunch.group_lunch_manager')):
|
||||
raise AccessError(_('You are trying to impersonate another user, but this can only be done by a lunch manager'))
|
||||
|
||||
def _get_current_lines(self, user_id):
|
||||
return request.env['lunch.order'].search([('user_id', '=', user_id), ('date', '=', fields.Date.today()), ('state', '!=', 'cancelled')])
|
||||
|
||||
|
||||
@@ -42,6 +42,10 @@ class LunchOrder(models.Model):
|
||||
|
||||
display_toppings = fields.Text('Toppings', compute='_compute_display_toppings', store=True)
|
||||
|
||||
def init(self):
|
||||
self._cr.execute("""CREATE INDEX IF NOT EXISTS lunch_order_user_product_date ON %s (user_id, product_id, date)"""
|
||||
% self._table)
|
||||
|
||||
@api.depends('topping_ids_1', 'topping_ids_2', 'topping_ids_3', 'product_id', 'quantity')
|
||||
def _compute_total_price(self):
|
||||
for line in self:
|
||||
@@ -69,8 +73,8 @@ class LunchOrder(models.Model):
|
||||
'To add some money to your wallet, please contact your lunch manager.'))
|
||||
|
||||
def action_order(self):
|
||||
self._check_wallet()
|
||||
self.write({'state': 'ordered'})
|
||||
self._check_wallet()
|
||||
|
||||
def action_confirm(self):
|
||||
self.write({'state': 'confirmed'})
|
||||
|
||||
@@ -81,13 +81,12 @@ class LunchProductReport(models.Model):
|
||||
users.id AS user_id,
|
||||
fav.user_id IS NOT NULL AS is_favorite,
|
||||
product.new_until >= current_date AS is_new,
|
||||
max(l_order.date) AS last_order_date
|
||||
orders.last_order_date
|
||||
FROM lunch_product product
|
||||
RIGHT JOIN res_users users ON users.company_id = product.company_id -- multi company
|
||||
LEFT JOIN lunch_product_favorite_user_rel fav ON fav.product_id = product.id AND fav.user_id = users.id
|
||||
JOIN res_groups_users_rel groups ON groups.uid = users.id -- only generate for internal users
|
||||
JOIN lunch_order l_order ON l_order.product_id = product.id AND l_order.user_id = users.id AND l_order.date <= current_date
|
||||
INNER JOIN res_users users ON users.company_id = product.company_id -- multi company
|
||||
INNER JOIN res_groups_users_rel groups ON groups.uid = users.id -- only generate for internal users
|
||||
LEFT JOIN LATERAL (select max(date) AS last_order_date FROM lunch_order where user_id=users.id and product_id=product.id) AS orders ON TRUE
|
||||
LEFT JOIN LATERAL (select user_id FROM lunch_product_favorite_user_rel where user_id=users.id and product_id=product.id) AS fav ON TRUE
|
||||
WHERE users.active AND product.active AND groups.gid = %%s --only take into account active products and users
|
||||
GROUP BY product.id, product.name, product.category_id, product.description, product.price, product.supplier_id, product.company_id, product.active, users.id, is_favorite, is_new
|
||||
);
|
||||
""" % self._table, (self.env.ref('base.group_user').id,))
|
||||
|
||||
@@ -77,13 +77,14 @@ var LunchKanbanController = KanbanController.extend({
|
||||
*/
|
||||
_renderLunchKanbanWidget: function () {
|
||||
var self = this;
|
||||
if (this.widget) {
|
||||
this.widget.destroy();
|
||||
}
|
||||
var oldWidget = this.widget;
|
||||
this.widgetData.wallet = parseFloat(this.widgetData.wallet).toFixed(2);
|
||||
this.widget = new LunchKanbanWidget(this, _.extend(this.widgetData, {edit: this.editMode}));
|
||||
return this.widget.appendTo(document.createDocumentFragment()).then(function () {
|
||||
self.$('.o_lunch_kanban').prepend(self.widget.$el);
|
||||
if (oldWidget) {
|
||||
oldWidget.destroy();
|
||||
}
|
||||
});
|
||||
},
|
||||
_showPaymentDialog: function (title) {
|
||||
|
||||
@@ -128,6 +128,53 @@ QUnit.module('LunchKanbanView', {
|
||||
kanban.destroy();
|
||||
});
|
||||
|
||||
QUnit.test('no flickering at reload', async function (assert) {
|
||||
assert.expect(2);
|
||||
|
||||
const self = this;
|
||||
let infosProm = Promise.resolve();
|
||||
const kanban = await createLunchKanbanView({
|
||||
View: LunchKanbanView,
|
||||
model: 'product',
|
||||
data: this.data,
|
||||
arch: `
|
||||
<kanban>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div><field name="name"/></div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
`,
|
||||
mockRPC: function (route, args) {
|
||||
if (route === '/lunch/user_location_get') {
|
||||
return Promise.resolve(self.data['lunch.location'].records[0].id);
|
||||
}
|
||||
if (route === '/lunch/infos') {
|
||||
return Promise.resolve(self.regularInfos);
|
||||
}
|
||||
var result = this._super.apply(this, arguments);
|
||||
if (args.method === 'xmlid_to_res_id') {
|
||||
// delay the rendering of the lunch widget
|
||||
return infosProm.then(_.constant(result));
|
||||
}
|
||||
return result;
|
||||
},
|
||||
});
|
||||
|
||||
infosProm = testUtils.makeTestPromise();
|
||||
kanban.reload();
|
||||
|
||||
assert.strictEqual(kanban.$('.o_lunch_widget').length, 1,
|
||||
"old widget should still be present");
|
||||
|
||||
await infosProm.resolve();
|
||||
|
||||
assert.strictEqual(kanban.$('.o_lunch_widget').length, 1);
|
||||
|
||||
kanban.destroy();
|
||||
});
|
||||
|
||||
QUnit.module('LunchKanbanWidget', function () {
|
||||
|
||||
QUnit.test('empty cart', async function (assert) {
|
||||
@@ -814,7 +861,6 @@ QUnit.module('LunchKanbanView', {
|
||||
|
||||
kanban.destroy();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
title="None">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Lunch Overdraft</span>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/>
|
||||
<div class="text-muted">
|
||||
Maximum overdraft that your employees can reach
|
||||
</div>
|
||||
|
||||
@@ -86,7 +86,7 @@ class LunchOrderWizard(models.TransientModel):
|
||||
sum((wizard.topping_ids_1 | wizard.topping_ids_2 | wizard.topping_ids_3).mapped('price')))
|
||||
|
||||
def _get_matching_lines(self):
|
||||
domain = [('product_id', '=', self.product_id.id), ('date', '=', fields.Date.today()), ('note', '=', self._get_note())]
|
||||
domain = [('user_id', '=', self.user_id.id), ('product_id', '=', self.product_id.id), ('date', '=', fields.Date.today()), ('note', '=', self._get_note())]
|
||||
lines = self.env['lunch.order'].search(domain)
|
||||
return lines.filtered(lambda line: (line.topping_ids_1 | line.topping_ids_2 | line.topping_ids_3) == self.topping_ids_1)
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ class MailActivity(models.Model):
|
||||
('today', 'Today'),
|
||||
('planned', 'Planned')], 'State',
|
||||
compute='_compute_state')
|
||||
recommended_activity_type_id = fields.Many2one('mail.activity.type', string="Recommended Activity Type", readonly=True)
|
||||
recommended_activity_type_id = fields.Many2one('mail.activity.type', string="Recommended Activity Type")
|
||||
previous_activity_type_id = fields.Many2one('mail.activity.type', string='Previous Activity Type', readonly=True)
|
||||
has_recommended_activities = fields.Boolean(
|
||||
'Next activities available',
|
||||
@@ -302,7 +302,7 @@ class MailActivity(models.Model):
|
||||
target_record = self.env[activity.res_model].browse(activity.res_id)
|
||||
if hasattr(target_record, 'company_id') and (
|
||||
target_record.company_id != target_user.company_id and (
|
||||
len(target_user.company_ids) > 1)):
|
||||
len(target_user.sudo().company_ids) > 1)):
|
||||
return # in that case we skip the check, assuming it would fail because of the company
|
||||
model.browse(activity.res_id).check_access_rule('read')
|
||||
except exceptions.AccessError:
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import logging
|
||||
import re
|
||||
|
||||
from binascii import Error as binascii_error
|
||||
from operator import itemgetter
|
||||
from email.utils import formataddr
|
||||
from openerp.http import request
|
||||
@@ -998,7 +999,7 @@ class Message(models.Model):
|
||||
for record in self:
|
||||
model = model or record.model
|
||||
res_id = res_id or record.res_id
|
||||
if 'message_ids' in self.env[model]:
|
||||
if issubclass(self.pool[model], self.pool['mail.thread']):
|
||||
self.env[model].invalidate_cache(fnames=[
|
||||
'message_ids',
|
||||
'message_unread',
|
||||
@@ -1032,15 +1033,20 @@ class Message(models.Model):
|
||||
key = match.group(2)
|
||||
if not data_to_url.get(key):
|
||||
name = match.group(4) if match.group(4) else 'image%s' % len(data_to_url)
|
||||
attachment = Attachments.create({
|
||||
'name': name,
|
||||
'datas': match.group(2),
|
||||
'res_model': values.get('model'),
|
||||
'res_id': values.get('res_id'),
|
||||
})
|
||||
attachment.generate_access_token()
|
||||
values['attachment_ids'].append((4, attachment.id))
|
||||
data_to_url[key] = ['/web/image/%s?access_token=%s' % (attachment.id, attachment.access_token), name]
|
||||
try:
|
||||
attachment = Attachments.create({
|
||||
'name': name,
|
||||
'datas': match.group(2),
|
||||
'res_model': values.get('model'),
|
||||
'res_id': values.get('res_id'),
|
||||
})
|
||||
except binascii_error:
|
||||
_logger.warning("Impossible to create an attachment out of badly formated base64 embedded image. Image has been removed.")
|
||||
return match.group(3) # group(3) is the url ending single/double quote matched by the regexp
|
||||
else:
|
||||
attachment.generate_access_token()
|
||||
values['attachment_ids'].append((4, attachment.id))
|
||||
data_to_url[key] = ['/web/image/%s?access_token=%s' % (attachment.id, attachment.access_token), name]
|
||||
return '%s%s alt="%s"' % (data_to_url[key][0], match.group(3), data_to_url[key][1])
|
||||
values['body'] = _image_dataurl.sub(base64_to_boundary, tools.ustr(values['body']))
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ var Chatter = Widget.extend({
|
||||
if (this.fields.activity) {
|
||||
this.fields.activity.$el.detach();
|
||||
}
|
||||
if (this.fields.thread) {
|
||||
if (this.fields.thread && this.fields.thread.$el ) {
|
||||
this.fields.thread.$el.detach();
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ var Chatter = Widget.extend({
|
||||
self.fields.followers.$el.insertBefore(self.$('.o_chatter_button_attachment'));
|
||||
}
|
||||
}
|
||||
if (self.fields.thread) {
|
||||
if (self.fields.thread && self.fields.thread.$el) {
|
||||
self.fields.thread.$el.appendTo(self.$el);
|
||||
}
|
||||
}).then(always).guardedCatch(always);
|
||||
|
||||
@@ -579,7 +579,8 @@ var Message = AbstractMessage.extend(Mixins.EventDispatcherMixin, ServicesMixin
|
||||
* @return {boolean}
|
||||
*/
|
||||
_isOdoobotAuthor: function () {
|
||||
return this._serverAuthorID === this.call('mail_service', 'getOdoobotID');
|
||||
return this._serverAuthorID &&
|
||||
this._serverAuthorID[0] === this.call('mail_service', 'getOdoobotID')[0];
|
||||
},
|
||||
/**
|
||||
* State whether the message is transient or not
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user