Commit b4974a92 authored by rex wu's avatar rex wu
Browse files

Merge branch 'deploy' into '15.0'

# Conflicts:
#   extra-addons/kci-mrp/models/mrp_bom.py
parents bb063cad bbccbc70
Showing with 8 additions and 1917 deletions
+8 -1917
......@@ -24,7 +24,11 @@ odoo/addons/base/maintenance
odoo-data/
odoo-db-data/
<<<<<<< HEAD
odoo-web-data/
=======
config/
>>>>>>> 8c178c445794b3f52954ad186b6f27a9463b2c38
# generated for windows installer?
install/win32/*.bat
......@@ -53,3 +57,7 @@ package.json
/venv/
# avoid adding it after generation from tsconfig command
tsconfig.json
# deploy stage
/addons/
/odoo/
Contributing to Odoo
====================
[Full contribution guidelines](https://github.com/odoo/odoo/wiki/Contributing)
TL;DR
* If you [make a pull request](https://github.com/odoo/odoo/wiki/Contributing#making-pull-requests),
do not create an issue! Use the PR description for that
* Issues are handled with a much lower priority than pull requests
* Use this [template](https://github.com/odoo/odoo/tree/15.0/.github/ISSUE_TEMPLATE.md)
when reporting issues. Please search for duplicates first!
* Pull requests must be made against the [correct version](https://github.com/odoo/odoo/wiki/Contributing#against-which-version-should-i-submit-a-patch)
* There are restrictions on the kind of [changes allowed in stable series](https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean)
Most of the files are
Copyright (c) 2004-2015 Odoo S.A.
Many files also contain contributions from third
parties. In this case the original copyright of
the contributions can be traced through the
history of the source version control system.
When that is not the case, the files contain a prominent
notice stating the original copyright and applicable
license, or come with their own dedicated COPYRIGHT
and/or LICENSE file.
This diff is collapsed.
include requirements.txt
include LICENSE
include README.md
graft odoo
recursive-exclude * *.py[co]
recursive-exclude .git *
[![Build Status](https://runbot.odoo.com/runbot/badge/flat/1/master.svg)](https://runbot.odoo.com/runbot)
[![Tech Doc](https://img.shields.io/badge/master-docs-875A7B.svg?style=flat&colorA=8F8F8F)](https://www.odoo.com/documentation/15.0)
[![Help](https://img.shields.io/badge/master-help-875A7B.svg?style=flat&colorA=8F8F8F)](https://www.odoo.com/forum/help-1)
[![Nightly Builds](https://img.shields.io/badge/master-nightly-875A7B.svg?style=flat&colorA=8F8F8F)](https://nightly.odoo.com/)
Odoo
----
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an <a href="https://www.odoo.com/page/crm">Open Source CRM</a>,
<a href="https://www.odoo.com/app/website">Website Builder</a>,
<a href="https://www.odoo.com/app/ecommerce">eCommerce</a>,
<a href="https://www.odoo.com/app/inventory">Warehouse Management</a>,
<a href="https://www.odoo.com/app/project">Project Management</a>,
<a href="https://www.odoo.com/app/accounting">Billing &amp; Accounting</a>,
<a href="https://www.odoo.com/app/point-of-sale-shop">Point of Sale</a>,
<a href="https://www.odoo.com/app/employees">Human Resources</a>,
<a href="https://www.odoo.com/app/social-marketing">Marketing</a>,
<a href="https://www.odoo.com/app/manufacturing">Manufacturing</a>,
<a href="https://www.odoo.com/">...</a>
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get
a full-featured <a href="https://www.odoo.com">Open Source ERP</a> when you install several Apps.
Getting started with Odoo
-------------------------
For a standard installation please follow the <a href="https://www.odoo.com/documentation/15.0/administration/install.html">Setup instructions</a>
from the documentation.
To learn the software, we recommend the <a href="https://www.odoo.com/slides">Odoo eLearning</a>, or <a href="https://www.odoo.com/page/scale-up-business-game">Scale-up</a>, the <a href="https://www.odoo.com/page/scale-up-business-game">business game</a>. Developers can start with <a href="https://www.odoo.com/documentation/15.0/developer/howtos.html">the developer tutorials</a>
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 15.0 | :white_check_mark: |
| 14.0 | :white_check_mark: |
| 13.0 | :white_check_mark: |
| <=12.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).
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.
from . import controllers
from . import models
from . import demo
from . import wizard
from . import report
from . import populate
from odoo import api, SUPERUSER_ID
SYSCOHADA_LIST = ['BJ', 'BF', 'CM', 'CF', 'KM', 'CG', 'CI', 'GA', 'GN', 'GW', 'GQ', 'ML', 'NE', 'CD', 'SN', 'TD', 'TG']
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_code = env.company.country_id.code
if country_code:
#auto install localization module(s) if available
to_install_l10n = env['ir.module.module'].search_count([
('category_id', '=', env.ref('base.module_category_accounting_localizations_account_charts').id),
('state', '=', 'to install'),
])
module_list = []
if to_install_l10n:
# We don't install a CoA if one was passed in the command line
# or has been selected to install
pass
elif country_code in SYSCOHADA_LIST:
#countries using OHADA Chart of Accounts
module_list.append('l10n_syscohada')
elif country_code == 'GB':
module_list.append('l10n_uk')
elif country_code == 'DE':
module_list.append('l10n_de_skr03')
module_list.append('l10n_de_skr04')
else:
if env['ir.module.module'].search([('name', '=', 'l10n_' + country_code.lower())]):
module_list.append('l10n_' + country_code.lower())
else:
module_list.append('l10n_generic_coa')
if country_code in ['US', 'CA']:
module_list.append('account_check_printing')
if country_code in SYSCOHADA_LIST + [
'AT', 'BE', 'CA', 'CO', 'DE', 'EC', 'ES', 'ET', 'FR', 'GR', 'IT', 'LU', 'MX', 'NL', 'NO',
'PL', 'PT', 'RO', 'SI', 'TR', 'GB', 'VE', 'VN'
]:
module_list.append('base_vat')
if country_code == 'MX':
module_list.append('l10n_mx_edi')
if country_code == 'IT':
module_list.append('l10n_it_edi_sdicoop')
if country_code == 'SA':
module_list.append('l10n_sa_invoice')
module_ids = env['ir.module.module'].search([('name', 'in', module_list), ('state', '=', 'uninstalled')])
module_ids.sudo().button_install()
def _account_post_init(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
_auto_install_l10n(env)
_set_fiscal_country(env)
# -*- 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',
'images' : ['images/accounts.jpeg','images/bank_statement.jpeg','images/cash_register.jpeg','images/chart_of_accounts.jpeg','images/customer_invoice.jpeg','images/journal_entries.jpeg'],
'depends' : ['base_setup', 'product', 'analytic', 'portal', 'digest'],
'data': [
'security/account_security.xml',
'security/ir.model.access.csv',
'data/data_account_type.xml',
'data/account_data.xml',
'data/digest_data.xml',
'views/account_report.xml',
'data/mail_template_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',
'wizard/pos_box.xml',
'views/account_account_type_views.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_chart_template_views.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_view.xml',
'views/report_invoice.xml',
'report/account_invoice_report_view.xml',
'views/account_cash_rounding_view.xml',
'wizard/account_report_common_view.xml',
'views/report_journal.xml',
'views/tax_adjustments.xml',
'wizard/wizard_tax_adjustments_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',
'views/account_onboarding_templates.xml',
'data/service_cron.xml',
'views/account_incoterms_view.xml',
'data/account_incoterms_data.xml',
'views/digest_views.xml',
'wizard/account_invoice_send_views.xml',
'views/account_tax_report_views.xml',
'report/account_hash_integrity_templates.xml',
'views/res_currency.xml',
'views/account_menuitem.xml',
'views/account_analytic_default_view.xml',
'wizard/account_tour_upload_bill.xml',
'wizard/accrued_orders.xml',
'views/bill_preview_template.xml',
],
'demo': [
'demo/account_demo.xml',
],
'installable': True,
'application': True,
'auto_install': False,
'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/css/tax_totals.css',
'account/static/src/scss/account_reconciliation.scss',
'account/static/src/scss/account_journal_dashboard.scss',
'account/static/src/scss/account_dashboard.scss',
'account/static/src/scss/account_searchpanel.scss',
'account/static/src/scss/section_and_note_backend.scss',
'account/static/src/scss/account_activity.scss',
'account/static/src/js/account_payment_field.js',
'account/static/src/js/account_resequence_field.js',
'account/static/src/js/grouped_view_widget.js',
'account/static/src/js/mail_activity.js',
'account/static/src/js/tax_totals.js',
'account/static/src/js/section_and_note_fields_backend.js',
'account/static/src/js/tours/account.js',
'account/static/src/js/bills_upload.js',
'account/static/src/js/account_selection.js',
],
'web.assets_frontend': [
'account/static/src/js/account_portal_sidebar.js',
],
'web.assets_tests': [
'account/static/tests/tours/**/*',
],
'web.qunit_suite_tests': [
('after', 'web/static/tests/legacy/views/kanban_tests.js', 'account/static/tests/account_payment_field_tests.js'),
('after', 'web/static/tests/legacy/views/kanban_tests.js', 'account/static/tests/section_and_note_tests.js'),
],
'web.assets_qweb': [
'account/static/src/xml/**/*',
],
},
'license': 'LGPL-3',
}
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import onboarding
from . import portal
from . import terms
from odoo import http
from odoo.http import request
class OnboardingController(http.Controller):
@http.route('/account/account_invoice_onboarding', auth='user', type='json')
def account_invoice_onboarding(self):
""" Returns the `banner` for the account invoice onboarding panel.
It can be empty if the user has closed it or if he doesn't have
the permission to see it. """
company = request.env.company
if not request.env.is_admin() or \
company.account_invoice_onboarding_state == 'closed':
return {}
return {
'html': request.env.ref('account.account_invoice_onboarding_panel')._render({
'company': company,
'state': company.get_and_update_account_invoice_onboarding_state()
})
}
@http.route('/account/account_dashboard_onboarding', auth='user', type='json')
def account_dashboard_onboarding(self):
""" Returns the `banner` for the account dashboard onboarding panel.
It can be empty if the user has closed it or if he doesn't have
the permission to see it. """
company = request.env.company
if not request.env.is_admin() or \
company.account_dashboard_onboarding_state == 'closed':
return {}
return {
'html': request.env.ref('account.account_dashboard_onboarding_panel')._render({
'company': company,
'state': company.get_and_update_account_dashboard_onboarding_state()
})
}
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http, _
from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager
from odoo.exceptions import AccessError, MissingError
from collections import OrderedDict
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()) \
if request.env['account.move'].check_access_rights('read', raise_exception=False) else 0
values['invoice_count'] = invoice_count
return values
# ------------------------------------------------------------
# My Invoices
# ------------------------------------------------------------
def _invoice_get_page_view_values(self, invoice, access_token, **kwargs):
values = {
'page_name': 'invoice',
'invoice': invoice,
}
return self._get_page_view_values(invoice, access_token, values, 'my_invoices_history', False, **kwargs)
def _get_invoices_domain(self):
return [('move_type', 'in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', '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_portal_layout_values()
AccountInvoice = request.env['account.move']
domain = self._get_invoices_domain()
searchbar_sortings = {
'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'},
}
# default sort by order
if not sortby:
sortby = 'date'
order = searchbar_sortings[sortby]['order']
searchbar_filters = {
'all': {'label': _('All'), 'domain': []},
'invoices': {'label': _('Invoices'), 'domain': [('move_type', '=', ('out_invoice', 'out_refund'))]},
'bills': {'label': _('Bills'), 'domain': [('move_type', '=', ('in_invoice', 'in_refund'))]},
}
# 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)]
# count for pager
invoice_count = AccountInvoice.search_count(domain)
# pager
pager = portal_pager(
url="/my/invoices",
url_args={'date_begin': date_begin, 'date_end': date_end, 'sortby': sortby},
total=invoice_count,
page=page,
step=self._items_per_page
)
# content according to pager and archive selected
invoices = AccountInvoice.search(domain, order=order, limit=self._items_per_page, offset=pager['offset'])
request.session['my_invoices_history'] = invoices.ids[:100]
values.update({
'date': date_begin,
'invoices': invoices,
'page_name': 'invoice',
'pager': pager,
'default_url': '/my/invoices',
'searchbar_sortings': searchbar_sortings,
'sortby': sortby,
'searchbar_filters': OrderedDict(sorted(searchbar_filters.items())),
'filterby':filterby,
})
return request.render("account.portal_my_invoices", 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 in ('html', 'pdf', 'text'):
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):
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
if 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
# -*- 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>
</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="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 15, 'option': 'day_after_invoice_date'})]"/>
</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="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 21, 'option': 'day_after_invoice_date'})]"/>
</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="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 30, 'option': 'day_after_invoice_date'})]"/>
</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="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 45, 'option': 'day_after_invoice_date'})]"/>
</record>
<record id="account_payment_term_2months" model="account.payment.term">
<field name="name">2 Months</field>
<field name="note">Payment terms: 2 Months</field>
<field name="line_ids" eval="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 60, 'option': 'day_after_invoice_date'})]"/>
</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="[(5, 0), (0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 31, 'option': 'day_following_month'})]"/>
</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="[(5, 0), (0, 0, {'value': 'percent', 'value_amount': 30.0, 'sequence': 400, 'days': 0, 'option': 'day_after_invoice_date'}),
(0, 0, {'value': 'balance', 'value_amount': 0.0, 'sequence': 500, 'days': 60, 'option': 'day_after_invoice_date'})]"/>
</record>
<!--
Account Statement Sequences
-->
<record id="sequence_reconcile_seq" model="ir.sequence">
<field name="name">Account reconcile sequence</field>
<field name="code">account.reconcile</field>
<field name="prefix">A</field>
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
<field eval="False" name="company_id"/>
</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>
<!-- Account Tax Group -->
<record id="tax_group_taxes" model="account.tax.group">
<field name="name">Taxes</field>
<field name="sequence">0</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 noupdate="1">
<!-- account.account.type -->
<record model="account.account.type" id="data_account_type_receivable">
<field name="name">Receivable</field>
<field name="type">receivable</field>
<field name="internal_group">asset</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_payable">
<field name="name">Payable</field>
<field name="type">payable</field>
<field name="internal_group">liability</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_liquidity">
<field name="name">Bank and Cash</field>
<field name="type">liquidity</field>
<field name="internal_group">asset</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_credit_card">
<field name="name">Credit Card</field>
<field name="type">liquidity</field>
<field name="internal_group">liability</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_current_assets">
<field name="name">Current Assets</field>
<field name="type">other</field>
<field name="internal_group">asset</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_non_current_assets">
<field name="name">Non-current Assets</field>
<field name="type">other</field>
<field name="internal_group">asset</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_prepayments">
<field name="name">Prepayments</field>
<field name="type">other</field>
<field name="internal_group">asset</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_fixed_assets">
<field name="name">Fixed Assets</field>
<field name="type">other</field>
<field name="internal_group">asset</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_current_liabilities">
<field name="name">Current Liabilities</field>
<field name="type">other</field>
<field name="internal_group">liability</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_non_current_liabilities">
<field name="name">Non-current Liabilities</field>
<field name="type">other</field>
<field name="internal_group">liability</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_equity">
<field name="name">Equity</field>
<field name="internal_group">equity</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_unaffected_earnings">
<field name="name">Current Year Earnings</field>
<field name="internal_group">equity</field>
<field name="include_initial_balance" eval="True"/>
</record>
<record model="account.account.type" id="data_account_type_revenue">
<field name="name">Income</field>
<field name="type">other</field>
<field name="internal_group">income</field>
</record>
<record model="account.account.type" id="data_account_type_other_income">
<field name="name">Other Income</field>
<field name="type">other</field>
<field name="internal_group">income</field>
</record>
<record model="account.account.type" id="data_account_type_expenses">
<field name="name">Expenses</field>
<field name="type">other</field>
<field name="internal_group">expense</field>
</record>
<record model="account.account.type" id="data_account_type_depreciation">
<field name="name">Depreciation</field>
<field name="type">other</field>
<field name="internal_group">expense</field>
</record>
<record model="account.account.type" id="data_account_type_direct_costs">
<field name="name">Cost of Revenue</field>
<field name="type">other</field>
<field name="internal_group">expense</field>
</record>
<record model="account.account.type" id="data_account_off_sheet">
<field name="name">Off-Balance Sheet</field>
<field name="type">other</field>
<field name="internal_group">off_balance</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="/account/static/src/img/invoice-stamps.png" 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: Send by email</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="email_from">{{ (object.invoice_user_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="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 <strong t-out="object.name or ''">INV/2021/05/0005</strong>
</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 <strong t-out="format_amount(object.amount_total, object.currency_id) or ''">$ 143,750.00</strong>
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>
<br /><br />
Do not hesitate to contact us if you have any questions.
<t t-if="object.invoice_user_id.signature">
<br />
<t t-out="object.invoice_user_id.signature or ''">--<br/>Mitchell Admin</t>
</t>
</p>
</div>
</field>
<field name="report_template" ref="account_invoices"/>
<field name="report_name">Invoice_{{ (object.name or '').replace('/','_') }}{{ object.state == 'draft' and '_draft' or '' }}</field>
<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 Receipt: Send by email</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="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 <strong t-out="(object.name or '').replace('/','-') or ''">BNK1-2021-05-0002</strong> amounting
to <strong t-out="format_amount(object.amount, object.currency_id) or ''">$ 10.00</strong> 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="user.signature">
<br/>
<t t-out="user.signature or ''">--<br/>Mitchell Admin</t>
</t>
</p>
</div>
</field>
<field name="report_template" ref="account.action_report_payment_receipt"/>
<field name="report_name">{{ (object.name or '').replace('/','-') }}</field>
<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: Send by email</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="email_from">{{ (object.invoice_user_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="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 <strong t-out="object.name or ''">RINV/2021/05/0001</strong>
</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 <strong t-out="format_amount(object.amount_total, object.currency_id) or ''">$ 143,750.00</strong>
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="object.invoice_user_id.signature">
<br />
<t t-out="object.invoice_user_id.signature or ''">--<br/>Mitchell Admin</t>
</t>
</p>
</div>
</field>
<field name="report_template" ref="account_invoices"/>
<field name="report_name">Credit_note_{{ (object.name or '').replace('/','_') }}{{ object.state == 'draft' and '_draft' or '' }}</field>
<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>
<record id="ir_cron_auto_post_draft_entry" model="ir.cron">
<field name="name">Account; Post draft entries with auto_post set to True 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>
</odoo>
Supports Markdown
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