diff options
| author | Yannick Tivisse <yti@odoo.com> | 2018-07-30 15:59:30 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2018-07-31 12:34:18 +0200 |
| commit | a701031c929f22095e062fe1da238d8cffacd73e (patch) | |
| tree | c1e9ea7807b483f703562f69d8c12d0658957c10 /addons/account | |
| parent | 1fd9ebcdf809e200ab2d9f56e1e21a5caca5bb51 (diff) | |
[REM] account_invoicing: Merge module into account
Purpose
=======
The only module that was supposed to work without the accounting menuitems was
the ecommerce. Now that the ecommerce wants the accounting menuitems to be
visible, this module makes no sense anymore.
Specification
=============
Remove the account_invoicing module and move the code to account.
Diffstat (limited to 'addons/account')
| -rw-r--r-- | addons/account/__manifest__.py | 16 | ||||
| -rw-r--r-- | addons/account/data/digest_data.xml | 8 | ||||
| -rw-r--r-- | addons/account/models/__init__.py | 1 | ||||
| -rw-r--r-- | addons/account/models/digest.py | 29 | ||||
| -rw-r--r-- | addons/account/static/description/account_sc_00.png | bin | 0 -> 68625 bytes | |||
| -rw-r--r-- | addons/account/static/description/account_sc_01.png | bin | 0 -> 57711 bytes | |||
| -rw-r--r-- | addons/account/static/description/account_sc_03.png | bin | 0 -> 27257 bytes | |||
| -rw-r--r-- | addons/account/static/description/account_voucher.png | bin | 0 -> 53670 bytes | |||
| -rw-r--r-- | addons/account/static/description/analysis.png | bin | 0 -> 61029 bytes | |||
| -rw-r--r-- | addons/account/static/description/icon.png | bin | 0 -> 1723 bytes | |||
| -rw-r--r-- | addons/account/static/description/index.html | 71 | ||||
| -rw-r--r-- | addons/account/static/src/js/tour.js | 27 | ||||
| -rw-r--r-- | addons/account/views/account.xml | 1 | ||||
| -rw-r--r-- | addons/account/views/account_menuitem.xml | 6 | ||||
| -rw-r--r-- | addons/account/views/digest_views.xml | 15 | ||||
| -rw-r--r-- | addons/account/views/res_config_settings_views.xml | 4 |
16 files changed, 166 insertions, 12 deletions
diff --git a/addons/account/__manifest__.py b/addons/account/__manifest__.py index aa48fc8477c..2986ed2650a 100644 --- a/addons/account/__manifest__.py +++ b/addons/account/__manifest__.py @@ -1,22 +1,27 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { - 'name' : 'Invoicing', + 'name' : 'Invoicing Management', 'version' : '1.1', 'summary': 'Send Invoices and Track Payments', 'sequence': 30, 'description': """ -Core mechanisms for the accounting modules. To display the menuitems, install the module account_invoicing. +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', + 'category': 'Invoicing Management', 'website': 'https://www.odoo.com/page/billing', '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'], + '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_menuitem.xml', 'views/account_payment_view.xml', 'wizard/account_reconcile_view.xml', @@ -72,6 +77,7 @@ Core mechanisms for the accounting modules. To display the menuitems, install th 'views/account_incoterms_view.xml', 'data/account_incoterms_data.xml', 'views/res_company_view.xml', + 'views/digest_views.xml', ], 'demo': [ 'demo/account_demo.xml', @@ -83,7 +89,7 @@ Core mechanisms for the accounting modules. To display the menuitems, install th "static/src/xml/account_dashboard_setup_bar.xml", ], 'installable': True, - 'application': False, + 'application': True, 'auto_install': False, 'post_init_hook': '_auto_install_l10n', } diff --git a/addons/account/data/digest_data.xml b/addons/account/data/digest_data.xml new file mode 100644 index 00000000000..81a2b0155c5 --- /dev/null +++ b/addons/account/data/digest_data.xml @@ -0,0 +1,8 @@ +<?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> +</odoo> diff --git a/addons/account/models/__init__.py b/addons/account/models/__init__.py index ce16eb3044d..144bc6bc2ba 100644 --- a/addons/account/models/__init__.py +++ b/addons/account/models/__init__.py @@ -18,3 +18,4 @@ from . import reconciliation_widget from . import res_users from . import res_company from . import account_incoterms +from . import digest diff --git a/addons/account/models/digest.py b/addons/account/models/digest.py new file mode 100644 index 00000000000..0160efe5225 --- /dev/null +++ b/addons/account/models/digest.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import fields, models, _ +from odoo.exceptions import AccessError + + +class Digest(models.Model): + _inherit = 'digest.digest' + + kpi_account_total_revenue = fields.Boolean('Revenue') + kpi_account_total_revenue_value = fields.Monetary(compute='_compute_kpi_account_total_revenue_value') + + def _compute_kpi_account_total_revenue_value(self): + if not self.env.user.has_group('account.group_account_invoice'): + raise AccessError(_("Do not have access, skip this data for user's digest email")) + for record in self: + start, end, company = record._get_kpi_compute_parameters() + account_moves = self.env['account.move'].read_group([ + ('journal_id.type', '=', 'sale'), + ('company_id', '=', company.id), + ('date', '>=', start), + ('date', '<', end)], ['journal_id', 'amount'], ['journal_id']) + record.kpi_account_total_revenue_value = sum([account_move['amount'] for account_move in account_moves]) + + def compute_kpis_actions(self, company, user): + res = super(Digest, self).compute_kpis_actions(company, user) + res['kpi_account_total_revenue'] = 'account.action_invoice_tree1&menu_id=%s' % self.env.ref('account.menu_finance').id + return res diff --git a/addons/account/static/description/account_sc_00.png b/addons/account/static/description/account_sc_00.png Binary files differnew file mode 100644 index 00000000000..01e96d46b8c --- /dev/null +++ b/addons/account/static/description/account_sc_00.png diff --git a/addons/account/static/description/account_sc_01.png b/addons/account/static/description/account_sc_01.png Binary files differnew file mode 100644 index 00000000000..f9267db4afa --- /dev/null +++ b/addons/account/static/description/account_sc_01.png diff --git a/addons/account/static/description/account_sc_03.png b/addons/account/static/description/account_sc_03.png Binary files differnew file mode 100644 index 00000000000..2bddeffd1e2 --- /dev/null +++ b/addons/account/static/description/account_sc_03.png diff --git a/addons/account/static/description/account_voucher.png b/addons/account/static/description/account_voucher.png Binary files differnew file mode 100644 index 00000000000..c024eccbe17 --- /dev/null +++ b/addons/account/static/description/account_voucher.png diff --git a/addons/account/static/description/analysis.png b/addons/account/static/description/analysis.png Binary files differnew file mode 100644 index 00000000000..d4ae6664bcd --- /dev/null +++ b/addons/account/static/description/analysis.png diff --git a/addons/account/static/description/icon.png b/addons/account/static/description/icon.png Binary files differnew file mode 100644 index 00000000000..9f0c5c6dad4 --- /dev/null +++ b/addons/account/static/description/icon.png diff --git a/addons/account/static/description/index.html b/addons/account/static/description/index.html new file mode 100644 index 00000000000..ef5af9485aa --- /dev/null +++ b/addons/account/static/description/index.html @@ -0,0 +1,71 @@ +<section class="oe_container"> + <div class="oe_row oe_spaced"> + <h2 class="oe_slogan" style="color:#875A7B;">Turn Quotes Into Invoices with minimal effort</h2> + <h3 class="oe_slogan oe_mb32">Bill automatically based on SO, delivery orders, contracts or time and material</h3> + <div class="oe_span4 text-center"> + <span class="fa fa-copy fa-2x"/> + <p class="oe_mt16"> + Create invoices based on quotes sent to your clients. + </p> + </div> + <div class="oe_span4 text-center"> + <span class="fa fa-file-text fa-2x"/> + <p class="oe_mt16"> + Send professional looking invoices directly to your clients in just a click. + </p> + </div> + <div class="oe_span4 text-center"> + <span class="fa fa-file-pdf-o fa-2x"/> + <p class="oe_mt16"> + Automatically send them by email as a PDF attachment or print and send them by post. + </p> + </div> + <div class="col-lg-8 offset-lg-2 oe_mt32"> + <img class="oe_picture oe_screenshot" src="account_sc_01.png"/> + </div> + </div> +</section> + +<section class="oe_container oe_dark"> + <div class="oe_row oe_spaced"> + <h2 class="oe_slogan" style="color:#875A7B;">Get paid faster</h2> + <h3 class="oe_slogan">Online payments and automated follow-ups</h3> + <p class="oe_mt32"> + Accept online payments via Paypal, Ogone, Buckaroo or Adyen. Eliminate the stress of sending reminders for late or outstanding payments. Simply set up and automate follow-ups to get paid quickly. + </p> + <div class="col-lg-8 offset-lg-3 oe_mt16"> + <img class="oe_picture" src="account_voucher.png" height="300"> + </div> + </div> +</section> + +<section class="oe_container"> + <div class="oe_row oe_spaced"> + <h2 class="oe_slogan" style="color:#875A7B;">Simplify your accounting</h2> + <h3 class="oe_slogan">Keep track of bank account movements and the status of invoices</h3> + <p class="oe_mt32"> + Use a status overview to help keep track of drafts, paid and unpaid invoices. Automatically record all transactions from your bank accounts by importing and reconciling your bank statements. + </p> + <div class="oe_row_img oe_centered oe_mt32"> + <img class="oe_picture oe_screenshot" src="account_sc_03.png"> + </div> + </div> +</section> + +<section class="oe_container oe_dark"> + <div class="oe_row oe_spaced"> + <h2 class="oe_slogan" style="color:#875A7B;">Analyze your sales</h2> + <h3 class="oe_slogan">Access insightful data to get the big picture</h3> + <div class="oe_span6"> + <p class='oe_mt32 text-justify'> + Get direct access to key information with dynamic and customizable dashboards. Make your own definition and analyze your invoicing by product, customer, salesperson, etc. + </p> + </div> + <div class="oe_span6"> + <img class="oe_picture" src="analysis.png"> + </div> + </div> +</section> + +<section class="oe_container oe_separator"> +</section> diff --git a/addons/account/static/src/js/tour.js b/addons/account/static/src/js/tour.js new file mode 100644 index 00000000000..74b0dcda95b --- /dev/null +++ b/addons/account/static/src/js/tour.js @@ -0,0 +1,27 @@ +odoo.define('account.tour', function(require) { +"use strict"; + +var core = require('web.core'); +var tour = require('web_tour.tour'); + +var _t = core._t; + +tour.register('account_tour', { + 'skip_enabled': true, +}, [{ + trigger: ".o_form_readonly .o_invoice_validate", + extra_trigger: '.o_invoice_form', + content: _t("Click to <b>validate your invoice.</b> A reference will be assigned to this invoice and you will not be able to modify it anymore."), + position: "right" +}, { + trigger: ".o_invoice_send", + extra_trigger: '.o_invoice_form', + content: _t("Click to <b>send the invoice by email.</b>"), + position: "bottom" +}, { + trigger: ".o_mail_send", + content: _t("Click to <b>send the invoice.</b>"), + position: "bottom" +} ]); + +}); diff --git a/addons/account/views/account.xml b/addons/account/views/account.xml index a6da2f17b5f..70d525890d1 100644 --- a/addons/account/views/account.xml +++ b/addons/account/views/account.xml @@ -25,6 +25,7 @@ <script type="text/javascript" src="/account/static/src/js/account_dashboard_setup_bar.js"></script> <script type="text/javascript" src="/account/static/src/js/section_and_note_fields_backend.js"></script> + <script type="text/javascript" src="/account/static/src/js/tour.js"></script> </xpath> </template> diff --git a/addons/account/views/account_menuitem.xml b/addons/account/views/account_menuitem.xml index 463c7f41823..3de92d67644 100644 --- a/addons/account/views/account_menuitem.xml +++ b/addons/account/views/account_menuitem.xml @@ -6,13 +6,9 @@ <menuitem name="Invoicing" id="menu_finance" groups="account.group_account_user,account.group_account_manager,account.group_account_invoice" - web_icon="account_invoicing,static/description/icon.png" + web_icon="account,static/description/icon.png" sequence="40"/> - <record id="menu_finance" model="ir.ui.menu"> - <field name="active" eval="False"/> - </record> - <menuitem id="menu_finance_receivables" name="Sales" parent="menu_finance" sequence="2"/> <!--Sales sub-menus--> <menuitem id="menu_finance_receivables_documents" name="Documents" parent="menu_finance_receivables" sequence="1"/> diff --git a/addons/account/views/digest_views.xml b/addons/account/views/digest_views.xml new file mode 100644 index 00000000000..7398744d194 --- /dev/null +++ b/addons/account/views/digest_views.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <record id="digest_digest_view_form" model="ir.ui.view"> + <field name="name">digest.digest.view.form.inherit.account.account</field> + <field name="model">digest.digest</field> + <field name="inherit_id" ref="digest.digest_digest_view_form"/> + <field name="arch" type="xml"> + <xpath expr="//group[@name='kpi_general']" position="after"> + <group name="kpi_account" string="Invoicing" groups="account.group_account_manager"> + <field name="kpi_account_total_revenue"/> + </group> + </xpath> + </field> + </record> +</odoo> diff --git a/addons/account/views/res_config_settings_views.xml b/addons/account/views/res_config_settings_views.xml index 25749791a1f..ce18cf8ee7c 100644 --- a/addons/account/views/res_config_settings_views.xml +++ b/addons/account/views/res_config_settings_views.xml @@ -16,7 +16,7 @@ <field name="inherit_id" ref="base.res_config_settings_view_form"/> <field name="arch" type="xml"> <xpath expr="//div[hasclass('settings')]" position="inside"> - <div class="app_settings_block o_not_app" data-string="Invoicing" string="Invoicing" data-key="account_invoicing" groups="account.group_account_manager"> + <div class="app_settings_block" data-string="Invoicing" string="Invoicing" data-key="account" groups="account.group_account_manager"> <field name="has_chart_of_accounts" invisible="1"/> <field name="has_accounting_entries" invisible="1"/> <h2 attrs="{'invisible': [('has_accounting_entries','!=',False)]}">Fiscal Localization</h2> @@ -539,7 +539,7 @@ <field name="res_model">res.config.settings</field> <field name="view_mode">form</field> <field name="target">inline</field> - <field name="context">{'module' : 'account_invoicing'}</field> + <field name="context">{'module' : 'account'}</field> </record> <menuitem id="menu_account_config" name="Settings" parent="menu_finance_configuration" |
