Commit 28360c28 by linhdn

import: Odoo

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" OpenERP core library."""
#----------------------------------------------------------
# odoo must be a namespace package for odoo.addons to become one too
# https://packaging.python.org/guides/packaging-namespace-packages/
#----------------------------------------------------------
import pkgutil
import os.path
__path__ = [
os.path.abspath(path)
for path in pkgutil.extend_path(__path__, __name__)
]
import sys
MIN_PY_VERSION = (3, 10)
MAX_PY_VERSION = (3, 13)
assert sys.version_info > MIN_PY_VERSION, f"Outdated python version detected, Odoo requires Python >= {'.'.join(map(str, MIN_PY_VERSION))} to run."
#----------------------------------------------------------
# Running mode flags (gevent, prefork)
#----------------------------------------------------------
# Is the server running with gevent.
evented = False
if len(sys.argv) > 1 and sys.argv[1] == 'gevent':
sys.argv.remove('gevent')
import gevent.monkey
import psycopg2
from gevent.socket import wait_read, wait_write
gevent.monkey.patch_all()
def gevent_wait_callback(conn, timeout=None):
"""A wait callback useful to allow gevent to work with Psycopg."""
# Copyright (C) 2010-2012 Daniele Varrazzo <daniele.varrazzo@gmail.com>
# This function is borrowed from psycogreen module which is licensed
# under the BSD license (see in odoo/debian/copyright)
while 1:
state = conn.poll()
if state == psycopg2.extensions.POLL_OK:
break
elif state == psycopg2.extensions.POLL_READ:
wait_read(conn.fileno(), timeout=timeout)
elif state == psycopg2.extensions.POLL_WRITE:
wait_write(conn.fileno(), timeout=timeout)
else:
raise psycopg2.OperationalError(
"Bad result from poll: %r" % state)
psycopg2.extensions.set_wait_callback(gevent_wait_callback)
evented = True
# Is the server running in prefork mode (e.g. behind Gunicorn).
# If this is True, the processes have to communicate some events,
# e.g. database update or cache invalidation. Each process has also
# its own copy of the data structure and we don't need to care about
# locks between threads.
multi_process = False
#----------------------------------------------------------
# libc UTC hack
#----------------------------------------------------------
# Make sure the OpenERP server runs in UTC.
import os
os.environ['TZ'] = 'UTC' # Set the timezone
import time
if hasattr(time, 'tzset'):
time.tzset()
# ---------------------------------------------------------
# some charset are known by Python under a different name
# ---------------------------------------------------------
import encodings.aliases # noqa: E402
encodings.aliases.aliases['874'] = 'cp874'
encodings.aliases.aliases['windows_874'] = 'cp874'
#----------------------------------------------------------
# alias hebrew iso-8859-8-i and iso-8859-8-e on iso-8859-8
# https://bugs.python.org/issue18624
#----------------------------------------------------------
import codecs
import re
iso8859_8 = codecs.lookup('iso8859_8')
iso8859_8ie_re = re.compile(r'iso[-_]?8859[-_]8[-_]?[ei]', re.IGNORECASE)
codecs.register(lambda charset: iso8859_8 if iso8859_8ie_re.match(charset) else None)
#----------------------------------------------------------
# Shortcuts
#----------------------------------------------------------
# The hard-coded super-user id (a.k.a. administrator, or root user).
SUPERUSER_ID = 1
def registry(database_name=None):
"""
Return the model registry for the given database, or the database mentioned
on the current thread. If the registry does not exist yet, it is created on
the fly.
"""
if database_name is None:
import threading
database_name = threading.current_thread().dbname
return modules.registry.Registry(database_name)
#----------------------------------------------------------
# Imports
#----------------------------------------------------------
from . import upgrade # this namespace must be imported first
from . import addons
from . import conf
from . import loglevels
from . import modules
from . import netsvc
from . import osv
from . import release
from . import service
from . import sql_db
from . import tools
#----------------------------------------------------------
# Model classes, fields, api decorators, and translations
#----------------------------------------------------------
from . import models
from . import fields
from . import api
from odoo.tools.translate import _, _lt
from odoo.fields import Command
#----------------------------------------------------------
# Other imports, which may require stuff from above
#----------------------------------------------------------
from . import cli
from . import http
from .cli.command import main
main()
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Addons module.
This module serves to contain all Odoo addons, across all configured addons
paths. For the code to manage those addons, see odoo.modules.
Addons are made available under `odoo.addons` after
odoo.tools.config.parse_config() is called (so that the addons paths are
known).
This module also conveniently reexports some symbols from odoo.modules.
Importing them from here is deprecated.
"""
# make odoo.addons a namespace package, while keeping this __init__.py
# present, for python 2 compatibility
# https://packaging.python.org/guides/packaging-namespace-packages/
import pkgutil
import os.path
__path__ = [
os.path.abspath(path)
for path in pkgutil.extend_path(__path__, __name__)
]
Odoo Accounting
---------------
The Odoo <a href="https://www.odoo.com/app/accounting">Open Source Accounting</a> app allows a better way to
collaborate with your accountants, your customers and control your suppliers.
Activate features on demand, from integrated analytic accounting to budget,
assets and multiple companies consolidation.
A Smart User Interface
----------------------
Record transactions in a few clicks and easily manage all financial activities
in one place. Odoo's user interface is designed with productivity in mind.
A Better Way To Work – Together
-------------------------------
Share access to your latest business numbers with your team and your accountant
– so everyone is up to speed. From work, home or on the go.
Connect Your Bank Accounts
--------------------------
Import your bank statements and reconcile them in just a few clicks. Prepare
payment orders based on your supplier invoices and payment terms.
Electronic invoicing and automated follow-ups
---------------------------------------------
Create and send professional invoices & get paid online. Get rid of the stress
of having to constantly remind your debtors. Simply set-up and automate
follow-ups to get paid quickly.
Sales Integration
-----------------
Automatically create invoices from sales orders, delivery orders or base them
on time and material. Re-invoice expenses on projects to your customer in just
a few clicks.
Purchase Integration
--------------------
Control supplier invocies based on purchase orders. Get real-time inventory
valuation reports automatically posted in your accounts.
Multi-Level Analytic Accounting
-------------------------------
Integrate your analytic accounting operations with timesheets, projects,
invoices, expenses, etc. No need to record transactions, all analytic entries
are posted automatically following your business rules.
Everything you need to grow
---------------------------
Manage your assets, track expenses, control budgets, multi-level analytic
accounting; Odoo has all the features you need to sustain all your business
activities.
Scale With Your Organization
----------------------------
Odoo supports multiple currencies, multiple users with different access rights,
multiple companies with real time consolidation and unlimited analytic plans.
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
SYSCOHADA_LIST = ['BJ', 'BF', 'CM', 'CF', 'KM', 'CG', 'CI', 'GA', 'GN', 'GW', 'GQ', 'ML', 'NE',
'CD', 'SN', 'TD', 'TG']
VAT_LIST = ['AT', 'BE', 'CA', 'CO', 'DE', 'EC', 'ES', 'ET', 'FR', 'GR', 'IT', 'LU', 'MX', 'NL',
'NO', 'PL', 'PT', 'RO', 'SI', 'TR', 'GB', 'VE', 'VN']
def _set_fiscal_country(env):
""" Sets the fiscal country on existing companies when installing the module.
That field is an editable computed field. It doesn't automatically get computed
on existing records by the ORM when installing the module, so doing that by hand
ensures existing records will get a value for it if needed.
"""
env['res.company'].search([]).compute_account_tax_fiscal_country()
def _auto_install_l10n(env):
# Check the country of the main company (only) and eventually load some module needed in that country
country = env.company.country_id
country_code = country.code
if country_code:
module_list = []
if not env.company.chart_template:
template_code = env['account.chart.template']._guess_chart_template(country)
module_list.append(env['account.chart.template']._get_chart_template_mapping()[template_code]['module'])
if country_code in ['US', 'CA']:
module_list.append('account_check_printing')
if country_code in SYSCOHADA_LIST + VAT_LIST:
module_list.append('base_vat')
if country_code == 'uk':
module_list.append('account_bacs')
if country_code == 'MC':
module_list.append('l10n_fr')
module_ids = env['ir.module.module'].search([('name', 'in', module_list), ('state', '=', 'uninstalled')])
if module_ids:
module_ids.sudo().button_install()
def _auto_install_avatax(env):
""" Install the avatax module automatically if the company is in a country that uses avatax """
avatax_country_codes = ['US', 'CA']
country = env.company.country_id
country_code = country.code
if country_code in avatax_country_codes:
module = env['ir.module.module'].search([('name', '=', 'account_avatax')])
if module.state == 'uninstalled':
module.sudo().button_install()
def _account_post_init(env):
_auto_install_l10n(env)
_set_fiscal_country(env)
_auto_install_avatax(env)
# imported here to avoid dependency cycle issues
# pylint: disable=wrong-import-position
from . import controllers
from . import models
from . import demo
from . import wizard
from . import report
from . import populate
from . import tools
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name' : 'Invoicing',
'version' : '1.2',
'summary': 'Invoices & Payments',
'sequence': 10,
'description': """
Invoicing & Payments
====================
The specific and easy-to-use Invoicing system in Odoo allows you to keep track of your accounting, even when you are not an accountant. It provides an easy way to follow up on your vendors and customers.
You could use this simplified accounting in case you work with an (external) account to keep your books, and you still want to keep track of payments. This module also offers you an easy method of registering payments, without having to encode complete abstracts of account.
""",
'category': 'Accounting/Accounting',
'website': 'https://www.odoo.com/app/invoicing',
'depends': ['base_setup', 'onboarding', 'product', 'analytic', 'portal', 'digest'],
'data': [
'security/account_security.xml',
'security/ir.model.access.csv',
'data/account_data.xml',
'data/digest_data.xml',
'views/account_report.xml',
'data/mail_template_data.xml',
'data/onboarding_data.xml',
'views/account_payment_view.xml',
'wizard/account_automatic_entry_wizard_views.xml',
'wizard/account_unreconcile_view.xml',
'wizard/account_move_reversal_view.xml',
'wizard/account_resequence_views.xml',
'wizard/account_payment_register_views.xml',
'views/account_move_views.xml',
'wizard/setup_wizards_view.xml',
'views/account_account_views.xml',
'views/account_group_views.xml',
'views/account_journal_views.xml',
'views/account_account_tag_views.xml',
'views/account_bank_statement_views.xml',
'views/account_reconcile_model_views.xml',
'views/account_tax_views.xml',
'views/account_full_reconcile_views.xml',
'views/account_payment_term_views.xml',
'views/account_payment_method.xml',
'views/res_partner_bank_views.xml',
'views/report_statement.xml',
'views/terms_template.xml',
'wizard/account_validate_move_view.xml',
'views/res_company_views.xml',
'views/product_view.xml',
'views/account_analytic_plan_views.xml',
'views/account_analytic_account_views.xml',
'views/account_analytic_distribution_model_views.xml',
'views/account_analytic_line_views.xml',
'views/report_invoice.xml',
'report/account_invoice_report_view.xml',
'views/account_cash_rounding_view.xml',
'views/ir_module_views.xml',
'views/res_config_settings_views.xml',
'views/partner_view.xml',
'views/account_journal_dashboard_view.xml',
'views/account_portal_templates.xml',
'views/report_payment_receipt_templates.xml',
'data/service_cron.xml',
'views/account_incoterms_view.xml',
'data/account_incoterms_data.xml',
'views/digest_views.xml',
'wizard/account_move_send_views.xml',
'report/account_hash_integrity_templates.xml',
'views/res_currency.xml',
'views/account_menuitem.xml',
'wizard/account_tour_upload_bill.xml',
'wizard/accrued_orders.xml',
'views/bill_preview_template.xml',
'data/account_reports_data.xml',
'views/uom_uom_views.xml',
],
'demo': [
'demo/account_demo.xml',
],
'installable': True,
'application': True,
'post_init_hook': '_account_post_init',
'assets': {
'web._assets_primary_variables': [
'account/static/src/scss/variables.scss',
],
'web.assets_backend': [
'account/static/src/css/account_bank_and_cash.css',
'account/static/src/css/account.css',
'account/static/src/scss/account_journal_dashboard.scss',
'account/static/src/scss/account_searchpanel.scss',
'account/static/src/scss/account_payment_term.scss',
'account/static/src/components/**/*',
'account/static/src/services/*.js',
'account/static/src/js/tours/account.js',
'account/static/src/views/**/*.js',
'account/static/src/js/search/search_bar/search_bar.js',
],
'web.assets_frontend': [
'account/static/src/js/account_portal_sidebar.js',
'account/static/src/js/account_portal.js',
],
'web.assets_tests': [
'account/static/tests/tours/**/*',
],
'web.qunit_suite_tests': [
'account/static/tests/helpers/*.js',
'account/static/tests/*.js',
],
'web.report_assets_common': [
'account/static/src/css/report_invoice.css',
],
'web.report_assets_pdf': [
'account/static/src/css/report_invoice.css',
],
},
'license': 'LGPL-3',
}
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import portal
from . import terms
from . import download_docs
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http, _
from odoo.http import request, content_disposition
def _get_zip_headers(content, filename):
return [
('Content-Type', 'zip'),
('X-Content-Type-Options', 'nosniff'),
('Content-Length', len(content)),
('Content-Disposition', content_disposition(filename)),
]
class AccountDocumentDownloadController(http.Controller):
@http.route('/account/export_zip_documents', type='http', auth='user')
def export_zip_documents(self, **args):
""" Download zipped attachments. """
ids = list(map(int, request.httprequest.args.getlist('ids')))
filename = request.httprequest.args.get('filename')
attachments = request.env['ir.attachment'].browse(ids)
attachments.check_access_rights('read')
attachments.check_access_rule('read')
content = attachments._build_zip_from_attachments()
headers = _get_zip_headers(content, filename)
return request.make_response(content, headers)
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import OrderedDict
from odoo import http, _
from odoo.osv import expression
from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager
from odoo.addons.account.controllers.download_docs import _get_zip_headers
from odoo.exceptions import AccessError, MissingError
from odoo.http import request
class PortalAccount(CustomerPortal):
def _prepare_home_portal_values(self, counters):
values = super()._prepare_home_portal_values(counters)
if 'invoice_count' in counters:
invoice_count = request.env['account.move'].search_count(self._get_invoices_domain('out'), limit=1) \
if request.env['account.move'].check_access_rights('read', raise_exception=False) else 0
values['invoice_count'] = invoice_count
if 'bill_count' in counters:
bill_count = request.env['account.move'].search_count(self._get_invoices_domain('in'), limit=1) \
if request.env['account.move'].check_access_rights('read', raise_exception=False) else 0
values['bill_count'] = bill_count
return values
# ------------------------------------------------------------
# My Invoices
# ------------------------------------------------------------
def _invoice_get_page_view_values(self, invoice, access_token, **kwargs):
values = {
'page_name': 'invoice',
**invoice._get_invoice_portal_extra_values(),
}
return self._get_page_view_values(invoice, access_token, values, 'my_invoices_history', False, **kwargs)
def _get_invoices_domain(self, m_type=None):
if m_type in ['in', 'out']:
move_type = [m_type+move for move in ('_invoice', '_refund', '_receipt')]
else:
move_type = ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')
return [('state', 'not in', ('cancel', 'draft')), ('move_type', 'in', move_type)]
def _get_account_searchbar_sortings(self):
return {
'date': {'label': _('Date'), 'order': 'invoice_date desc'},
'duedate': {'label': _('Due Date'), 'order': 'invoice_date_due desc'},
'name': {'label': _('Reference'), 'order': 'name desc'},
'state': {'label': _('Status'), 'order': 'state'},
}
def _get_account_searchbar_filters(self):
return {
'all': {'label': _('All'), 'domain': []},
'invoices': {'label': _('Invoices'), 'domain': [('move_type', 'in', ('out_invoice', 'out_refund', 'out_receipt'))]},
'bills': {'label': _('Bills'), 'domain': [('move_type', 'in', ('in_invoice', 'in_refund', 'in_receipt'))]},
}
@http.route(['/my/invoices', '/my/invoices/page/<int:page>'], type='http', auth="user", website=True)
def portal_my_invoices(self, page=1, date_begin=None, date_end=None, sortby=None, filterby=None, **kw):
values = self._prepare_my_invoices_values(page, date_begin, date_end, sortby, filterby)
# pager
pager = portal_pager(**values['pager'])
# content according to pager and archive selected
invoices = values['invoices'](pager['offset'])
request.session['my_invoices_history'] = invoices.ids[:100]
values.update({
'invoices': invoices,
'pager': pager,
})
return request.render("account.portal_my_invoices", values)
def _prepare_my_invoices_values(self, page, date_begin, date_end, sortby, filterby, domain=None, url="/my/invoices"):
values = self._prepare_portal_layout_values()
AccountInvoice = request.env['account.move']
domain = expression.AND([
domain or [],
self._get_invoices_domain(),
])
searchbar_sortings = self._get_account_searchbar_sortings()
# default sort by order
if not sortby:
sortby = 'date'
order = searchbar_sortings[sortby]['order']
searchbar_filters = self._get_account_searchbar_filters()
# default filter by value
if not filterby:
filterby = 'all'
domain += searchbar_filters[filterby]['domain']
if date_begin and date_end:
domain += [('create_date', '>', date_begin), ('create_date', '<=', date_end)]
values.update({
'date': date_begin,
# content according to pager and archive selected
# lambda function to get the invoices recordset when the pager will be defined in the main method of a route
'invoices': lambda pager_offset: (
AccountInvoice.search(domain, order=order, limit=self._items_per_page, offset=pager_offset)
if AccountInvoice.check_access_rights('read', raise_exception=False) else
AccountInvoice
),
'page_name': 'invoice',
'pager': { # vals to define the pager.
"url": url,
"url_args": {'date_begin': date_begin, 'date_end': date_end, 'sortby': sortby, 'filterby': filterby},
"total": AccountInvoice.search_count(domain) if AccountInvoice.check_access_rights('read', raise_exception=False) else 0,
"page": page,
"step": self._items_per_page,
},
'default_url': url,
'searchbar_sortings': searchbar_sortings,
'sortby': sortby,
'searchbar_filters': OrderedDict(sorted(searchbar_filters.items())),
'filterby': filterby,
})
return values
@http.route(['/my/invoices/<int:invoice_id>'], type='http', auth="public", website=True)
def portal_my_invoice_detail(self, invoice_id, access_token=None, report_type=None, download=False, **kw):
try:
invoice_sudo = self._document_check_access('account.move', invoice_id, access_token)
except (AccessError, MissingError):
return request.redirect('/my')
if report_type == 'pdf' and download and invoice_sudo.state == 'posted':
# Download the official attachment(s) or a Pro Forma invoice
attachments = invoice_sudo._get_invoice_legal_documents()
if len(attachments) > 1:
filename = invoice_sudo._get_invoice_report_filename(extension='zip')
zip_content = attachments.sudo()._build_zip_from_attachments()
headers = _get_zip_headers(zip_content, filename)
return request.make_response(zip_content, headers)
headers = self._get_http_headers(invoice_sudo, report_type, attachments.raw, download)
return request.make_response(attachments.raw, list(headers.items()))
elif report_type in ('html', 'pdf', 'text'):
has_generated_invoice = bool(invoice_sudo.invoice_pdf_report_id)
request.update_context(proforma_invoice=not has_generated_invoice)
return self._show_report(model=invoice_sudo, report_type=report_type, report_ref='account.account_invoices', download=download)
values = self._invoice_get_page_view_values(invoice_sudo, access_token, **kw)
return request.render("account.portal_invoice_page", values)
# ------------------------------------------------------------
# My Home
# ------------------------------------------------------------
def details_form_validate(self, data, partner_creation=False):
error, error_message = super(PortalAccount, self).details_form_validate(data)
# prevent VAT/name change if invoices exist
partner = request.env['res.users'].browse(request.uid).partner_id
# Skip this test if we're creating a new partner as we won't ever block him from filling values.
if not partner_creation and not partner.can_edit_vat():
if 'vat' in data and (data['vat'] or False) != (partner.vat or False):
error['vat'] = 'error'
error_message.append(_('Changing VAT number is not allowed once invoices have been issued for your account. Please contact us directly for this operation.'))
if 'name' in data and (data['name'] or False) != (partner.name or False):
error['name'] = 'error'
error_message.append(_('Changing your name is not allowed once invoices have been issued for your account. Please contact us directly for this operation.'))
if 'company_name' in data and (data['company_name'] or False) != (partner.company_name or False):
error['company_name'] = 'error'
error_message.append(_('Changing your company name is not allowed once invoices have been issued for your account. Please contact us directly for this operation.'))
return error, error_message
def extra_details_form_validate(self, data, additional_required_fields, error, error_message):
""" Ensure that all additional required fields have a value in the data """
for field in additional_required_fields:
if field.name not in data or not data[field.name]:
error[field.name] = 'error'
error_message.append(_('The field %s must be filled.', field.field_description.lower()))
return error, error_message
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http, _
from odoo.http import request
def sitemap_terms(env, rule, qs):
if qs and qs.lower() not in '/terms':
return
use_invoice_terms = env['ir.config_parameter'].sudo().get_param('account.use_invoice_terms')
if use_invoice_terms and env.company.terms_type == 'html':
yield {'loc': '/terms'}
class TermsController(http.Controller):
@http.route('/terms', type='http', auth='public', website=True, sitemap=sitemap_terms)
def terms_conditions(self, **kwargs):
use_invoice_terms = request.env['ir.config_parameter'].sudo().get_param('account.use_invoice_terms')
if not (use_invoice_terms and request.env.company.terms_type == 'html'):
return request.render('http_routing.http_error', {
'status_code': _('Oops'),
'status_message': _("""The requested page is invalid, or doesn't exist anymore.""")})
values = {
'use_invoice_terms': use_invoice_terms,
'company': request.env.company
}
return request.render("account.account_terms_conditions_page", values)
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record forcecreate="True" id="decimal_payment" model="decimal.precision">
<field name="name">Payment Terms</field>
<field name="digits">6</field>
</record>
<!-- Open Settings from Purchase Journal to configure mail servers -->
<record id="action_open_settings" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context" eval="{'module': 'general_settings', 'bin_size': False}"/>
</record>
<!-- TAGS FOR CASH FLOW STATEMENT DIRECT METHOD -->
<record id="account_tag_operating" model="account.account.tag">
<field name="name">Operating Activities</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_financing" model="account.account.tag">
<field name="name">Financing Activities</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_investing" model="account.account.tag">
<field name="name">Investing &amp; Extraordinary Activities</field>
<field name="applicability">accounts</field>
</record>
<!--
Payment terms
-->
<record id="account_payment_term_immediate" model="account.payment.term">
<field name="name">Immediate Payment</field>
<field name="note">Payment terms: Immediate Payment</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 0})]"/>
</record>
<record id="account_payment_term_15days" model="account.payment.term">
<field name="name">15 Days</field>
<field name="note">Payment terms: 15 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 15})]"/>
</record>
<record id="account_payment_term_21days" model="account.payment.term">
<field name="name">21 Days</field>
<field name="note">Payment terms: 21 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 21})]"/>
</record>
<record id="account_payment_term_30days" model="account.payment.term">
<field name="name">30 Days</field>
<field name="note">Payment terms: 30 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 30})]"/>
</record>
<record id="account_payment_term_45days" model="account.payment.term">
<field name="name">45 Days</field>
<field name="note">Payment terms: 45 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 45})]"/>
</record>
<record id="account_payment_term_end_following_month" model="account.payment.term">
<field name="name">End of Following Month</field>
<field name="note">Payment terms: End of Following Month</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'delay_type':'days_after_end_of_next_month', 'nb_days': 0})]"/>
</record>
<record id="account_payment_term_30_days_end_month_the_10" model="account.payment.term">
<field name="name">10 Days after End of Next Month</field>
<field name="note">Payment terms: 10 Days after End of Next Month</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'delay_type':'days_after_end_of_next_month', 'nb_days': 10})]"/>
</record>
<record id="account_payment_term_advance_60days" model="account.payment.term">
<field name="name">30% Now, Balance 60 Days</field>
<field name="note">Payment terms: 30% Now, Balance 60 Days</field>
<field name="line_ids" eval="[
Command.clear(),
Command.create({'value': 'percent', 'value_amount': 30.0, 'nb_days': 0}),
Command.create({'value': 'percent', 'value_amount': 70.0, 'nb_days': 60})]"/>
</record>
<record id="account_payment_term_30days_early_discount" model="account.payment.term">
<field name="name">2/7 Net 30</field>
<field name="note">Payment terms: 30 Days, 2% Early Payment Discount under 7 days</field>
<field name="display_on_invoice">True</field>
<field name="early_discount">True</field>
<field name="discount_percentage">2</field>
<field name="discount_days">7</field>
<field name="line_ids" eval="[
Command.clear(),
Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 30})]"/>
</record>
<!-- Account-related subtypes for messaging / Chatter -->
<record id="mt_invoice_validated" model="mail.message.subtype">
<field name="name">Validated</field>
<field name="res_model">account.move</field>
<field name="default" eval="False"/>
<field name="description">Invoice validated</field>
</record>
<record id="mt_invoice_paid" model="mail.message.subtype">
<field name="name">Paid</field>
<field name="res_model">account.move</field>
<field name="default" eval="False"/>
<field name="description">Invoice paid</field>
</record>
<record id="mt_invoice_created" model="mail.message.subtype">
<field name="name">Invoice Created</field>
<field name="res_model">account.move</field>
<field name="default" eval="False"/>
<field name="hidden" eval="True"/>
<field name="description">Invoice Created</field>
</record>
<!-- Payment methods -->
<record id="account_payment_method_manual_in" model="account.payment.method">
<field name="name">Manual</field>
<field name="code">manual</field>
<field name="payment_type">inbound</field>
</record>
<record id="account_payment_method_manual_out" model="account.payment.method">
<field name="name">Manual</field>
<field name="code">manual</field>
<field name="payment_type">outbound</field>
</record>
<!-- Partner Trust Property -->
<record forcecreate="True" id="default_followup_trust" model="ir.property">
<field name="name">Followup Trust Property</field>
<field name="fields_id" search="[('model', '=', 'res.partner'), ('name', '=', 'trust')]"/>
<field name="value">normal</field>
<field name="type">selection</field>
</record>
<!-- Share Button in action menu -->
<record id="model_account_move_action_share" model="ir.actions.server">
<field name="name">Share</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_view_types">form</field>
<field name="state">code</field>
<field name="code">action = records.action_share()</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="incoterm_EXW" model="account.incoterms">
<field name="code">EXW</field>
<field name="name">EX WORKS</field>
</record>
<record id="incoterm_FCA" model="account.incoterms">
<field name="code">FCA</field>
<field name="name">FREE CARRIER</field>
</record>
<record id="incoterm_FAS" model="account.incoterms">
<field name="code">FAS</field>
<field name="name">FREE ALONGSIDE SHIP</field>
</record>
<record id="incoterm_FOB" model="account.incoterms">
<field name="code">FOB</field>
<field name="name">FREE ON BOARD</field>
</record>
<record id="incoterm_CFR" model="account.incoterms">
<field name="code">CFR</field>
<field name="name">COST AND FREIGHT</field>
</record>
<record id="incoterm_CIF" model="account.incoterms">
<field name="code">CIF</field>
<field name="name">COST, INSURANCE AND FREIGHT</field>
</record>
<record id="incoterm_CPT" model="account.incoterms">
<field name="code">CPT</field>
<field name="name">CARRIAGE PAID TO</field>
</record>
<record id="incoterm_CIP" model="account.incoterms">
<field name="code">CIP</field>
<field name="name">CARRIAGE AND INSURANCE PAID TO</field>
</record>
<record id="incoterm_DPU" model="account.incoterms">
<field name="code">DPU</field>
<field name="name">DELIVERED AT PLACE UNLOADED</field>
</record>
<record id="incoterm_DAP" model="account.incoterms">
<field name="code">DAP</field>
<field name="name">DELIVERED AT PLACE</field>
</record>
<record id="incoterm_DDP" model="account.incoterms">
<field name="code">DDP</field>
<field name="name">DELIVERED DUTY PAID</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- GENERIC TAX REPORT -->
<record id="generic_tax_report" model="account.report">
<field name="name">Generic Tax report</field>
<field name="filter_multi_company">tax_units</field>
<field name="filter_fiscal_position" eval="1"/>
<field name="default_opening_date_filter">last_tax_period</field>
<field name="only_tax_exigible" eval="True"/>
<field name="column_ids">
<record id="generic_tax_report_column_net" model="account.report.column">
<field name="name">Net</field>
<field name="expression_label">net</field>
<field name="figure_type">monetary</field>
</record>
<record id="generic_tax_report_column_tax" model="account.report.column">
<field name="name">Tax</field>
<field name="expression_label">tax</field>
<field name="figure_type">monetary</field>
</record>
</field>
</record>
<record id="generic_tax_report_account_tax" model="account.report">
<field name="name">Group by: Account &gt; Tax </field>
<field name="root_report_id" ref="generic_tax_report"/>
<field name="availability_condition">always</field>
<field name="column_ids">
<record id="generic_tax_report_account_tax_column_net" model="account.report.column">
<field name="name">Net</field>
<field name="expression_label">net</field>
<field name="figure_type">monetary</field>
</record>
<record id="generic_tax_report_account_tax_column_tax" model="account.report.column">
<field name="name">Tax</field>
<field name="expression_label">tax</field>
<field name="figure_type">monetary</field>
</record>
</field>
</record>
<record id="generic_tax_report_tax_account" model="account.report">
<field name="name">Group by: Tax &gt; Account </field>
<field name="root_report_id" ref="generic_tax_report"/>
<field name="availability_condition">always</field>
<field name="column_ids">
<record id="generic_tax_report_tax_account_column_net" model="account.report.column">
<field name="name">Net</field>
<field name="expression_label">net</field>
<field name="figure_type">monetary</field>
</record>
<record id="generic_tax_report_tax_account_column_tax" model="account.report.column">
<field name="name">Tax</field>
<field name="expression_label">tax</field>
<field name="figure_type">monetary</field>
</record>
</field>
</record>
</data>
</odoo>
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<data noupdate="1">
<record id="digest.digest_digest_default" model="digest.digest">
<field name="kpi_account_total_revenue">True</field>
</record>
</data>
<data>
<record id="digest_tip_account_0" model="digest.tip">
<field name="name">Tip: No need to print, put in an envelop and post your invoices</field>
<field name="sequence">700</field>
<field name="group_id" ref="account.group_account_invoice" />
<field name="tip_description" type="html">
<div>
<p class="tip_title">Tip: No need to print, put in an envelop and post your invoices</p>
<p class="tip_content">Use the “<i>Send by Post</i>” option to post invoices automatically. For the cost of a local stamp, we do all the manual work: your invoice will be printed in the right country, put in an envelop and sent by snail mail. Use this feature from the list view to post hundreds of invoices in bulk.</p>
<img src="https://download.odoocdn.com/digests/account/static/src/img/invoice-stamps.png" width="540" class="illustration_border" />
</div>
</field>
</record>
</data>
</odoo>
<?xml version="1.0" ?>
<odoo>
<!-- Mail template are declared in a NOUPDATE block
so users can freely customize/delete them -->
<data noupdate="1">
<!--Email template -->
<record id="email_template_edi_invoice" model="mail.template">
<field name="name">Invoice: Sending</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="email_from">{{ (object.invoice_user_id.email_formatted or object.company_id.email_formatted or user.email_formatted) }}</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field name="subject">{{ object.company_id.name }} Invoice (Ref {{ object.name or 'n/a' }})</field>
<field name="description">Sent to customers with their invoices in attachment</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
<t t-if="object.partner_id.parent_id">
<t t-out="object.partner_id.name or ''">Brandon Freeman</t> (<t t-out="object.partner_id.parent_id.name or ''">Azure Interior</t>),
</t>
<t t-else="">
<t t-out="object.partner_id.name or ''">Brandon Freeman</t>,
</t>
<br /><br />
Here is your
<t t-if="object.name">
invoice <span style="font-weight:bold;" t-out="object.name or ''">INV/2021/05/0005</span>
</t>
<t t-else="">
invoice
</t>
<t t-if="object.invoice_origin">
(with reference: <t t-out="object.invoice_origin or ''">SUB003</t>)
</t>
amounting in <span style="font-weight:bold;" t-out="format_amount(object.amount_total, object.currency_id) or ''">$ 143,750.00</span>
from <t t-out="object.company_id.name or ''">YourCompany</t>.
<t t-if="object.payment_state in ('paid', 'in_payment')">
This invoice is already paid.
</t>
<t t-else="">
Please remit payment at your earliest convenience.
<t t-if="object.payment_reference">
<br /><br />
Please use the following communication for your payment: <strong t-out="object.payment_reference or ''">INV/2021/05/0005</strong>
<t t-if="object.partner_bank_id">
on the account <strong t-out="object.partner_bank_id.acc_number"/>
</t>
.
</t>
</t>
<t t-if="hasattr(object, 'timesheet_count') and object.timesheet_count">
<br /><br />
PS: you can review your timesheets <a t-att-href="'my/timesheets?search_in=invoice&amp;search=%s' % object.name">from the portal.</a>
</t>
<br /><br />
Do not hesitate to contact us if you have any questions.
<t t-if="not is_html_empty(object.invoice_user_id.signature)">
<br /><br />
<t t-out="object.invoice_user_id.signature or ''">--<br/>Mitchell Admin</t>
</t>
</p>
</div>
</field>
<field name="report_template_ids" eval="[(4, ref('account.account_invoices'))]"/>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="auto_delete" eval="True"/>
</record>
<record id="mail_template_data_payment_receipt" model="mail.template">
<field name="name">Payment: Payment Receipt</field>
<field name="model_id" ref="account.model_account_payment"/>
<field name="subject">{{ object.company_id.name }} Payment Receipt (Ref {{ object.name or 'n/a' }})</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field name="description">Sent manually to customer when clicking on 'Send receipt by email' in payment action</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear <t t-out="object.partner_id.name or ''">Azure Interior</t><br/><br/>
Thank you for your payment.
Here is your payment receipt <span style="font-weight:bold;" t-out="(object.name or '').replace('/','-') or ''">BNK1-2021-05-0002</span> amounting
to <span style="font-weight:bold;" t-out="format_amount(object.amount, object.currency_id) or ''">$ 10.00</span> from <t t-out="object.company_id.name or ''">YourCompany</t>.
<br/><br/>
Do not hesitate to contact us if you have any questions.
<br/><br/>
Best regards,
<t t-if="not is_html_empty(user.signature)">
<br/><br/>
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
</t>
</p>
</div>
</field>
<field name="report_template_ids" eval="[(4, ref('account.action_report_payment_receipt'))]"/>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="auto_delete" eval="True"/>
</record>
<!-- Credit note template -->
<record id="email_template_edi_credit_note" model="mail.template">
<field name="name">Credit Note: Sending</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="email_from">{{ (object.invoice_user_id.email_formatted or object.company_id.email_formatted or user.email_formatted) }}</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field name="subject">{{ object.company_id.name }} Credit Note (Ref {{ object.name or 'n/a' }})</field>
<field name="description">Sent to customers with the credit note in attachment</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear
<t t-if="object.partner_id.parent_id">
<t t-out="object.partner_id.name or ''">Brandon Freeman</t> (<t t-out="object.partner_id.parent_id.name or ''">Azure Interior</t>),
</t>
<t t-else="">
<t t-out="object.partner_id.name or ''">Brandon Freeman</t>,
</t>
<br /><br />
Here is your
<t t-if="object.name">
credit note <span style="font-weight:bold;" t-out="object.name or ''">RINV/2021/05/0001</span>
</t>
<t t-else="">
credit note
</t>
<t t-if="object.invoice_origin">
(with reference: <t t-out="object.invoice_origin or ''">SUB003</t>)
</t>
amounting in <span style="font-weight:bold;" t-out="format_amount(object.amount_total, object.currency_id) or ''">$ 143,750.00</span>
from <t t-out="object.company_id.name or ''">YourCompany</t>.
<br /><br />
Do not hesitate to contact us if you have any questions.
<t t-if="not is_html_empty(object.invoice_user_id.signature)">
<br /><br />
<t t-out="object.invoice_user_id.signature or ''">--<br/>Mitchell Admin</t>
</t>
</p>
</div>
</field>
<field name="report_template_ids" eval="[(4, ref('account.account_invoices'))]"/>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="auto_delete" eval="True"/>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- ONBOARDING STEPS -->
<!-- INVOICING -->
<record id="onboarding_onboarding_step_company_data" model="onboarding.onboarding.step">
<field name="title">Company Data</field>
<field name="description">Set your company's data for documents header/footer.</field>
<field name="button_text">Let's start!</field>
<field name="done_text">Looks great!</field>
<field name="panel_step_open_action_name">action_open_step_company_data</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_company-data.png"></field>
<field name="step_image_filename">onboarding_company-data.png</field>
<field name="step_image_alt">Onboarding Company Data</field>
<field name="sequence">1</field>
</record>
<record id="onboarding_onboarding_step_base_document_layout" model="onboarding.onboarding.step">
<field name="title">Documents Layout</field>
<field name="description">Customize the look of your documents.</field>
<field name="button_text">Customize</field>
<field name="done_text">Looks great!</field>
<field name="panel_step_open_action_name">action_open_step_base_document_layout</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_quotation-layout.png"></field>
<field name="step_image_filename">onboarding_quotation-layout.png</field>
<field name="step_image_alt">Onboarding Documents Layout</field>
<field name="sequence">3</field>
</record>
<record id="onboarding_onboarding_step_create_invoice" model="onboarding.onboarding.step">
<field name="title">Create Invoice</field>
<field name="description">Create your first invoice.</field>
<field name="button_text">Create</field>
<field name="done_text">First invoice sent!</field>
<field name="panel_step_open_action_name">action_open_step_create_invoice</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_default.png"></field>
<field name="step_image_filename">onboarding_default.png</field>
<field name="step_image_alt">Onboarding Create Invoice</field>
<field name="sequence">4</field>
</record>
<!-- DASHBOARD -->
<record id="onboarding_onboarding_step_fiscal_year" model="onboarding.onboarding.step">
<field name="title">Accounting Periods</field>
<field name="description">Define your fiscal years &amp; tax returns periodicity.</field>
<field name="button_text">Configure</field>
<field name="done_text">Step completed!</field>
<field name="panel_step_open_action_name">action_open_step_fiscal_year</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_accounting-periods.png"></field>
<field name="step_image_filename">onboarding_accounting-periods.png</field>
<field name="step_image_alt">Onboarding Accounting Periods</field>
<field name="sequence">1</field>
</record>
<record id="onboarding_onboarding_step_bank_account" model="onboarding.onboarding.step">
<field name="title">Bank Account</field>
<field name="description">Connect your financial accounts in seconds.</field>
<field name="button_text">Add a bank account</field>
<field name="done_text">Step Completed!</field>
<field name="panel_step_open_action_name">action_open_step_bank_account</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_puzzle.png"></field>
<field name="step_image_filename">onboarding_puzzle.png</field>
<field name="step_image_alt">Onboarding Bank Account</field>
<field name="sequence">2</field>
</record>
<record id="onboarding_onboarding_step_default_taxes" model="onboarding.onboarding.step">
<field name="title">Taxes</field>
<field name="description">Set default Taxes for sales and purchase transactions.</field>
<field name="button_text">Review</field>
<field name="done_text">Taxes set!</field>
<field name="panel_step_open_action_name">action_open_step_default_taxes</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_taxes.png"></field>
<field name="step_image_filename">onboarding_taxes.png</field>
<field name="step_image_alt">Onboarding Taxes</field>
<field name="sequence">3</field>
</record>
<record id="onboarding_onboarding_step_chart_of_accounts" model="onboarding.onboarding.step">
<field name="title">Chart of Accounts</field>
<field name="description">Set up your chart of accounts and record initial balances.</field>
<field name="button_text">Review</field>
<field name="done_text">Chart of accounts set!</field>
<field name="panel_step_open_action_name">action_open_step_chart_of_accounts</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_chart-of-accounts.png"></field>
<field name="step_image_filename">onboarding_chart-of-accounts.png</field>
<field name="step_image_alt">Onboarding Bank Account</field>
<field name="sequence">4</field>
</record>
<!-- WITHOUT PANEL -->
<record id="onboarding_onboarding_step_setup_bill" model="onboarding.onboarding.step">
<field name="title">Import Vendor Bills</field>
<field name="sequence">1000</field>
</record>
<record id="onboarding_onboarding_step_sales_tax" model="onboarding.onboarding.step">
<field name="title">Taxes</field>
<!-- Fields values used if/when added in a panel within other modules -->
<field name="description">Choose a default sales tax for your products.</field>
<field name="button_text">Set taxes</field>
<field name="done_text">Step Completed!</field>
<field name="panel_step_open_action_name">action_open_step_sales_tax</field>
<field name="step_image" type="base64" file="base/static/img/onboarding_puzzle.png"></field>
<field name="step_image_filename">onboarding_puzzle.png</field>
<field name="step_image_alt">Onboarding Bank Account</field>
<field name="sequence">100</field> <!-- after "Online Payment" -->
</record>
<!-- ONBOARDING PANELS -->
<record id="onboarding_onboarding_account_invoice" model="onboarding.onboarding">
<field name="name">Invoicing Onboarding</field>
<field name="step_ids" eval="[
Command.link(ref('account.onboarding_onboarding_step_company_data')),
Command.link(ref('account.onboarding_onboarding_step_base_document_layout')),
Command.link(ref('account.onboarding_onboarding_step_create_invoice'))
]"/>
<field name="route_name">account_invoice</field>
<field name="panel_close_action_name">action_close_panel_account_invoice</field>
</record>
<record id="onboarding_onboarding_account_dashboard" model="onboarding.onboarding">
<field name="name">Account Dashboard Onboarding</field>
<field name="step_ids" eval="[
Command.link(ref('account.onboarding_onboarding_step_fiscal_year')),
Command.link(ref('account.onboarding_onboarding_step_bank_account')),
Command.link(ref('account.onboarding_onboarding_step_default_taxes')),
Command.link(ref('account.onboarding_onboarding_step_chart_of_accounts'))
]"/>
<field name="route_name">account_dashboard</field>
<field name="panel_close_action_name">action_close_panel_account_dashboard</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="ir_cron_auto_post_draft_entry" model="ir.cron">
<field name="name">Account: Post draft entries with auto_post enabled and accounting date up to today</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="nextcall" eval="(DateTime.now().replace(hour=2, minute=0) + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')" />
<field name="doall" eval="False"/>
<field name="model_id" ref="model_account_move"/>
<field name="code">model._autopost_draft_entries()</field>
<field name="state">code</field>
</record>
<record id="ir_cron_account_move_send" model="ir.cron">
<field name="name">Send invoices automatically</field>
<field name="model_id" ref="model_account_move"/>
<field name="state">code</field>
<field name="code">model._cron_account_move_send(job_count=20)</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
</record>
</odoo>
"id","name","code","account_type","tag_ids","reconcile"
"current_assets","Current Assets","1010","asset_current","","False"
"stock_valuation","Stock Valuation","1101","asset_current","","False"
"stock_in","Stock Interim (Received)","1102","asset_current","","True"
"stock_out","Stock Interim (Delivered)","1103","asset_current","","True"
"cost_of_production","Cost of Production","1104","asset_current","","True"
"receivable","Account Receivable","1210","asset_receivable","","True"
"to_receive_rec","Products to receive","1211","asset_current","","True"
"tax_paid","Tax Paid","1310","asset_current","","False"
"tax_receivable","Tax Receivable","1320","asset_current","","False"
"prepayments","Prepayments","1410","asset_prepayments","","False"
"fixed_assets","Fixed Asset","1510","asset_fixed","","False"
"non_current_assets","Non-current assets","1910","asset_non_current","","False"
"current_liabilities","Current Liabilities","2010","liability_current","","False"
"payable","Account Payable","2110","liability_payable","","True"
"to_receive_pay","Bills to receive","2111","liability_current","","True"
"salary_payable","Salary Payable","2300","liability_current","","True"
"employee_payroll_taxes","Employee Payroll Taxes","2301","liability_current","","True"
"employer_payroll_taxes","Employer Payroll Taxes","2302","liability_current","","True"
"tax_received","Tax Received","2510","liability_current","","False"
"tax_payable","Tax Payable","2520","liability_current","","False"
"non_current_liabilities","Non-current Liabilities","2910","liability_non_current","","False"
"capital","Capital","3010","equity","","False"
"dividends","Dividends","3020","equity","","False"
"income","Product Sales","4000","income","account.account_tag_operating","False"
"income_currency_exchange","Foreign Exchange Gain","4410","income","account.account_tag_financing","False"
"cash_diff_income","Cash Difference Gain","4420","income","account.account_tag_investing","False"
"cash_discount_loss","Cash Discount Loss","4430","expense","","False"
"other_income","Other Income","4500","income_other","","False"
"cost_of_goods_sold","Cost of Goods Sold","5000","expense_direct_cost","account.account_tag_operating","False"
"expense","Expenses","6000","expense","account.account_tag_operating","False"
"expense_invest","Purchase of Equipments","6110","expense","account.account_tag_investing","False"
"expense_rent","Rent","6120","expense","account.account_tag_investing","False"
"expense_finance","Bank Fees","6200","expense","account.account_tag_financing","False"
"expense_salary","Salary Expenses","6300","expense","account.account_tag_operating","False"
"expense_currency_exchange","Foreign Exchange Loss","6410","expense","account.account_tag_financing","False"
"cash_diff_expense","Cash Difference Loss","6420","expense","account.account_tag_investing","False"
"cash_discount_gain","Cash Discount Gain","6430","income","","False"
"expense_rd","RD Expenses","9610","expense","account.account_tag_investing","False"
"expense_sales","Sales Expenses","9620","expense","account.account_tag_investing","False"
"pos_receivable","Account Receivable (PoS)","1013","asset_receivable","","True"
"id","name","description","invoice_label","amount","type_tax_use","tax_group_id","repartition_line_ids/document_type","repartition_line_ids/factor_percent","repartition_line_ids/repartition_type","repartition_line_ids/account_id"
"sale_tax_template","15%","","","15","sale","tax_group_15","invoice","100","base",""
"","","","","","","","invoice","100","tax","tax_received"
"","","","","","","","refund","100","base",""
"","","","","","","","refund","100","tax","tax_received"
"purchase_tax_template","15%","","","15","purchase","tax_group_15","invoice","100","base",""
"","","","","","","","invoice","100","tax","tax_paid"
"","","","","","","","refund","100","base",""
"","","","","","","","refund","100","tax","tax_paid"
id,name,country_id,tax_payable_account_id,tax_receivable_account_id
tax_group_15,Tax 15%,base.us,tax_payable,tax_receivable
# -*- coding: utf-8 -*-
from . import account_demo
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(3, ref('account.group_account_manager'))]"/>
</record>
</data>
<data>
<!-- TAGS FOR RETRIEVING THE DEMO ACCOUNTS -->
<record id="demo_capital_account" model="account.account.tag">
<field name="name">Demo Capital Account</field>
</record>
<record id="demo_stock_account" model="account.account.tag">
<field name="name">Demo Stock Account</field>
</record>
<record id="demo_sale_of_land_account" model="account.account.tag">
<field name="name">Demo Sale of Land Account</field>
</record>
<record id="demo_ceo_wages_account" model="account.account.tag">
<field name="name">Demo CEO Wages Account</field>
</record>
<record id="demo_office_furniture_account" model="account.account.tag">
<field name="name">Office Furniture</field>
</record>
<!-- Install the demo if demo installation is triggered manually after install without demo -->
<function model="account.chart.template" name="_install_demo">
<value model="res.company" search="[('chart_template', '!=', False)]"/>
</function>
<function model="account.chart.template" name="try_loading">
<value eval="[]"/>
<value>generic_coa</value>
<value model="res.company" search="[('partner_id.country_id.code', 'in', ['US', False])]"/>
</function>
<!-- Payment Terms -->
<record id="account_payment_term_advance" model="account.payment.term">
<field name="name">30% Advance End of Following Month</field>
<field name="note">Payment terms: 30% Advance End of Following Month</field>
<field name="line_ids" eval="[
Command.clear(),
Command.create({'value': 'percent', 'value_amount': 30.0, 'nb_days': 0}),
Command.create({'value': 'percent', 'value_amount': 70.0, 'delay_type': 'days_after_end_of_next_month','nb_days': 0})]"/>
</record>
<!-- Add Payment terms on some demo partners -->
<record id="base.res_partner_2" model="res.partner">
<field name="property_payment_term_id" ref="account.account_payment_term_30days"/>
</record>
<record id="base.res_partner_12" model="res.partner">
<field name="property_payment_term_id" ref="account.account_payment_term_end_following_month"/>
<field name="property_supplier_payment_term_id" ref="account.account_payment_term_end_following_month"/>
</record>
<record id="base.res_partner_4" model="res.partner">
<field name="property_supplier_payment_term_id" ref="account.account_payment_term_30days"/>
</record>
<record id="base.res_partner_1" model="res.partner">
<field name="property_supplier_payment_term_id" ref="account.account_payment_term_end_following_month"/>
</record>
<!-- Analytic -->
<record id="analytic.analytic_plan_internal" model="account.analytic.plan">
<field name="applicability_ids" eval="[
Command.create({
'business_domain': 'invoice',
'account_prefix': '450000',
'applicability': 'mandatory'})]"/>
</record>
</data>
</odoo>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment