[NEW] hr_expense: new tour
[NEW] point_of_sale: new tour [IMP] hr_expense: main employee is created by default, so that you can use the email gateway and record expenses, without configuration required [IMP] all tours: applying JWR propositions: americanization of tips [IMP] crm tour: add invite people steps Merge branch 'master-expense-tip-fp'
This commit is contained in:
@@ -10,21 +10,21 @@ tour.register('account_accountant_tour', {
|
||||
'skip_enabled': true,
|
||||
}, [{
|
||||
trigger: '.o_app[data-menu-xmlid="account.menu_finance"], .oe_menu_toggler[data-menu-xmlid="account.menu_finance"]',
|
||||
content: _t('Ready to <b>discover an awesome accounting</b> app? <i>Follow the tips</i>.'),
|
||||
content: _t('Ready to discover your new favorite <b>accounting app</b>? Get started by clicking here.'),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: ".o_invoice_new",
|
||||
extra_trigger: '.o_account_kanban',
|
||||
content: _t("Let\'s start with a customer invoice."),
|
||||
content: _t("Let\'s start with a new customer invoice."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".breadcrumb li:not(.active):last",
|
||||
extra_trigger: "[data-id='open'].btn-primary, [data-id='open'].oe_active",
|
||||
content: _t("Use the breadcrumbs to easily <b>go back to preceeding screens.</b>"),
|
||||
content: _t("Use the path to quickly click back to <b>previous screens</b>, without reloading the page."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: 'li a[data-menu-xmlid="account.menu_finance_reports"], div[data-menu-xmlid="account.menu_finance_reports"]',
|
||||
content: _t("Your reports are available in real time. <i>No need to close a fiscal year to get a Profit & Loss statement or a Balance Sheet.</i>"),
|
||||
content: _t("Your reports are available in real time. <i>No need to close a fiscal year to get a Profit & Loss statement or view the Balance Sheet.</i>"),
|
||||
position: "bottom"
|
||||
}]);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ tour.register('crm_tour', {
|
||||
'skip_enabled': true,
|
||||
}, [{
|
||||
trigger: '.o_app[data-menu-xmlid="sales_team.menu_base_partner"], .oe_menu_toggler[data-menu-xmlid="sales_team.menu_base_partner"]',
|
||||
content: _t("Ready to boost you sales? It starts with the <b>CRM app</b>."),
|
||||
content: _t("Ready to boost you sales? Your <b>sales pipeline</b> can be found here, under this app."),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: ".o_welcome_content .o_dashboard_action",
|
||||
@@ -20,7 +20,7 @@ tour.register('crm_tour', {
|
||||
}, {
|
||||
trigger: ".o-kanban-button-new",
|
||||
extra_trigger: '.o_opportunity_kanban',
|
||||
content: _t("Create your first business opportunity."),
|
||||
content: _t("Click here to <b>create your first opportunity</b> and add it to your pipeline."),
|
||||
position: "right"
|
||||
}, {
|
||||
trigger: ".o_opportunity_kanban .o_kanban_record:nth-child(2)",
|
||||
@@ -50,6 +50,18 @@ tour.register('crm_tour', {
|
||||
extra_trigger: '.o_opportunity_form',
|
||||
content: _t("Use the breadcrumbs to <b>go back to your sales pipeline</b>."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_main_navbar .o_menu_toggle",
|
||||
content: _t('Click the <i>Home icon</i> to navigate across apps.'),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_apps .o_app:last",
|
||||
content: _t("Configuration options are available in the Settings app."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_web_settings_dashboard textarea#user_emails",
|
||||
content: _t("<b>Invite collegues</b> via email.<br/><i>Enter one email per line.</i>"),
|
||||
position: "right"
|
||||
}]);
|
||||
|
||||
});
|
||||
|
||||
@@ -21,5 +21,14 @@ Leave Management (keep track of employee leaves), Expense Management (manage emp
|
||||
<field name="name">Sales</field>
|
||||
</record>
|
||||
|
||||
<record id="employee" model="hr.employee">
|
||||
<field name="name" eval="obj(ref('base.partner_root')).name" model="res.partner"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="address_id" ref="base.partner_root"/>
|
||||
<field name="address_home_id" ref="base.partner_root"/>
|
||||
<field name="image" type="base64" file="hr/static/img/employee-image.png"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -585,7 +585,7 @@
|
||||
action="open_module_tree_department"
|
||||
id="menu_hr_department_tree"
|
||||
parent="menu_hr_root"
|
||||
sequence="1"
|
||||
sequence="90"
|
||||
groups="base.group_hr_user"/>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -283,12 +283,12 @@ class HrExpense(models.Model):
|
||||
if help_message:
|
||||
alias_record = self.env.ref('hr_expense.mail_alias_expense')
|
||||
if alias_record and alias_record.alias_domain and alias_record.alias_name:
|
||||
dynamic_help = '<p>%s</p>' % _("""Create a new expense, or send receipts by email to %(link)s to automatically create new expenses.""") % {
|
||||
'link': "<a href='mailto:%(email)s'>%(email)s</a>" % {'email': '%s@%s' % (alias_record.alias_name, alias_record.alias_domain)}
|
||||
link = "<a id='o_mail_test' href='mailto:%(email)s&subject=Lunch+with+customer%%3A+%%2412.32'>%(email)s</a>" % {
|
||||
'email': '%s@%s' % (alias_record.alias_name, alias_record.alias_domain)
|
||||
}
|
||||
return '<p class="oe_view_nocontent_create">%s</p>%s%s' % (
|
||||
_('Click to add a new expense'),
|
||||
dynamic_help,
|
||||
return '<p class="oe_view_nocontent_create">%s<br/>%s</p>%s' % (
|
||||
_('Click to add a new expense,'),
|
||||
_('or send receipts by email to %s.') % (link,),
|
||||
help_message)
|
||||
return super(HrExpense, self).get_empty_list_help(help_message)
|
||||
|
||||
|
||||
@@ -1,14 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models
|
||||
from openerp import SUPERUSER_ID
|
||||
|
||||
class HrExpenseConfigSettings(models.TransientModel):
|
||||
_name = 'hr.expense.config.settings'
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
alias_expense_open = fields.Selection([
|
||||
('open', "Accept expenses from any email address"),
|
||||
('restricted', "Accept expenses from employee email address only")
|
||||
], "Mail Gateway")
|
||||
|
||||
alias_prefix = fields.Char('Default Alias Name for Expenses')
|
||||
alias_domain = fields.Char('Alias Domain', default=lambda self: self.env["ir.config_parameter"].get_param("mail.catchall.domain"))
|
||||
|
||||
@api.model
|
||||
def get_default_alias_expense_open(self):
|
||||
return {'alias_expense_open': self.env['ir.config_parameter'].get_param("hr_expense.email.gateway")}
|
||||
|
||||
@api.multi
|
||||
def set_default_alias_expense_open(self):
|
||||
self.env['ir.config_parameter'].set_param("hr_expense.email.gateway", self.alias_expense_open)
|
||||
return True
|
||||
|
||||
@api.model
|
||||
def get_default_alias_prefix(self, fields):
|
||||
alias_name = self.env.ref('hr_expense.mail_alias_expense').alias_name
|
||||
|
||||
@@ -10,7 +10,37 @@ tour.register('hr_expense_tour', {
|
||||
'skip_enabled': true,
|
||||
}, [{
|
||||
trigger: '.o_app[data-menu-xmlid="hr_expense.menu_hr_expense_root"], .oe_menu_toggler[data-menu-xmlid="hr_expense.menu_hr_expense_root"]',
|
||||
content: _t("Want to manage your employee expenses? Let's go to the <b>Expenses app</b>."),
|
||||
content: _t("Want to manage your employee expenses and receipts? <i>Start here</i>."),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: 'a#o_mail_test',
|
||||
content: _t("Click to try <b>submitting an expense by email</b>. You can attach a photo of the receipt to the mail."),
|
||||
position: 'right',
|
||||
}, {
|
||||
trigger: '.o_expense_submit:visible',
|
||||
content: _t("<p>Once completed, you can <b>submit the expense</b> for approval.</p><p><i>Tip: from the list view, select all expenses to submit them all at once, in a single report.</i>"),
|
||||
extra_trigger: '.o_form_readonly',
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: '.o_form_button_save:visible',
|
||||
extra_trigger: '.o_expense_sheet',
|
||||
content: _t("Save the report, your manager will receive a notification by email to approve it."),
|
||||
position: 'right',
|
||||
}, {
|
||||
trigger: '.o_expense_sheet_approve:visible',
|
||||
content: _t("<p>Managers can validate or refuse expense reports.</p><p>If you refuse a report, explain the reason using the <i>New Message</i> button in the bottom.</p>"),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: '.o_expense_sheet_post:visible',
|
||||
content: _t("<p>The accountant receive approved expense reports.</p><p>He can post journal entries in one click if taxes and accounts are right.</p>"),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: '.o_expense_sheet_pay:visible',
|
||||
content: _t("The accountant can register a payment to reimburse the employee directly."),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: 'li a[data-menu-xmlid="hr_expense.menu_hr_expense_sheet_my_all"], div[data-menu-xmlid="hr_expense.menu_hr_expense_sheet_my_all"]',
|
||||
content: _t("Managers can get all reports to approve from this menu."),
|
||||
position: 'bottom',
|
||||
}]);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Expenses">
|
||||
<header>
|
||||
<button name="submit_expenses" states="draft" string="Submit to Manager" type="object" class="oe_highlight"/>
|
||||
<button name="submit_expenses" states="draft" string="Submit to Manager" type="object" class="oe_highlight o_expense_submit"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,reported,done" statusbar_colors='{"reported":"blue"}'/>
|
||||
<button name="view_sheet" type="object" string="View Report" class="oe_highlight" attrs="{'invisible': [('state', '=','draft')]}"/>
|
||||
</header>
|
||||
@@ -409,8 +409,8 @@
|
||||
<field name="model">hr.expense.sheet</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Expense Reports" decoration-warning="state=='draft'" decoration-bf="message_unread == True">
|
||||
<field name="accounting_date"/>
|
||||
<field name="name" string="Expense Sheet"/>
|
||||
<field name="accounting_date"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="total_amount" sum="Total Amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="state"/>
|
||||
@@ -424,11 +424,11 @@
|
||||
<field name="model">hr.expense.sheet</field>
|
||||
<field eval="25" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Expense Reports">
|
||||
<form string="Expense Reports" class="o_expense_sheet">
|
||||
<header>
|
||||
<button name="approve_expense_sheets" states="submit" string="Approve" type="object" groups="base.group_hr_user" class="oe_highlight"/>
|
||||
<button name="action_sheet_move_create" states="approve" string="Post Journal Entries" type="object" groups="account.group_account_user" class="oe_highlight"/>
|
||||
<button name="%(hr_expense.hr_expense_register_payment_wizard_action)d" type="action" string="Register Payment" class="oe_highlight" attrs="{'invisible': [('state', '!=', 'post')]}" context="{'default_amount': total_amount, 'partner_id': address_id}" groups="account.group_account_user"/>
|
||||
<button name="approve_expense_sheets" states="submit" string="Approve" type="object" groups="base.group_hr_user" class="oe_highlight o_expense_sheet_approve"/>
|
||||
<button name="action_sheet_move_create" states="approve" string="Post Journal Entries" type="object" groups="account.group_account_user" class="oe_highlight o_expense_sheet_post"/>
|
||||
<button name="%(hr_expense.hr_expense_register_payment_wizard_action)d" type="action" string="Register Payment" class="oe_highlight o_expense_sheet_pay" attrs="{'invisible': [('state', '!=', 'post')]}" context="{'default_amount': total_amount, 'partner_id': address_id}" groups="account.group_account_user"/>
|
||||
<button name="reset_expense_sheets" states="cancel" string="Resubmit" type="object"/>
|
||||
<button name="%(hr_expense.hr_expense_refuse_wizard_action)d" states="submit" string="Refuse" type="action" groups="base.group_hr_user" />
|
||||
<button name="%(hr_expense.hr_expense_refuse_wizard_action)d" states="approve" string="Refuse" type="action" groups="account.group_account_user"/>
|
||||
@@ -786,7 +786,7 @@
|
||||
<menuitem id="menu_hr_expense_sheet_my_reports" name="My Reports" sequence="15" parent="menu_hr_expense_root"/>
|
||||
<menuitem id="menu_hr_expense_sheet_my_to_approve" name="To Approve" sequence="1" parent="menu_hr_expense_sheet_my_reports" action="action_hr_expense_sheet_my_to_approve"/>
|
||||
|
||||
<menuitem id="menu_hr_expense_sheet_my_all" name="All Reports" sequence="2" parent="menu_hr_expense_sheet_my_reports" action="action_hr_expense_sheet_my_all"/>
|
||||
<menuitem id="menu_hr_expense_sheet_my_all" name="All Reports" sequence="2" parent="menu_hr_expense_sheet_my_reports" action="action_hr_expense_sheet_my_all" load_xmlid="True"/>
|
||||
<menuitem id="menu_hr_expense_sheet_all" name="All Reports" sequence="20" parent="menu_hr_expense_root"/>
|
||||
<menuitem id="menu_hr_expense_sheet_all_to_approve" name="Reports To Approve" sequence="1" parent="menu_hr_expense_sheet_all"
|
||||
action="action_hr_expense_sheet_all_to_approve" groups="base.group_hr_user"/>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
name="base_setup.action_general_configuration"
|
||||
string="Setup your domain alias" class="oe_link"/>
|
||||
</div>
|
||||
<field name="alias_expense_open" widget="radio"/>
|
||||
</div>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
@@ -10,7 +10,7 @@ tour.register('mail_tour', {
|
||||
'skip_enabled': true,
|
||||
}, [{
|
||||
trigger: '.o_mail_chat .o_mail_chat_sidebar .o_add[data-type="public"]',
|
||||
content: _t("<p>Channels help organize information across different topics and groups.</p> <p>Try to <b>create your first channel</b> (e.g. sales, marketing, product XYZ, after work party...).</p>"),
|
||||
content: _t("<p>Channels make it easy to organize information across different topics and groups.</p> <p>Try to <b>create your first channel</b> (e.g. sales, marketing, product XYZ, after work party, etc).</p>"),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: '.o_mail_chat .o_composer_text_field',
|
||||
@@ -19,12 +19,16 @@ tour.register('mail_tour', {
|
||||
width: 350,
|
||||
}, {
|
||||
trigger: ".o_mail_chat .o_mail_thread .o_thread_message_star",
|
||||
content: _t("You can <b>star a message</b> to remember yourself you should do something about it later."),
|
||||
content: _t("Messages can be <b>starred</b> to remind you to check back later."),
|
||||
position: "right",
|
||||
}, {
|
||||
trigger: '.o_mail_chat .o_mail_chat_channel_item[data-channel-id="channel_starred"]',
|
||||
content: _t("Get all your <b>starred messages</b> here."),
|
||||
content: _t("Once a message has been starred, you can come back and review it at any time here."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
trigger: '.o_mail_chat .o_mail_chat_sidebar .o_add[data-type="dm"]',
|
||||
content: _t("<p><b>Chat with collegues</b> in real-time using direct messages.</p><p><i>You might need to invite users from the Settings app first.</i></p>"),
|
||||
position: 'bottom',
|
||||
}]);
|
||||
|
||||
});
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
odoo.define('crm.tour', function(require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
var tour = require('web_tour.tour');
|
||||
|
||||
var _t = core._t;
|
||||
|
||||
tour.register('point_of_sale_tour', {
|
||||
'skip_enabled': true,
|
||||
}, [{
|
||||
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"], .oe_menu_toggler[data-menu-xmlid="point_of_sale.menu_point_root"]',
|
||||
content: _t("Ready to launch your <b>point of sale</b>? <i>Click here</i>."),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: ".o_pos_kanban button.oe_kanban_action_button",
|
||||
content: _t("<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>"),
|
||||
position: "bottom"
|
||||
}]);
|
||||
|
||||
});
|
||||
@@ -3,6 +3,7 @@
|
||||
<template id="assets_backend" name="hr assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/point_of_sale/static/src/less/pos_dashboard.less"/>
|
||||
<script type="text/javascript" src="/point_of_sale/static/src/js/tour.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<menuitem
|
||||
id="menu_point_root"
|
||||
name="Point of Sale"
|
||||
load_xmlid="True"
|
||||
groups="group_pos_manager,group_pos_user"
|
||||
web_icon="point_of_sale,static/description/icon.png"
|
||||
sequence="20"/>
|
||||
|
||||
@@ -79,7 +79,7 @@ tour.register('project_tour', {
|
||||
content: _t("Configuration options are available in the Settings app."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_web_settings_dashboard .o_web_settings_dashboard_invitations",
|
||||
trigger: ".o_web_settings_dashboard textarea#user_emails",
|
||||
content: _t("<b>Invite collegues</b> via email.<br/><i>Enter one email per line.</i>"),
|
||||
position: "right"
|
||||
}]);
|
||||
|
||||
@@ -31,6 +31,18 @@ tour.register('sale_tour', {
|
||||
trigger: 'li a[data-menu-xmlid="base.menu_sales"], .oe_secondary_menu_section[data-menu-xmlid="base.menu_sales"]',
|
||||
content: _t("Use this menu to access quotations, sales orders and customers."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_main_navbar .o_menu_toggle",
|
||||
content: _t('Click the <i>Home icon</i> to navigate across apps.'),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_apps .o_app:last",
|
||||
content: _t("Configuration options are available in the Settings app."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_web_settings_dashboard textarea#user_emails",
|
||||
content: _t("<b>Invite collegues</b> via email.<br/><i>Enter one email per line.</i>"),
|
||||
position: "right"
|
||||
}]);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user