[IMP] account*: Improve the settings form view
This commit is contained in:
@@ -38,15 +38,12 @@ You could use this simplified accounting in case you work with an (external) acc
|
||||
'views/partner_view.xml',
|
||||
'views/product_view.xml',
|
||||
'views/account_analytic_view.xml',
|
||||
'views/res_config_view.xml',
|
||||
'views/account_tip_data.xml',
|
||||
'views/account.xml',
|
||||
'views/report_invoice.xml',
|
||||
'report/account_invoice_report_view.xml',
|
||||
'report/inherited_layouts.xml',
|
||||
'views/account_journal_dashboard_view.xml',
|
||||
'views/report_overdue.xml',
|
||||
'views/web_planner_data.xml',
|
||||
'views/report_overdue.xml',
|
||||
'wizard/account_report_common_view.xml',
|
||||
'wizard/account_report_print_journal_view.xml',
|
||||
@@ -64,6 +61,9 @@ You could use this simplified accounting in case you work with an (external) acc
|
||||
'views/report_agedpartnerbalance.xml',
|
||||
'views/tax_adjustments.xml',
|
||||
'wizard/wizard_tax_adjustments_view.xml',
|
||||
'views/res_config_view.xml',
|
||||
'views/web_planner_data.xml',
|
||||
'views/account_journal_dashboard_view.xml',
|
||||
],
|
||||
'demo': [
|
||||
'demo/account_demo.xml',
|
||||
|
||||
@@ -23,8 +23,7 @@ class ResCompany(models.Model):
|
||||
tax_calculation_rounding_method = fields.Selection([
|
||||
('round_per_line', 'Round per Line'),
|
||||
('round_globally', 'Round Globally'),
|
||||
], default='round_per_line', string='Tax Calculation Rounding Method',
|
||||
help="If you select 'Round per Line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax. If you select 'Round Globally': for each tax, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually this total tax amount will be rounded. If you sell with tax included, you should choose 'Round per line' because you certainly want the sum of your tax-included line subtotals to be equal to the total amount with taxes.")
|
||||
], default='round_per_line', string='Tax Calculation Rounding Method')
|
||||
currency_exchange_journal_id = fields.Many2one('account.journal', string="Exchange Gain or Loss Journal", domain=[('type', '=', 'general')])
|
||||
income_currency_exchange_account_id = fields.Many2one('account.account', related='currency_exchange_journal_id.default_credit_account_id',
|
||||
string="Gain Exchange Rate Account", domain="[('internal_type', '=', 'other'), ('deprecated', '=', False), ('company_id', '=', id)]")
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import time
|
||||
import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
import odoo
|
||||
from odoo import SUPERUSER_ID
|
||||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
|
||||
from odoo import api, fields, models, _
|
||||
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
@@ -15,253 +10,93 @@ class AccountConfigSettings(models.TransientModel):
|
||||
_name = 'account.config.settings'
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
@api.one
|
||||
@api.depends('company_id')
|
||||
def _get_currency_id(self):
|
||||
self.currency_id = self.company_id.currency_id
|
||||
|
||||
@api.one
|
||||
def _set_currency_id(self):
|
||||
if self.currency_id != self.company_id.currency_id:
|
||||
self.company_id.currency_id = self.currency_id
|
||||
|
||||
company_id = fields.Many2one('res.company', string='Company', required=True,
|
||||
default=lambda self: self.env.user.company_id)
|
||||
has_default_company = fields.Boolean(readonly=True,
|
||||
default=lambda self: self._default_has_default_company())
|
||||
expects_chart_of_accounts = fields.Boolean(related='company_id.expects_chart_of_accounts',
|
||||
string='This company has its own chart of accounts',
|
||||
help='Check this box if this company is a legal entity.')
|
||||
currency_id = fields.Many2one('res.currency', compute='_get_currency_id', inverse='_set_currency_id', required=True,
|
||||
string='Default company currency', help="Main currency of the company.")
|
||||
company_footer = fields.Text(related='company_id.rml_footer', string='Bank accounts footer preview',
|
||||
readonly=True, help="Bank accounts as printed in the footer of each printed document")
|
||||
|
||||
has_chart_of_accounts = fields.Boolean(string='Company has a chart of accounts')
|
||||
currency_id = fields.Many2one('res.currency', related="company_id.currency_id", required=True,
|
||||
string='Currency', help="Main currency of the company.")
|
||||
has_chart_of_accounts = fields.Boolean(compute='_compute_has_chart_of_accounts', string='Company has a chart of accounts')
|
||||
chart_template_id = fields.Many2one('account.chart.template', string='Template',
|
||||
domain="[('visible','=', True)]")
|
||||
use_anglo_saxon = fields.Boolean(string='Use Anglo-Saxon Accounting *', related='company_id.anglo_saxon_accounting')
|
||||
code_digits = fields.Integer(string='# of Digits *', related='company_id.accounts_code_digits', help="No. of digits to use for account code")
|
||||
tax_calculation_rounding_method = fields.Selection(
|
||||
[
|
||||
tax_calculation_rounding_method = fields.Selection([
|
||||
('round_per_line', 'Round calculation of taxes per line'),
|
||||
('round_globally', 'Round globally calculation of taxes '),
|
||||
], related='company_id.tax_calculation_rounding_method', string='Tax calculation rounding method *',
|
||||
help="""If you select 'Round per line' : for each tax, the tax amount will first be
|
||||
computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed,
|
||||
leading to the total amount for that tax. If you select 'Round globally': for each tax,
|
||||
the tax amount will be computed for each PO/SO/invoice line, then these amounts will be
|
||||
summed and eventually this total tax amount will be rounded. If you sell with tax included,
|
||||
you should choose 'Round per line' because you certainly want the sum of your tax-included line
|
||||
subtotals to be equal to the total amount with taxes.""")
|
||||
sale_tax_id = fields.Many2one('account.tax.template', string='Default sale tax', oldname="sale_tax")
|
||||
purchase_tax_id = fields.Many2one('account.tax.template', string='Default purchase tax', oldname="purchase_tax")
|
||||
sale_tax_rate = fields.Float(string='Sales tax (%)')
|
||||
purchase_tax_rate = fields.Float(string='Purchase tax (%)')
|
||||
bank_account_code_prefix = fields.Char(string='Bank Accounts Prefix *', related='company_id.bank_account_code_prefix', help='Define the code prefix for the bank accounts', oldname='bank_account_code_char')
|
||||
cash_account_code_prefix = fields.Char(string='Cash Accounts Prefix *', related='company_id.cash_account_code_prefix', help='Define the code prefix for the cash accounts')
|
||||
template_transfer_account_id = fields.Many2one('account.account.template', help="Intermediary account used when moving money from a liquidity account to another")
|
||||
transfer_account_id = fields.Many2one('account.account',
|
||||
related='company_id.transfer_account_id',
|
||||
domain=lambda self: [('reconcile', '=', True), ('user_type_id.id', '=', self.env.ref('account.data_account_type_current_assets').id)],
|
||||
help="Intermediary account used when moving money from a liquidity account to another")
|
||||
complete_tax_set = fields.Boolean(string='Complete set of taxes',
|
||||
help='''This boolean helps you to choose if you want to propose to the user to encode
|
||||
the sales and purchase rates or use the usual m2o fields. This last choice assumes that
|
||||
the set of tax defined for the chosen template is complete''')
|
||||
|
||||
fiscalyear_last_day = fields.Integer(related='company_id.fiscalyear_last_day', default=31)
|
||||
fiscalyear_last_month = fields.Selection([(1, 'January'), (2, 'February'), (3, 'March'), (4, 'April'), (5, 'May'), (6, 'June'), (7, 'July'), (8, 'August'), (9, 'September'), (10, 'October'), (11, 'November'), (12, 'December')], related='company_id.fiscalyear_last_month', default=12)
|
||||
period_lock_date = fields.Date(string="Lock Date for Non-Advisers", related='company_id.period_lock_date', help="Only users with the 'Adviser' role can edit accounts prior to and inclusive of this date. Use it for period locking inside an open fiscal year, for example.")
|
||||
fiscalyear_lock_date = fields.Date(string="Lock Date", related='company_id.fiscalyear_lock_date', help="No users, including Advisers, can edit accounts prior to and inclusive of this date. Use it for fiscal year locking for example.")
|
||||
|
||||
module_account_accountant = fields.Boolean(string='Full accounting features: journals, legal statements, chart of accounts, etc.',
|
||||
help="""If you do not check this box, you will be able to do invoicing & payments,
|
||||
but not accounting (Journal Items, Chart of Accounts, ...)""")
|
||||
module_account_reports = fields.Boolean("Get dynamic accounting reports")
|
||||
], related='company_id.tax_calculation_rounding_method', string='Tax calculation rounding method')
|
||||
module_account_accountant = fields.Boolean(string='Accounting')
|
||||
group_multi_currency = fields.Boolean(string='Allow multi currencies',
|
||||
implied_group='base.group_multi_currency',
|
||||
help="Allows to work in a multi currency environment")
|
||||
group_analytic_accounting = fields.Boolean(string='Analytic accounting',
|
||||
implied_group='analytic.group_analytic_accounting',
|
||||
help="Allows you to use the analytic accounting.")
|
||||
group_warning_account = fields.Selection([
|
||||
(0, 'All the partners can be used in invoices'),
|
||||
(1, 'An informative or blocking warning can be set on a partner')
|
||||
], "Warning", implied_group='account.group_warning_account')
|
||||
currency_exchange_journal_id = fields.Many2one('account.journal',
|
||||
related='company_id.currency_exchange_journal_id',
|
||||
string="Rate Difference Journal",)
|
||||
module_account_asset = fields.Boolean(string='Assets management',
|
||||
help='Asset management: This allows you to manage the assets owned by a company or a person. '
|
||||
'It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.\n\n'
|
||||
'-This installs the module account_asset.')
|
||||
module_account_deferred_revenue = fields.Boolean(string="Revenue Recognition",
|
||||
help='This allows you to manage the revenue recognition on selling products. '
|
||||
'It keeps track of the installments occurred on those revenue recognitions, '
|
||||
'and creates account moves for those installment lines\n'
|
||||
'-This installs the module account_deferred_revenue.')
|
||||
module_account_budget = fields.Boolean(string='Budget management',
|
||||
help='This allows accountants to manage analytic and crossovered budgets. '
|
||||
'Once the master budgets and the budgets are defined, '
|
||||
'the project managers can set the planned amount on each analytic account.\n'
|
||||
'-This installs the module account_budget.')
|
||||
|
||||
implied_group='base.group_multi_currency')
|
||||
group_analytic_accounting = fields.Boolean(string='Analytic Accounting',
|
||||
implied_group='analytic.group_analytic_accounting')
|
||||
group_warning_account = fields.Boolean(string="Warnings", implied_group='account.group_warning_account')
|
||||
module_account_asset = fields.Boolean(string='Assets Management')
|
||||
module_account_deferred_revenue = fields.Boolean(string="Revenue Recognition")
|
||||
module_account_budget = fields.Boolean(string='Budget Management')
|
||||
module_account_reports = fields.Boolean("Dynamic Reports")
|
||||
group_proforma_invoices = fields.Boolean(string='Allow pro-forma invoices',
|
||||
implied_group='account.group_proforma_invoices',
|
||||
help="Allows you to put invoices in pro-forma state.")
|
||||
module_account_reports_followup = fields.Boolean("Enable payment followup management",
|
||||
help='This allows to automate letters for unpaid invoices, with multi-level recalls.\n'
|
||||
'-This installs the module account_reports_followup.')
|
||||
module_account_reports_followup = fields.Boolean("Enable payment followup management")
|
||||
tax_cash_basis_journal_id = fields.Many2one(
|
||||
'account.journal',
|
||||
related='company_id.tax_cash_basis_journal_id',
|
||||
string="Tax Cash Basis Journal",)
|
||||
|
||||
default_sale_tax_id = fields.Many2one('account.tax', string="Default Sale Tax", help="This sale tax will be assigned by default on new products.", oldname="default_sale_tax")
|
||||
default_purchase_tax_id = fields.Many2one('account.tax', string="Default Purchase Tax", help="This purchase tax will be assigned by default on new products.", oldname="default_purchase_tax")
|
||||
|
||||
default_sale_tax_id = fields.Many2one('account.tax', string="Default Sale Tax",
|
||||
default_model="account.config.settings", company_dependent=True, oldname="default_sale_tax")
|
||||
default_purchase_tax_id = fields.Many2one('account.tax', string="Default Purchase Tax",
|
||||
default_model="account.config.settings", company_dependent=True, oldname="default_purchase_tax")
|
||||
module_l10n_us_check_printing = fields.Boolean("Allow check printing and deposits")
|
||||
|
||||
module_account_batch_deposit = fields.Boolean(string='Use batch deposit',
|
||||
help='This allows you to group received checks before you deposit them to the bank.\n'
|
||||
'-This installs the module account_batch_deposit.')
|
||||
module_account_sepa = fields.Boolean(string='Use SEPA payments',
|
||||
help='If you check this box, you will be able to register your payment using SEPA.\n'
|
||||
'-This installs the module account_sepa.')
|
||||
module_account_sepa = fields.Boolean(string='Use SEPA payments')
|
||||
module_account_plaid = fields.Boolean(string="Plaid Connector")
|
||||
module_account_yodlee = fields.Boolean("Bank Interface - Sync your bank feeds automatically")
|
||||
module_account_bank_statement_import_qif = fields.Boolean("Import .qif files")
|
||||
module_account_bank_statement_import_ofx = fields.Boolean("Import in .ofx format")
|
||||
module_account_bank_statement_import_csv = fields.Boolean("Import in .csv format")
|
||||
module_account_bank_statement_import_camt = fields.Boolean("Import in CAMT.053 format")
|
||||
module_currency_rate_live = fields.Boolean(string="Allow Currency Rate Live")
|
||||
module_print_docsaway = fields.Boolean(string="Docsaway")
|
||||
module_product_margin = fields.Boolean(string="Allow Product Margin")
|
||||
module_l10n_eu_service = fields.Boolean(string="EU Digital Goods VAT")
|
||||
|
||||
module_account_plaid = fields.Boolean(string="Plaid Connector",
|
||||
help='Get your bank statements from you bank and import them through plaid.com.\n'
|
||||
'-This installs the module account_plaid.')
|
||||
module_account_yodlee = fields.Boolean("Bank Interface - Sync your bank feeds automatically",
|
||||
help='Get your bank statements from your bank and import them through yodlee.com.\n'
|
||||
'-This installs the module account_yodlee.')
|
||||
module_account_bank_statement_import_qif = fields.Boolean("Import .qif files",
|
||||
help='Get your bank statements from your bank and import them in Odoo in the .QIF format.\n'
|
||||
'-This installs the module account_bank_statement_import_qif.')
|
||||
module_account_bank_statement_import_ofx = fields.Boolean("Import in .ofx format",
|
||||
help='Get your bank statements from your bank and import them in Odoo in the .OFX format.\n'
|
||||
'-This installs the module account_bank_statement_import_ofx.')
|
||||
module_account_bank_statement_import_csv = fields.Boolean("Import in .csv format",
|
||||
help='Get your bank statements from your bank and import them in Odoo in the .CSV format.\n'
|
||||
'-This installs the module account_bank_statement_import_csv.')
|
||||
module_account_bank_statement_import_camt = fields.Boolean("Import in CAMT.053 format",
|
||||
help='Get your bank statements from your bank and import them in Odoo in the CAMT format.\n'
|
||||
'-This installs the module account_bank_statement_import_camt.')
|
||||
overdue_msg = fields.Text(related='company_id.overdue_msg', string='Overdue Payments Message *')
|
||||
@api.depends('company_id')
|
||||
def _compute_has_chart_of_accounts(self):
|
||||
# import pdb; pdb.set_trace()
|
||||
self.has_chart_of_accounts = bool(self.company_id.chart_template_id)
|
||||
|
||||
|
||||
@api.model
|
||||
def _default_has_default_company(self):
|
||||
count = self.env['res.company'].search_count([])
|
||||
return bool(count == 1)
|
||||
|
||||
|
||||
@api.onchange('company_id')
|
||||
def onchange_company_id(self):
|
||||
# update related fields
|
||||
self.currency_id = False
|
||||
if self.company_id:
|
||||
company = self.company_id
|
||||
self.chart_template_id = company.chart_template_id
|
||||
self.has_chart_of_accounts = len(company.chart_template_id) > 0 or False
|
||||
self.expects_chart_of_accounts = company.expects_chart_of_accounts
|
||||
self.currency_id = company.currency_id
|
||||
self.transfer_account_id = company.transfer_account_id
|
||||
self.company_footer = company.rml_footer
|
||||
self.tax_calculation_rounding_method = company.tax_calculation_rounding_method
|
||||
self.bank_account_code_prefix = company.bank_account_code_prefix
|
||||
self.cash_account_code_prefix = company.cash_account_code_prefix
|
||||
self.code_digits = company.accounts_code_digits
|
||||
|
||||
# update taxes
|
||||
ir_values = self.env['ir.values']
|
||||
taxes_id = ir_values.get_default('product.template', 'taxes_id', company_id = self.company_id.id)
|
||||
supplier_taxes_id = ir_values.get_default('product.template', 'supplier_taxes_id', company_id = self.company_id.id)
|
||||
self.default_sale_tax_id = isinstance(taxes_id, list) and len(taxes_id) > 0 and taxes_id[0] or taxes_id
|
||||
self.default_purchase_tax_id = isinstance(supplier_taxes_id, list) and len(supplier_taxes_id) > 0 and supplier_taxes_id[0] or supplier_taxes_id
|
||||
return {}
|
||||
|
||||
@api.onchange('chart_template_id')
|
||||
def onchange_chart_template_id(self):
|
||||
tax_templ_obj = self.env['account.tax.template']
|
||||
self.complete_tax_set = self.sale_tax_id = self.purchase_tax_id = False
|
||||
self.sale_tax_rate = self.purchase_tax_rate = 15
|
||||
if self.chart_template_id and not self.has_chart_of_accounts:
|
||||
# update complete_tax_set, sale_tax_id and purchase_tax_id
|
||||
self.complete_tax_set = self.chart_template_id.complete_tax_set
|
||||
if self.chart_template_id.complete_tax_set:
|
||||
ir_values_obj = self.env['ir.values']
|
||||
# default tax is given by the lowest sequence. For same sequence we will take the latest created as it will be the case for tax created while isntalling the generic chart of account
|
||||
sale_tax = tax_templ_obj.search(
|
||||
[('chart_template_id', 'parent_of', self.chart_template_id.id), ('type_tax_use', '=', 'sale')], limit=1,
|
||||
order="sequence, id desc")
|
||||
purchase_tax = tax_templ_obj.search(
|
||||
[('chart_template_id', 'parent_of', self.chart_template_id.id), ('type_tax_use', '=', 'purchase')], limit=1,
|
||||
order="sequence, id desc")
|
||||
self.sale_tax_id = sale_tax
|
||||
self.purchase_tax_id = purchase_tax
|
||||
if self.chart_template_id.code_digits:
|
||||
self.code_digits = self.chart_template_id.code_digits
|
||||
if self.chart_template_id.transfer_account_id:
|
||||
self.template_transfer_account_id = self.chart_template_id.transfer_account_id.id
|
||||
if self.chart_template_id.bank_account_code_prefix:
|
||||
self.bank_account_code_prefix = self.chart_template_id.bank_account_code_prefix
|
||||
if self.chart_template_id.cash_account_code_prefix:
|
||||
self.cash_account_code_prefix = self.chart_template_id.cash_account_code_prefix
|
||||
return {}
|
||||
|
||||
@api.onchange('sale_tax_rate')
|
||||
def onchange_tax_rate(self):
|
||||
self.purchase_tax_rate = self.sale_tax_rate or False
|
||||
|
||||
@api.multi
|
||||
def set_group_multi_currency(self):
|
||||
ir_model = self.env['ir.model.data']
|
||||
group_user = ir_model.get_object('base', 'group_user')
|
||||
group_product = ir_model.get_object('product', 'group_sale_pricelist')
|
||||
if self.group_multi_currency:
|
||||
group_user.write({'implied_ids': [(4, group_product.id)]})
|
||||
self.env.ref('base.group_user').write({'implied_ids': [(4, self.env.ref('product.group_sale_pricelist').id)]})
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
def open_bank_accounts(self):
|
||||
action_rec = self.env['ir.model.data'].xmlid_to_object('account.action_account_bank_journal_form')
|
||||
return action_rec.read([])[0]
|
||||
|
||||
@api.multi
|
||||
def set_transfer_account(self):
|
||||
if self.transfer_account_id and self.transfer_account_id != self.company_id.transfer_account_id:
|
||||
self.company_id.write({'transfer_account_id': self.transfer_account_id.id})
|
||||
|
||||
@api.multi
|
||||
def set_product_taxes(self):
|
||||
def set_default_product_taxes(self):
|
||||
""" Set the product taxes if they have changed """
|
||||
# import pdb; pdb.set_trace()
|
||||
ir_values_obj = self.env['ir.values']
|
||||
if self.default_sale_tax_id:
|
||||
ir_values_obj.sudo().set_default('product.template', "taxes_id", [self.default_sale_tax_id.id], for_all_users=True, company_id=self.company_id.id)
|
||||
if self.default_purchase_tax_id:
|
||||
ir_values_obj.sudo().set_default('product.template', "supplier_taxes_id", [self.default_purchase_tax_id.id], for_all_users=True, company_id=self.company_id.id)
|
||||
|
||||
@api.multi
|
||||
def set_chart_of_accounts(self):
|
||||
""" install a chart of accounts for the given company (if required) """
|
||||
if self.chart_template_id and not self.has_chart_of_accounts and self.expects_chart_of_accounts:
|
||||
if self.chart_template_id and not self.has_chart_of_accounts and self.company_id.expects_chart_of_accounts:
|
||||
if self.company_id.chart_template_id and self.chart_template_id != self.company_id.chart_template_id:
|
||||
raise UserError(_('You can not change a company chart of account once it has been installed'))
|
||||
wizard = self.env['wizard.multi.charts.accounts'].create({
|
||||
'company_id': self.company_id.id,
|
||||
'chart_template_id': self.chart_template_id.id,
|
||||
'transfer_account_id': self.template_transfer_account_id.id,
|
||||
'transfer_account_id': self.chart_template_id.transfer_account_id.id,
|
||||
'code_digits': self.code_digits or 6,
|
||||
'sale_tax_id': self.sale_tax_id.id,
|
||||
'purchase_tax_id': self.purchase_tax_id.id,
|
||||
'sale_tax_rate': self.sale_tax_rate,
|
||||
'purchase_tax_rate': self.purchase_tax_rate,
|
||||
'complete_tax_set': self.complete_tax_set,
|
||||
'sale_tax_id': self.default_sale_tax_id.id,
|
||||
'purchase_tax_id': self.default_purchase_tax_id.id,
|
||||
'sale_tax_rate': 15.0,
|
||||
'purchase_tax_rate': 15.0,
|
||||
'complete_tax_set': self.chart_template_id.complete_tax_set,
|
||||
'currency_id': self.currency_id.id,
|
||||
'bank_account_code_prefix': self.bank_account_code_prefix or self.chart_template_id.bank_account_code_prefix,
|
||||
'cash_account_code_prefix': self.cash_account_code_prefix or self.chart_template_id.cash_account_code_prefix,
|
||||
'bank_account_code_prefix': self.chart_template_id.bank_account_code_prefix,
|
||||
'cash_account_code_prefix': self.chart_template_id.cash_account_code_prefix,
|
||||
})
|
||||
wizard.execute()
|
||||
|
||||
@@ -275,14 +110,7 @@ class AccountConfigSettings(models.TransientModel):
|
||||
if self.module_account_budget:
|
||||
self.group_analytic_accounting = True
|
||||
|
||||
@api.multi
|
||||
def open_company(self):
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': 'My Company',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'res.company',
|
||||
'res_id': self.env.user.company_id.id,
|
||||
'target': 'current',
|
||||
}
|
||||
@api.onchange('module_account_yodlee')
|
||||
def onchange_account_yodlee(self):
|
||||
if self.module_account_yodlee:
|
||||
self.module_account_plaid = True
|
||||
|
||||
@@ -1924,6 +1924,7 @@
|
||||
|
||||
<menuitem id="menu_product_product_action" name="Products" action="product_product_action" parent="account.menu_finance_configuration" sequence="1"/>
|
||||
|
||||
|
||||
<menuitem id="menu_product_template_action" name="Sellable Products"
|
||||
parent="menu_finance_receivables"
|
||||
action="product.product_template_action" sequence="110"/>
|
||||
|
||||
@@ -9,270 +9,374 @@
|
||||
<field name="search_view_id" ref="base.view_module_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="view_account_config_settings" model="ir.ui.view">
|
||||
<field name="name">account settings</field>
|
||||
<record id="account_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configure Accounting" class="oe_form_configuration">
|
||||
<header>
|
||||
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
|
||||
<button string="Save" type="object" name="execute" class="oe_highlight"/>
|
||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||
</header>
|
||||
<field name="has_default_company" invisible="1" />
|
||||
<field name="has_chart_of_accounts" invisible="1"/>
|
||||
<field name="complete_tax_set" invisible="1"/>
|
||||
<group string="Company" groups="base.group_multi_company">
|
||||
<label for="id" string="Company"/>
|
||||
<div>
|
||||
<div attrs="{'invisible': [('has_default_company', '=', True)]}">
|
||||
<field name="company_id"
|
||||
options="{'no_create': True}"
|
||||
class="oe_inline"/>
|
||||
<sheet>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="has_chart_of_accounts" invisible="1"/>
|
||||
<span attrs="{'invisible': [('has_chart_of_accounts','!=',False)]}">
|
||||
<h2>Fiscal Localization</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Fiscal Localization"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Taxes, fiscal positions, chart of accounts & legal statements for your country
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label string="Package" class="col-md-3 o_light_label"/>
|
||||
<field name="chart_template_id" widget="selection"/>
|
||||
</div>
|
||||
<div>
|
||||
<button name="%(account.open_account_charts_modules)d" icon="fa-arrow-right" type="action" string="Install More Packages" class="btn-link" attrs="{'invisible': [('has_chart_of_accounts','!=',False)]}"/>
|
||||
</div>
|
||||
<div class="row mt16" groups="base.group_no_one">
|
||||
<label string="# of digits" class="col-md-3 o_light_label"/>
|
||||
<field name="code_digits"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('has_chart_of_accounts','!=',False)]}">
|
||||
<field name="expects_chart_of_accounts" class="oe_inline"/>
|
||||
<label for="expects_chart_of_accounts"/>
|
||||
</span>
|
||||
<h2>Taxes</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="These taxes are set in any new product created.">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string='Default Taxes'/>
|
||||
<div class="text-muted">
|
||||
Default taxes applied to local transactions
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label string="Sales Tax" for="default_sale_tax_id" class="col-md-3 o_light_label"/>
|
||||
<field name="default_sale_tax_id" domain="[('type_tax_use', 'in', ('sale', 'all')), ('company_id', '=', company_id)]"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label string="Purchase Tax" for="default_purchase_tax_id" class="col-md-3 o_light_label"/>
|
||||
<field name="default_purchase_tax_id" domain="[('type_tax_use', 'in', ('purchase', 'all')), ('company_id', '=', company_id)]"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="rounding_method" title="A rounding per line is advised if your prices are tax-included. That way, the sum of line subtotals equals the total with taxes.">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Rounding Method"/>
|
||||
<div class="text-muted">
|
||||
How total tax amount is computed in orders and invoices
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<field name="tax_calculation_rounding_method" class="o_light_label mt16" widget="radio"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="eu_service" title="If you're selling digital goods to customers in the EU, you must charge VAT based on your customers' locations. This rule applies regardless of you are located. Digital goods are defined in the legislation as broadcasting, telecommunications, and services that are electronically supplied instead of shipped. Gift cards sent online are not included in the definition.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_l10n_eu_service"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" >
|
||||
<label for="module_l10n_eu_service"/>
|
||||
<div class="text-muted">
|
||||
Apply right VAT rates for digital products sold in EU
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Chart of Accounts" attrs="{'invisible': [('expects_chart_of_accounts','=',False)]}">
|
||||
<label for="id" string="Chart of Account"/>
|
||||
<div>
|
||||
<div>
|
||||
<button type="object" name="open_company" string="Configure your company data" class="oe_link btn-link"/>
|
||||
<h2>Currencies</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Currency"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Main currency of your company
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label for="currency_id" class="col-md-3 o_light_label"/>
|
||||
<field name="currency_id"/>
|
||||
</div>
|
||||
<div>
|
||||
<button name="%(base.action_currency_form)d" icon="fa-arrow-right" type="action" string="Activate Other Currencies" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="chart_template_id" attrs="{'invisible': [('has_chart_of_accounts','!=',False)]}"/>
|
||||
<field name="chart_template_id"
|
||||
widget="selection"
|
||||
domain="[('visible','=', True)]"
|
||||
class="oe_inline" attrs="{'readonly': [('has_chart_of_accounts','!=',False)]}"/>
|
||||
<button string="Install more chart templates"
|
||||
icon="fa-arrow-right text-success"
|
||||
name="%(open_account_charts_modules)d"
|
||||
type="action"
|
||||
class="oe_link" attrs="{'invisible': [('has_chart_of_accounts','!=',False)]}"/>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_multi_currency"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Multi-Currencies" for="group_multi_currency"/>
|
||||
<div class="text-muted">
|
||||
Record transactions in foreign currencies
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('group_multi_currency', '=', False)]}">
|
||||
<div class="mt16">
|
||||
<button name="%(base.action_currency_form_company)d" icon="fa-arrow-right" type="action" string="Currencies" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div attrs="{'invisible': ['|', '|', ('chart_template_id','=',False), ('complete_tax_set','=',False), ('has_chart_of_accounts','!=',False)]}">
|
||||
<label for="sale_tax_id"/>
|
||||
<field name="sale_tax_id"
|
||||
domain="[('chart_template_id', 'parent_of', chart_template_id),('type_tax_use','in',('sale','all'))]"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
<div attrs="{'invisible': ['|', '|', ('chart_template_id','=',False), ('complete_tax_set','=',False), ('has_chart_of_accounts','!=',False)]}">
|
||||
<label for="purchase_tax_id"/>
|
||||
<field name="purchase_tax_id"
|
||||
domain="[('chart_template_id', 'parent_of', chart_template_id),('type_tax_use','in',('purchase', 'all'))]"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
<div attrs="{'invisible': ['|', '|', ('chart_template_id','=',False), ('complete_tax_set','=',True), ('has_chart_of_accounts','!=',False)]}">
|
||||
<label for="sale_tax_rate"/>
|
||||
<field name="sale_tax_rate"/>
|
||||
</div>
|
||||
<div attrs="{'invisible': ['|', '|', ('chart_template_id','=',False), ('complete_tax_set','=',True), ('has_chart_of_accounts','!=',False)]}">
|
||||
<label for="purchase_tax_rate"/>
|
||||
<field name="purchase_tax_rate" />
|
||||
</div>
|
||||
<div attrs="{'invisible': ['|', ('chart_template_id','=',False), ('has_chart_of_accounts','!=',False)]}">
|
||||
<label for="template_transfer_account_id"/>
|
||||
<field name="template_transfer_account_id" class="oe_inline"/>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" attrs="{'invisible': [('group_multi_currency', '=', False)]}">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_currency_rate_live" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Automatic Rates"/>
|
||||
<div class="text-muted" id="update_currency_live">
|
||||
Update exchange rates automatically
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Fiscal Year" groups="account.group_account_user">
|
||||
<label for="id" string="Fiscal Year Last Day"/>
|
||||
<div>
|
||||
<field name="fiscalyear_last_month" class="oe_inline"/>
|
||||
<span style="margin-right:5px;"></span>
|
||||
<field name="fiscalyear_last_day" class="oe_inline oe_text_right"/>
|
||||
</div>
|
||||
<label for="id" string="Lock Entries"/>
|
||||
<div>
|
||||
<div>
|
||||
<label for="period_lock_date"/>
|
||||
<field name="period_lock_date" class="oe_inline"/>
|
||||
<h2>Invoicing</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_proforma_invoices"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Pro Forma"/>
|
||||
<div class="text-muted">
|
||||
Get a pro forma status for invoices
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="fiscalyear_lock_date"/>
|
||||
<field name="fiscalyear_lock_date" class="oe_inline"/>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_warning_account"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_warning_account"/>
|
||||
<div class="text-muted">
|
||||
Get warnings when invoicing specific customers
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_print_docsaway" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_print_docsaway"/>
|
||||
<div class="text-muted">
|
||||
Mail your invoices in one-click using <a href="https://www.docsaway.com/">Docsaway</a>
|
||||
</div>
|
||||
<div id="print_docsway_message" class="content-group" attrs="{'invisible': [('module_print_docsaway', '=', False)]}">
|
||||
<div class="text-warning mt16 mb4">
|
||||
Save this page and come back here to set up the feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Accounting & Finance" name="accounting">
|
||||
<label for="id" string="Options"/>
|
||||
<div name="account_config">
|
||||
<div>
|
||||
<label for="currency_id"/>
|
||||
<field name="currency_id" options="{'no_create': True}" class="oe_inline"/>
|
||||
<h2>Customer Payments</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="account_followup" title="This feature is useful if you issue a high amounts of invoices.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_reports_followup" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Follow-up Levels"/>
|
||||
<div class="text-muted">
|
||||
Use follow-up levels and schedule actions
|
||||
</div>
|
||||
<div id="account_reports_followup" class="content-group" attrs="{'invisible': [('module_account_reports_followup', '=', False)]}">
|
||||
<div class="text-warning mt16 mb4">
|
||||
Save this page and come back here to set up the feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_batch_deposit" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Batch Deposits"/>
|
||||
<div class="text-muted">
|
||||
Group received checks before depositing them to the bank
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="id" string="Features" groups="account.group_account_user"/>
|
||||
<div groups="account.group_account_user">
|
||||
<div>
|
||||
<field name="module_account_reports" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_reports"/>
|
||||
<a href="https://www.odoo.com/page/accounting" target="_blank"> More Info </a>
|
||||
|
||||
<h2>Bills Payment</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_l10n_us_check_printing" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Checks" for="module_l10n_us_check_printing"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted" id="print_bills_payment">
|
||||
Print checks to pay your vendors
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<field name="group_analytic_accounting" class="oe_inline"/>
|
||||
<label for="group_analytic_accounting"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_asset" class="oe_inline"/>
|
||||
<label for="module_account_asset"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_deferred_revenue" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_deferred_revenue"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_budget" class="oe_inline"/>
|
||||
<label for="module_account_budget"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="tax_cash_basis_journal_id"/>
|
||||
<field name="tax_cash_basis_journal_id" class="oe_inline"/>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="If you check this box, you will be able to register your payment using SEPA.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_sepa" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="SEPA Payments" for="module_account_sepa"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Pay your bills in one-click, using Euro SEPA service
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<separator string="Bank & Cash" groups="account.group_account_user"/>
|
||||
<group name="bank_cash" groups="account.group_account_user">
|
||||
<label for="id" string="Bank Statements"/>
|
||||
<div name="bank_statement_import_options">
|
||||
<div>
|
||||
<field name="module_account_yodlee" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_yodlee"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features"> View supported banks</a>
|
||||
|
||||
<h2>Bank & Cash</h2>
|
||||
<div class="row mt16 o_settings_container" id="bank_cash">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="account_yodlee" title="Get your bank statements automatically imported every 4 hours, or in one-click, using Yodlee and Plaid services. Once installed, set “Bank Feeds” to “Bank Synchronization” in bank account settings. Then, click “Configure” on the online account to enter your bank credentials.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_yodlee" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Automatic Import"/>
|
||||
<div class="text-muted">
|
||||
Import your bank statements automatically
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_plaid" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_plaid"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_bank_statement_import_csv" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="CSV Import"/>
|
||||
<div class="text-muted">
|
||||
Import your bank statements in CSV
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_bank_statement_import_qif" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_bank_statement_import_qif"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_bank_statement_import_qif" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="QIF Import"/>
|
||||
<div class="text-muted">
|
||||
Import your bank statements in QIF
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_bank_statement_import_ofx" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_bank_statement_import_ofx"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_bank_statement_import_ofx" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="OFX Import"/>
|
||||
<div class="text-muted">
|
||||
Import your bank statements in OFX
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_bank_statement_import_csv" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_bank_statement_import_csv"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_bank_statement_import_camt" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_bank_statement_import_camt"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="Once installed, set 'Bank Feeds' to 'File Import' in bank account settings.This adds a button to import from the Accounting dashboard.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_bank_statement_import_camt" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="CAMT Import"/>
|
||||
<div class="text-muted">
|
||||
Import your bank statements in CAMT.053
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="id" string="Automate Payments"/>
|
||||
<div name="bank_payments">
|
||||
<div>
|
||||
<field name="module_account_sepa" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_sepa"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
<h2>Accounting Reports</h2>
|
||||
<div class="row mt16 o_settings_container" id="accouting_reports">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="account_accountant" title="If you do not check this box, you will be able to do invoicing & payments, but not accounting (Journal Items, Chart of Accounts, ...).">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_accountant"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_account_accountant"/>
|
||||
<div class="text-muted">
|
||||
Add all accounting features: journal entries, legal statements, etc.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_l10n_us_check_printing" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_l10n_us_check_printing"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="fiscalyear" invisible="1"/>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="dynamic_report" invisible="1">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_reports" class="oe_inline" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_account_reports"/>
|
||||
<div class="text-muted" id="account_reports">
|
||||
Navigate easily through reports and see what is behind the numbers
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="id" string="Configuration"/>
|
||||
<div name="bank_options">
|
||||
<div name='company_footer'>
|
||||
<label for="company_footer"/>
|
||||
<field name="company_footer"/>
|
||||
<h2>Analytics</h2>
|
||||
<div class="row mt16 o_settings_container" id="analytic">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="Allows you to use the analytic accounting.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_analytic_accounting"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_analytic_accounting"/>
|
||||
<div class="text-muted">
|
||||
Track costs & revenues by project, department, etc.
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('group_analytic_accounting', '=', False)]}">
|
||||
<div class="mt16" id="analytic_account_link">
|
||||
<button name="%(analytic.action_analytic_account_form)d" icon="fa-arrow-right" type="action" string="Analytic Accounts" class="btn-link"/>
|
||||
</div>
|
||||
<div>
|
||||
<button name="%(analytic.account_analytic_tag_action)d" icon="fa-arrow-right" type="action" string="Tags for Multidimensional Analytics" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
|
||||
<label for="transfer_account_id"/>
|
||||
<field name="transfer_account_id" class="oe_inline" attrs="{'required': [('has_chart_of_accounts','!=',False)]}"/>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="account_budget" title="This allows accountants to manage analytic and crossovered budgets. Once the master budgets and the budgets are defined, the project managers can set the planned amount on each analytic account.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_budget" class="oe_inline"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_account_budget"/>
|
||||
<div class="text-muted">
|
||||
Compare actual revenues & costs with budgets
|
||||
</div>
|
||||
<div id="msg_account_budget" class="content-group" attrs="{'invisible': [('module_account_budget', '=', False)]}">
|
||||
<div class="text-warning mt16 mb4">
|
||||
Save this page and come back here to set up the feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_product_margin"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Margin Analysis"/>
|
||||
<div class="text-muted">
|
||||
Monitor your product margins from invoices
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<separator string="Multi Currencies" groups="account.group_account_user"/>
|
||||
<group name="multi_currency" groups="account.group_account_user">
|
||||
<label for="id" string="Configuration"/>
|
||||
<div name="group_multi_currency">
|
||||
<field name="group_multi_currency" class="oe_inline"/>
|
||||
<label for="group_multi_currency"/>
|
||||
<group attrs="{'invisible': [('group_multi_currency', '<>', True)]}" col="2">
|
||||
<group>
|
||||
<field name="currency_exchange_journal_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</div>
|
||||
</group>
|
||||
<separator string="Invoicing & Payments" groups="account.group_account_user"/>
|
||||
<group groups="account.group_account_user">
|
||||
<label for="id" string="Customer"/>
|
||||
<div name="customer_payments">
|
||||
<div>
|
||||
<field name="group_proforma_invoices" class="oe_inline"/>
|
||||
<label for="group_proforma_invoices"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_reports_followup" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_account_reports_followup"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_account_batch_deposit" widget="upgrade_boolean"/>
|
||||
<label for="module_account_batch_deposit"/>
|
||||
<a href="https://www.odoo.com/page/accounting-features" target="_blank"> More Info</a>
|
||||
</div>
|
||||
</div>
|
||||
<field name="group_warning_account" widget="radio"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('has_chart_of_accounts','=',False)]}">
|
||||
<label for="id" string="Taxes"/>
|
||||
<div name="invoice_taxes">
|
||||
<div>
|
||||
<label for="default_sale_tax_id"/>
|
||||
<field name="default_sale_tax_id"
|
||||
domain="[('type_tax_use', 'in', ('sale', 'all')), ('company_id', '=', company_id)]"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="default_purchase_tax_id"/>
|
||||
<field name="default_purchase_tax_id"
|
||||
domain="[('type_tax_use', 'in', ('purchase', 'all')), ('company_id', '=', company_id)]"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<label for="id" string="Payments"/>
|
||||
<div name="customer_payments">
|
||||
<div name='payment_acquirer'/>
|
||||
</div>
|
||||
</group>
|
||||
<!-- Invisible section which is inherited in other modules -->
|
||||
<separator name="analytic_account" string="Analytic Accounting" invisible="1"/>
|
||||
<group name="analytic_account_sale" invisible="1">
|
||||
<label for="id" string="Sale"/>
|
||||
</group>
|
||||
<group name="analytic_account_purchase" invisible="1">
|
||||
<label for="id" string="Purchase"/>
|
||||
</group>
|
||||
<group name="followup" position="before">
|
||||
<field name="use_anglo_saxon"/>
|
||||
<field name="bank_account_code_prefix" groups="base.group_no_one"/>
|
||||
<field name="cash_account_code_prefix" groups="base.group_no_one"/>
|
||||
<field name="code_digits" groups="base.group_no_one"/>
|
||||
<field name="tax_calculation_rounding_method" groups="base.group_no_one"/>
|
||||
</group>
|
||||
<group string="Overdue Payments" name="followup">
|
||||
<field name="overdue_msg"/>
|
||||
</group>
|
||||
<div>
|
||||
<span>(*) This configuration is related to the company you're logged into.</span>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import models
|
||||
|
||||
@@ -20,6 +20,7 @@ It assigns manager and user access rights to the Administrator for the accountin
|
||||
'data/account_accountant_tour.xml',
|
||||
'security/account_accountant_security.xml',
|
||||
'views/account_accountant_templates.xml',
|
||||
'views/res_config_view.xml',
|
||||
],
|
||||
'demo': ['data/account_accountant_demo.xml'],
|
||||
'test': [],
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountConfigSettings(models.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
fiscalyear_last_day = fields.Integer(related='company_id.fiscalyear_last_day', default=31)
|
||||
fiscalyear_last_month = fields.Selection([
|
||||
(1, 'January'),
|
||||
(2, 'February'),
|
||||
(3, 'March'),
|
||||
(4, 'April'),
|
||||
(5, 'May'),
|
||||
(6, 'June'),
|
||||
(7, 'July'),
|
||||
(8, 'August'),
|
||||
(9, 'September'),
|
||||
(10, 'October'),
|
||||
(11, 'November'),
|
||||
(12, 'December')
|
||||
], related='company_id.fiscalyear_last_month', default=12)
|
||||
use_anglo_saxon = fields.Boolean(string='Anglo-Saxon Accounting', related='company_id.anglo_saxon_accounting')
|
||||
transfer_account_id = fields.Many2one('account.account', string="Transfer Account",
|
||||
related='company_id.transfer_account_id',
|
||||
domain=lambda self: [('reconcile', '=', True), ('user_type_id.id', '=', self.env.ref('account.data_account_type_current_assets').id)],
|
||||
help="Intermediary account used when moving money from a liquidity account to another")
|
||||
module_account_tax_cash_basis = fields.Boolean(string="Allow Tax Cash Basis",
|
||||
help='Generate tax cash basis entrie when reconciliating entries')
|
||||
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="account_config_settings_view_form_inherit_account_accountant" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form.inherit</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="account_accountant" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</div>
|
||||
<div id="fiscalyear" position="replace">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="fiscalyear">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Fiscal Year"/>
|
||||
<div class="text-muted">
|
||||
Last day of your fiscal year
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label string="Last Day" class="col-md-4 o_light_label"/>
|
||||
<field name="fiscalyear_last_month" class="col-md-4 oe_inline"/>
|
||||
<field name="fiscalyear_last_day" class="col-md-4 oe_inline text-center"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dynamic_report" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</div>
|
||||
<div id="dynamic_report" position="after">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="use_anglo_saxon"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="use_anglo_saxon"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
Record cost of goods sold in your journal entries
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="account_yodlee" position="before">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" attrs="{'invisible': [('chart_template_id','=',False), ('module_account_accountant','=',False)]}">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Inter-Banks Transfers"/>
|
||||
<div class="text-muted">
|
||||
Account used when transferring between banks
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label for="transfer_account_id" class="col-md-3 o_light_label"/>
|
||||
<field name="transfer_account_id" attrs="{'required': [('chart_template_id','!=',False)]}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="analytic" position="after">
|
||||
<h2>Automated Entries</h2>
|
||||
<div class="row mt16 o_settings_container" id="recommended_apps">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="asset_types" title="This allows you to manage the assets owned by a company or a person. It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_asset"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_account_asset"/>
|
||||
<div class="text-muted">
|
||||
Use depreciation boards, automate amortization entries
|
||||
</div>
|
||||
<div id="msg_account_asset" class="content-group" attrs="{'invisible': [('module_account_asset', '=', False)]}">
|
||||
<div class="text-warning mt16 mb4">
|
||||
Save this page and come back here to set up the feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="This allows you to manage the revenue recognition on selling products. It keeps track of the installments occurred on those revenue recognitions, and creates account moves for those installment lines.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_deferred_revenue" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_account_deferred_revenue"/>
|
||||
<div class="text-muted">
|
||||
Automate deferred revenues entries for multi-year contracts
|
||||
</div>
|
||||
<div id="msg_automate_deferred_revenues" class="content-group" attrs="{'invisible': [('module_account_deferred_revenue', '=', False)]}">
|
||||
<div class="text-warning mt16 mb4">
|
||||
Save this page and come back here to set up the feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -23,7 +23,8 @@ Allows to automatically select analytic accounts based on criterions:
|
||||
'security/ir.model.access.csv',
|
||||
'security/account_analytic_default_security.xml',
|
||||
'views/account_analytic_default_view.xml',
|
||||
'views/product_views.xml'
|
||||
'views/product_views.xml',
|
||||
'views/res_config_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_config_settings_view_form_inherit_analytic_default" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form.inherit.analytic.default</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='analytic_account_link']" position="after">
|
||||
<div>
|
||||
<button name="%(account_analytic_default.action_analytic_default_list)d" icon="fa-arrow-right" type="action" string="Default Analytic Values" class="btn-link"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -26,6 +26,7 @@ Keeps track of depreciations, and creates corresponding journal entries.
|
||||
'views/account_invoice_views.xml',
|
||||
'views/account_asset_templates.xml',
|
||||
'views/product_views.xml',
|
||||
'views/res_config_view.xml',
|
||||
'report/account_asset_report_views.xml',
|
||||
'data/account_asset_data.xml',
|
||||
],
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_config_settings_view_form_inherit_account_asset" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form.inherit.asset</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_account_asset" position="replace">
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<button name="%(account_asset.action_account_asset_asset_list_normal_purchase)d" icon="fa-arrow-right" type="action" string="Asset Types" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -34,6 +34,7 @@ Three reports are available:
|
||||
'security/account_budget_security.xml',
|
||||
'views/account_analytic_account_views.xml',
|
||||
'views/account_budget_views.xml',
|
||||
'views/res_config_view.xml',
|
||||
],
|
||||
'demo': ['data/account_budget_demo.xml'],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_config_settings_view_form_inherit_account_budget" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form.inherit.budget</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_account_budget" position="replace">
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<button name="%(account_budget.open_budget_post_form)d" icon="fa-arrow-right" type="action" string="Budgetary Positions" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -39,5 +39,6 @@ only the country code will be validated.
|
||||
'data': [
|
||||
'views/res_partner_views.xml',
|
||||
'views/res_company_views.xml',
|
||||
'views/res_config_view.xml',
|
||||
],
|
||||
}
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
|
||||
import res_company
|
||||
import res_partner
|
||||
import res_config
|
||||
|
||||
@@ -7,7 +7,4 @@ from odoo import fields, models
|
||||
class ResCompany(models.Model):
|
||||
_inherit = 'res.company'
|
||||
|
||||
vat_check_vies = fields.Boolean(
|
||||
string='VIES VAT Check',
|
||||
help="If checked, Partners VAT numbers will be fully validated against EU's VIES service "
|
||||
"rather than via a simple format validation (checksum).")
|
||||
vat_check_vies = fields.Boolean(string='VIES VAT Check')
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountConfigSettings(models.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
vat_check_vies = fields.Boolean(related='company_id.vat_check_vies',
|
||||
string='VIES VAT Check')
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_config_settings_view_form_inherit_base_vat" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form.inherit.base.vat</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="eu_service" position="after">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="Use VIES service to check VAT # of your customers rather than a simple format validation.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="vat_check_vies"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="vat_check_vies"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="text-muted">
|
||||
VAT # check with European VIES service
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -54,16 +54,4 @@
|
||||
<field name="action_id" ref="action_eu_service"/>
|
||||
<field name="type">automatic</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_config_settings_inherit" model="ir.ui.view">
|
||||
<field name="name">account settings</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="default_sale_tax_id" position="after">
|
||||
<button type="action" name="%(action_eu_service)d"
|
||||
string="Setup EU MOSS Taxes" class="oe_link"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -28,8 +28,8 @@ TODO:
|
||||
'data': [
|
||||
'data/l10n_fr_hr_payroll_data.xml',
|
||||
'views/l10n_fr_hr_payroll_view.xml',
|
||||
'views/l10n_fr_hr_payroll_config_settings_views.xml',
|
||||
'report/report_l10n_fr_fiche_paye.xml',
|
||||
'report/l10n_fr_hr_payroll_report.xml',
|
||||
'views/l10n_fr_hr_payroll_config_settings_views.xml',
|
||||
],
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ from odoo import fields, models
|
||||
class AccountConfigSettings(models.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
plafond_secu = fields.Float(related='company_id.plafond_secu', string="Plafond de la Securite Sociale *")
|
||||
nombre_employes = fields.Integer(related='company_id.nombre_employes', string="Nombre d'employes *")
|
||||
cotisation_prevoyance = fields.Float(related='company_id.cotisation_prevoyance', string='Cotisation Patronale Prevoyance *')
|
||||
org_ss = fields.Char(related='company_id.org_ss', string="Organisme de securite sociale *")
|
||||
conv_coll = fields.Char(related='company_id.conv_coll', string="Convention collective *")
|
||||
plafond_secu = fields.Float(related='company_id.plafond_secu', string="Plafond de la Securite Sociale")
|
||||
nombre_employes = fields.Integer(related='company_id.nombre_employes', string="Nombre d'employes")
|
||||
cotisation_prevoyance = fields.Float(related='company_id.cotisation_prevoyance', string='Cotisation Patronale Prevoyance')
|
||||
org_ss = fields.Char(related='company_id.org_ss', string="Organisme de securite sociale")
|
||||
conv_coll = fields.Char(related='company_id.conv_coll', string="Convention collective")
|
||||
|
||||
@@ -1,34 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_account_config_settings_form_inherit_l10n_fr_hr_payroll" model="ir.ui.view">
|
||||
<field name="name">view.account.config.form.inherit.l10n.fr.hr.payroll</field>
|
||||
<record id="account_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='followup']" position="before">
|
||||
<group string="Paie">
|
||||
<label for="plafond_secu"/>
|
||||
<div>
|
||||
<field name="plafond_secu" class="oe_inline"/>
|
||||
<sheet position="inside">
|
||||
<h2>French Payroll</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label for="plafond_secu" class="col-md-3 o_light_label"/>
|
||||
<field name="plafond_secu"/>
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<label for="nombre_employes" class="col-md-3 o_light_label"/>
|
||||
<field name="nombre_employes"/>
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<label for="cotisation_prevoyance" class="col-md-3 o_light_label"/>
|
||||
<field name="cotisation_prevoyance"/>
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<label for="org_ss" class="col-md-3 o_light_label"/>
|
||||
<field name="org_ss"/>
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<label for="conv_coll" class="col-md-3 o_light_label"/>
|
||||
<field name="conv_coll"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="nombre_employes"/>
|
||||
<div>
|
||||
<field name="nombre_employes" class="oe_inline"/>
|
||||
</div>
|
||||
<label for="cotisation_prevoyance"/>
|
||||
<div>
|
||||
<field name="cotisation_prevoyance" class="oe_inline"/>
|
||||
</div>
|
||||
<label for="org_ss"/>
|
||||
<div>
|
||||
<field name="org_ss" class="oe_inline"/>
|
||||
</div>
|
||||
<label for="conv_coll"/>
|
||||
<div>
|
||||
<field name="conv_coll" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</xpath>
|
||||
</div>
|
||||
</sheet>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import models
|
||||
|
||||
@@ -11,7 +11,6 @@ United States - Chart of accounts.
|
||||
""",
|
||||
'depends': ['l10n_generic_coa', 'report'],
|
||||
'data': [
|
||||
'views/res_config_view.xml',
|
||||
'data/res_company_data.xml',
|
||||
],
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
class AccountConfigSettings(models.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
module_account_taxcloud = fields.Boolean("Compute sales tax automatically in the United States using TaxCloud.",
|
||||
help='TaxCloud is an online provider that is committed to making it easy for retailers to collect sales tax online'
|
||||
'in the United States.')
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_config_settings_inherit_form_view" model="ir.ui.view">
|
||||
<field name="name">account settings</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='invoice_taxes']" position="inside">
|
||||
<div name="taxcloud_tax" class="o_row">
|
||||
<field name="module_account_taxcloud"/>
|
||||
<label for="module_account_taxcloud"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -11,7 +11,6 @@
|
||||
'data/account_data.xml',
|
||||
'data/payment_acquirer_data.xml',
|
||||
'views/payment_views.xml',
|
||||
'views/account_config_settings_views.xml',
|
||||
'views/account_payment_views.xml',
|
||||
'views/payment_templates.xml',
|
||||
'views/res_partner_views.xml',
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Add payment options to sale.order and invoice forms -->
|
||||
<record model="ir.ui.view" id="payment_acquirer_installation">
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='payment_acquirer']" position="inside">
|
||||
<div name="configure_payments_button">
|
||||
<button name='%(payment.action_payment_acquirer)d' type="action"
|
||||
string="Configure payment acquiring methods" class="oe_link"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -10,7 +10,6 @@
|
||||
'data': [
|
||||
'views/payment_views.xml',
|
||||
'views/payment_paypal_templates.xml',
|
||||
'views/account_config_settings_views.xml',
|
||||
'data/payment_acquirer_data.xml',
|
||||
],
|
||||
'installable': True,
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Add payment options to sale.order and invoice forms -->
|
||||
<record model="ir.ui.view" id="payment_paypal_option_config">
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="payment.payment_acquirer_installation"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='configure_payments_button']" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -40,6 +40,7 @@ Dashboard / Reports for Purchase Management will include:
|
||||
'report/purchase_report_views.xml',
|
||||
'data/mail_template_data.xml',
|
||||
'views/res_config_views.xml',
|
||||
'views/account_config_settings_views.xml',
|
||||
'report/purchase_order_templates.xml',
|
||||
'report/purchase_quotation_templates.xml',
|
||||
],
|
||||
|
||||
@@ -61,5 +61,4 @@ class PurchaseConfigSettings(models.TransientModel):
|
||||
class AccountConfigSettings(models.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
group_analytic_account_for_purchases = fields.Boolean('Analytic accounting for purchases',
|
||||
implied_group='purchase.group_analytic_accounting',
|
||||
help="Allows you to specify an analytic account on purchase order lines.")
|
||||
implied_group='purchase.group_analytic_accounting')
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_config_settings_view_form_inherit_purchase" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.form.inherit.purchase</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.account_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="account_budget" position="before">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" title="Allows you to specify an analytic account on purchase order lines.">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_analytic_account_for_purchases" class="oe_inline"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Purchase Analytics" for="group_analytic_account_for_purchases"/>
|
||||
<div class="text-muted">
|
||||
Set analytic accounts in purchase orders
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -48,24 +48,4 @@
|
||||
<menuitem id="menu_purchase_general_settings" name="Settings" parent="menu_purchase_config"
|
||||
sequence="0" action="action_purchase_configuration" groups="base.group_system"/>
|
||||
|
||||
<record id="view_account_config" model="ir.ui.view">
|
||||
<field name="name">account settings</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="priority" eval="18"/>
|
||||
<field name="arch" type="xml">
|
||||
<separator name="analytic_account" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</separator>
|
||||
<group name="analytic_account_purchase" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</group>
|
||||
<xpath expr="//group[@name='analytic_account_purchase']" position="inside">
|
||||
<div>
|
||||
<field name="group_analytic_account_for_purchases" class="oe_inline"/>
|
||||
<label for="group_analytic_account_for_purchases"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import account_config_settings
|
||||
import account_invoice
|
||||
import procurement_order
|
||||
import product_pricelist
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
class AccountConfigSettings(models.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
group_analytic_account_for_sales = fields.Boolean(
|
||||
'Analytic accounting for sales',
|
||||
implied_group='sale.group_analytic_accounting',
|
||||
help="Allows you to specify an analytic account on sales orders.")
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_account_config" model="ir.ui.view">
|
||||
<field name="name">account settings</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="priority" eval="16"/>
|
||||
<field name="arch" type="xml">
|
||||
<separator name="analytic_account" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</separator>
|
||||
<group name="analytic_account_sale" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</group>
|
||||
<xpath expr="//group[@name='analytic_account_sale']" position="inside">
|
||||
<div>
|
||||
<field name="group_analytic_account_for_sales" class="oe_inline"/>
|
||||
<label for="group_analytic_account_for_sales"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -14,7 +14,6 @@
|
||||
'data': [
|
||||
'views/website_payment_view.xml',
|
||||
'views/website_payment_templates.xml',
|
||||
'views/res_config_view.xml',
|
||||
],
|
||||
'auto_install': False,
|
||||
}
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
import res_config
|
||||
import payment
|
||||
import website
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class PaymentConfigSettings(models.TransientModel):
|
||||
_inherit = 'account.config.settings'
|
||||
|
||||
default_acquirer = fields.Many2one("payment.acquirer",
|
||||
string="Default Acquirer",
|
||||
help="Default payment acquirer for website payments; your provider needs to be visible in the website.",
|
||||
domain="[('website_published','=',True)]"
|
||||
)
|
||||
|
||||
@api.model
|
||||
def get_default_acquirer(self, fields):
|
||||
default_acquirer = False
|
||||
if 'default_acquirer' in fields:
|
||||
default_acquirer = self.env['ir.values'].get_default('payment.transaction', 'acquirer_id', company_id=self.env.user.company_id.id)
|
||||
return {
|
||||
'default_acquirer': default_acquirer
|
||||
}
|
||||
|
||||
@api.multi
|
||||
def set_default_acquirer(self):
|
||||
for wizard in self:
|
||||
ir_values = self.env['ir.values']
|
||||
if self.user_has_groups('base.group_erp_manager'):
|
||||
ir_values = ir_values.sudo()
|
||||
ir_values.set_default('payment.transaction', 'acquirer_id', wizard.default_acquirer.id, company_id=self.env.user.company_id.id)
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="website_default_acquirer" model="ir.ui.view">
|
||||
<field name="name">account.config.settings.inherit</field>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="inherit_id" ref="payment.payment_acquirer_installation"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='configure_payments_button']" position="after">
|
||||
<div name="customer_payments">
|
||||
<label for="default_acquirer"/>
|
||||
<field name="default_acquirer" class="oe_inline"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -37,7 +37,6 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
module_website_sale_digital = fields.Boolean("Digital Content")
|
||||
|
||||
module_sale_stock = fields.Boolean("Delivery Orders")
|
||||
module_account_taxcloud = fields.Boolean("TaxCloud")
|
||||
module_portal = fields.Boolean("Activate the customer portal", help="""Give your customers access to their documents.""")
|
||||
|
||||
# the next 2 fields represent sale_pricelist_setting from sale.config.settings, they are split here for the form view, to improve usability
|
||||
|
||||
Reference in New Issue
Block a user