Commit Graph
2670 Commits
Author SHA1 Message Date
Adrien Dieudonne 464968de36 [FIX] account, hr_expense: amounts on multiple lines in the dashboard
Before this commit, the amount currency could be wrapped on a
second line (on mobile).

To fix this, we had to find a way to have more space:
- Buttons are now displayed at the top (mobile only).
- Amounts can grow (col-auto) and the other column will take the
  space left (col) and add "..." when there is not enough space.
  (mobile + desktop)

We also had to remove a button from a div tag in order to display
the buttons next to each other on mobile (buttons are "inline-block"
but div is a "block").
The main flow tour has been adapted accordingly and the typo has
been fixed too...

closes odoo/odoo#46680

Task-id: 2184243
X-original-commit: 159e3d4cb8a301c908f7718a56138528033e75d4
Related: odoo/enterprise#8963
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-03-03 08:09:49 +00:00
jbm-odoo b2414b118d [IMP] hr_expense: Add dashboard for My Expenses
closes odoo/odoo#45659

Taskid: 2198487
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-28 10:36:52 +00:00
jbm-odoo 39c570a777 [IMP] hr_expense: Add tracking on some values
closes odoo/odoo#42823

Taskid: 1978580
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-26 13:08:31 +00:00
Victor Feyens 570e2b3105 [FIX] hr_expense: ensure properties are read with the correct company. 2020-02-27 12:19:24 +00:00
Goffin Simon 499853e273 [FIX] hr_expense: Email creation for Expense
Steps to reproduce the bug:

- Let's consider an expense product P with internal reference = 1 and sales price = 100€
- Let's consider an employee E with a work email address W
- Configure your domain alias as odoo.com
- Configure the expense alias as expense
- Send an email from W to expense@odoo.com with '1 P 100' as subject

Bug:

An expense had been created for E with P as product and 0€ as price

opw:2191939

closes odoo/odoo#46314

X-original-commit: bde7d4ecb2b4e7954753ff932467ce5618720580
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-26 10:15:15 +00:00
oco-odoo 4b629c7243 [FIX] account, hr_expense: incorrect forward-port
Incorrect forward-port of e09798098679f made in 51d49517a8b5af2d1c85d9c6.

closes odoo/odoo#45775

X-original-commit: 099d0d6785b85dd67ef091fdaef084713fafb3c0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 08:55:15 +00:00
Ankita Raval 933b21e2c5 [IMP] account,*: rename tag_ids to tax_ids in account.move
closes odoo/odoo#44835

Note: Many2many table name and columns name is not changed so no change in report's query
Task-id: 2028813
Related: odoo/enterprise#8261
Related: odoo/upgrade#745
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-19 09:09:20 +00:00
oco-odoo 4dd36a86e9 [FIX] account: fix bank account requirement on account.payment form
When making a payment for multiple vendor bills at once, it is possible that payments will be generated without any recipient bank account for payment methods normally requiring one. In such cases, the user needs to be able to correct the payments by cancelling them. It was not possible.

closes odoo/odoo#45082

X-original-commit: 9aec95dccef48a9ec89691f5721619ffc0e4da56
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-17 16:12:48 +00:00
Nicolas Martinelli 9621369e05 [FIX] hr_expense: unit_amount digits
The `unit_amount` is a `Float` field with `digits='Product Price'`.
Therefore, keep the number of digits of the field, not of the currency.

opw-2188646

closes odoo/odoo#45293

X-original-commit: 88f162ec5c87e50a3ba0f7a050ebf3778bc0c157
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-13 12:34:30 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
alt-odoo 1bbe7c034c [FIX] hr_expense: add constraint on product_id in hr.expense model
Before this commit, it was possible to delete an expense product even if it
was already set on expense notes.

closes odoo/odoo#45216

X-original-commit: d887bff9d52b649ea84d351fbf5fb2afbcebcbcd
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-02-12 15:07:58 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
Martin Trigaux 65530dfd6a [ADD] *: add ir.model.access on all transient models
Following changes needing ir.model.access on transient models too.
Remove groups declaration on the action to move it to ir.model.access
when possible.
Rules are strict by default with no unlink access by default and high
priviledge asked. Adaptations may be needed later.
Write access is given as a wizard may need to be modified in case the
action triggers an error and the user has to correct a value

account*: use account.group_account_user for all transient by default
	  remove account.print.journal relic
stock*: use stock.group_stock_user by default
survey: survey user can send invitations
mail: allow any employee to execute wizards
      additional verifications are made to ensure they are executed
      only on the documents the user has access to you
      give portal access to mail.compose.message as portal still does
      some actions like posting messages on the forum
      add ir.rule to avoid reading somebody else messages
      increase the query count because of undeterminist count
crm: saleman for lead2opp, manager for massmailing
     partner manager for actions linked to partners
     avoid a write in test_lead_lost
sms: any employee can send sms
mrp: mrp user can execute wizards
     give unlink access as making write during do_produce operation
base_import: employees can import files
delivery: stock user can deliver
event_sale: sale user can configure the wizards
	    event user inherit from  sale rights
gamification: employee can give badge
google_service: resolve FIXME
hr: add specific rights
    manager can set a plan according to group on button
    anyone who can write on an employee can register a departure
hr_expense: set rights based on buttons
hr_holidays: an approver can make a summary report
hr_recruitment: recruiter can refuse a candidate
hr_timesheet: can use the wizard if can create a timesheet
l10n_eu_service: managers can create fiscal positions
mass_mailing: same group as on mass.mailing.list
membership: accountant can create invoice from membership
payment: accountant can create a link
	 as the source is an account.move
	 keep the payment.acquirer.onboarding.wizard to system user
	 only as it is called during company configuration
point_of_sale: PoS manager only can use wizards
	       never create closing_balance_confirm_wizard records
product_expiry: stock user has rights on stock.picking
product_margin: access from accounting menus
repair: same rules as for above models
sale: set ir.rule for self wizard only
      add rule from model introduced in payment to add salesman group
sale_crm: saleman can create a quotation from a lead
sale_coupon: any saleman can generate coupon
	     add self ir.rule
sale_product_configurator: salesman can select product variants
snailmail: employee can send letters
website: designers can write on website
website_crm_partner_assign: same rule as group on action
website_sale: sale ACL as for payment.acquirer.onboarding.wizard
website_slides: anyone can send invitation

base: base.language.*: allow employee (cf lang_install)
      change.password.user: can not read change password wizard of
      other users
      test.*: no access is needed

Courtesy of Damien Bouvy, William Andre and Antoine Prieëls for review
of acl
2020-02-04 17:54:18 +01:00
Xavier Morel de590816d8 [FIX] *: deprecated access to url_ utilities through werkzeug root
In 0.15 accessing werkzeug.urls functions directly through werkzeug
is deprecated, the shortcut will be removed in the eventual werkzeug
1.0.

Fix existing uses of these shortcuts. Also cleanup some imports when
they're not far from a werkzeug* import being altered.
2020-02-04 12:42:35 +00:00
jbw 7b5664660f [IMP] hr_expense enable attachment preview in journal view
Adding preview of expenses attachment to journal view.

When creating an expense, files can be attached (e.g. scanned receipts).
Those attachment files where not displayed in "Accounting > Accounting > Journals > Purchases" move_line list.
They now appear in the document preview.

Task = 2176443

closes odoo/odoo#44161

Related: odoo/enterprise#8002
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-03 15:35:08 +00:00
Thomas Carlier 4eeeb4f172 [ADD] hr_expense : add the ability to install OCR module
- if checked in settings, OCR can be used to get infos from the attached receipt image

- set default product to EXP_GEN when created from picture

- use "register_as_main attachment" when expenses are created from receipt images

- Add the upload button to the kanban view to see it immediately in the mobile version
  and use it to create expenses from pictures. (with or without OCR installed)

closes odoo/odoo#39559

Related: odoo/enterprise#6493
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2020-01-28 14:41:37 +00:00
wan f315df2e58 [IMP] account, hr_expense: misc improvements of accounting
Task 2176461
* Dashboard: don't show lins if there is no data
* Add new menu for expense reports
* Reorganize notes on bottom of printed invoice

closes odoo/odoo#43787

Related: odoo/enterprise#7880
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-01-22 16:49:18 +00:00
Nisha patel b7c5b28b9c [IMP] hr(_expense,_holidays): modify help message
In Employee / Work information / Responsible: there is a lack of
information on the "help message" The objective is to change text
in the help message by the ones below:

Field "Coach":
  -Employee responsible of this employee.
  -The "coach" has no specific rignts or responsibilities by default.
Field "Time Off":
  -User responsible for approving "time off" of this employee.
  -If empty, the approval is done by any administrators or approvers (determinated in settings/users)
Field "expense":
  -User responsible for approving "Expenses" of this employee.
  -If empty, the approval is done by any administrators or approvers (determinated in settings/users)

TaskId :2168330

closes odoo/odoo#43467

Closes: #43467
Related: odoo/enterprise#7778
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-24 09:59:40 +00:00
wan d8c5cc1335 [IMP] account: add a readonly group
Task 2092079
Accounting firms that want to give access to their customers avoiding
mistakes and risks will love this profile that can't do anything
wrong... Maybe as well as companies auditors..?

closes odoo/odoo#39860

Related: odoo/enterprise#6576
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-01-22 11:23:16 +00:00
fw-bot fccaa703c4 [MERGE] project, hr_expense: Fix several multi-company issues + tests
Purpose
Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.

Specification
Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.

Taskid: 2088891
X-original-commit: 5c8df3a5e5f7960e5eab6439e0a32a06224ba826
2020-01-15 15:11:50 +01:00
Barad Mahendra 5af891c490 [IMP] hr_expense: add upload button on expenses kanban view
Purpose of the task is to improve the mobile user experience of
the Expenses app by adding the upload button to the Expenses
kanban view.

Task ID: 2152155

closes odoo/odoo#41839

Closes: #41839
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-31 04:36:00 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Nicolas Martinelli b0605b4adc [FIX] *: make ribbon text translatable
closes odoo/odoo#41749

X-original-commit: 64c259fc74a8181aa381b6647a9816b6f5530dfd
Related: odoo/enterprise#7216
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-04 12:01:16 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Yannick Tivisse 4efe0e3b16 [IMP] hr_timesheet, project, hr_expense: Introduce multi-edit lists
closes odoo/odoo#40048

Taskid: 2078161
Related: odoo/enterprise#6633
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 11:29:18 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Yenthe666 78ae3da902 [IMP] *: set name element on main containers in configuration views
This will improve the extendibility of view inheritance

closes odoo/odoo#41398

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-09 10:38:59 +00:00
Thibault Delavallée 69ccabb212 [FIX] mail: restrict access to mail.mail model
From now on mail.mail is considered as a technical model. Indeed people should
not really manually craft mails by hand. Instead various functional flows
should either send mails, either craft mails based on some user input.

We therefore make mail restricted to admin users. Flows creating mail.mail
are updated to use sudo, and ensure it was done in a context that makes
sense to delegate this power to the user.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Thibault Delavallée 1838191eec [REF] mail, various: improve mail creation calls, notably author and email from default computation
Purpose of this commit is to correctly compute author_id and email_from
in mail_message and mail_mail as they depends from each other. Moreover it
is a good idea in various flows to specify email and author when giving
creation values to avoid default computation that is not always guaranteed to
be accurate notably when involving super user.

Mail message creation could lead to desynchronized values between author
and email_from. This is improved with this commit by correctly inheriting
from default_get and computing both of them at the same time instead of having
two default values. Indeed they depend on each other.

Same thing is done for mail composer. Mail Thread offers a tool method to
find email_from / author_id based on having one of those values or current
user and it is called whenever necessary.

Some calls to mail template send_mail are also cleaned.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Xavier Morel 2c123005a7 [REM] dynamic domain from hr_timesheet
closes odoo/odoo#40952

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-29 09:10:07 +00:00
jbm-odoo 9725eadfdd [Fix] hr_employee: Fix compute fields
When we add a user to employee, we can have problem with leave,
expense or coach manager. It's due to those compute fields.

closes odoo/odoo#40795

Related: odoo/enterprise#6865
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:40:34 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
jbm-odoo 6b5bdbb476 [IMP] hr_[contract,employee,recruitment,work_entry]: Add multi edit in view
Make some fields editable in multi edit.
Some onchange are tranformed in compute fields.

id=2078674

closes odoo/odoo#39711

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-06 10:08:50 +00:00
laa 70c370b01e [IMP] project,hr_expense,hr_timeshee: Add optional fields in list view
Add and modify multiple fields in tree view for next next model:
- hr.expense
- hr.expense.sheet
- project.project
- planning.slot
- Field Service project.task

closes odoo/odoo#39441

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-18 12:56:10 +00:00
Victor Feyens 9215e73fa2 [IMP] * : replace with_context(force_company=c) by with_company(c) 2019-11-18 12:25:05 +00:00
Yannick Tivisse f44fbdb833 [IMP] account: Clean common tests classes 2019-11-12 11:34:36 +00:00
mreficent d09418e861 [FIX] hr_expense: don't show attachment icon if no attachments
closes odoo/odoo#33869

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-03 09:56:05 +00:00
Yannick Tivisse 886cc7600a [IMP] hr_expense: Adapt tests to work with/without demo data 2019-11-05 13:08:03 +01:00
Kevin Baptiste 08eafe3a57 [IMP] hr_expense: less email notification on assignation
Managers were receiving 2 emails to say basically the same thing. This
commit removes one of those emails ("You have been assigned to ...").

closes odoo/odoo#39058

Taskid: 2067994
X-original-commit: 1dbffeb7dba9ed862d6c62ebd771e7581dd33250
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 19:30:04 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Parth Choksi c73d5cb1d6 [FIX] *: removed activity exception filter from searchviews
*: account
   crm
   event
   fleet
   hr_expense
   hr_holidays
   hr_recruitment
   mail
   maintenance
   mrp
   note
   project
   purchase_requisition
   repair
   stock_landed_costs
   stock_picking_batch
   survey
   website_event_track

This commit is making sure that the exception activities filters are
only defined where it make sense (i.e. where the system can actually
create an exception activity).

We have therefore removed 'exception activities' filters where the
system won't be creating any.

Task-2056425

closes odoo/odoo#36027

Closes: #36027
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-07 12:31:01 +00:00
Martin Trigaux 42417956c0 [I18N] *: export 13.0 source terms
closes odoo/odoo#38028

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-07 07:55:34 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
jem-odoo de8e413e08 [IMP] hr_expense: use 'check_company' mecanism
As the ORM now supports some helpers to handle
multi company environment, it is recommended to
use them. So, this commit changes technically
some aspect of the multi company consistency
implemented a few commit ago.

Task-1999686
2019-09-27 11:43:13 +00:00
Kaushalya Mandaliya b7b3c33aa3 [IMP] account, *: adding domain in analytic account fields
*: hr_expense, project

Adding required domain which will allow to only select analytic accounts whose
company is same as current one or blank.

task-1966016

closes odoo/odoo#37450

Closes: #34270
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-25 15:58:59 +00:00
Christophe Simonis f1c0b08504 [MERGE] forward port branch saas-12.4 up to bef26222b8 2019-09-25 16:53:26 +02:00
Ankita Raval 3c8f9a1973 [IMP] hr_expense : fix issues
In this commit, we add a currency symbol in kanban card.

closes odoo/odoo#36440

Task-id: 2061910
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-09-24 13:52:14 +00:00
Odoo Translation Bot e41f468972 [I18N] Update translation terms from Transifex 2019-09-22 06:10:13 +02:00