Commit Graph
126749 Commits
Author SHA1 Message Date
Kaushalya Mandaliya f2bd331e08 [IMP] stock: making traceability report full-width in backend view
Task-1974338
2019-05-21 09:35:59 +00:00
Kaushalya Mandaliya 7b65e6c6bb [FIX] stock: no formatting while printing traceability report for the first time
While generating the traceability report for the first time,
if the assets are not in cache, the report will be having simple markup with
no styles applied. To workaround this issue, we manually commit the writes
in the `ir.attachment` table. It is done thanks to a key in the context.

Task-1974338
2019-05-21 09:35:59 +00:00
Xavier Morel ff02bf1137 [REM] multi from ir.actions.act_window
Task 1843603

* src_model is redundant with binding_model_id
* multi -> binding_view_types (if empty => all views) (maybe should be
empty by default yo?)
* in convert, type => rec.get(type) but no @type possible on <act_window>...
* removed deprecated auto_refresh & auto_search (not used anywhere (?))

closes odoo/odoo#24738

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-27 12:00:39 +00:00
William Henrotin 6bc26ff5e9 [IMP] mrp: alternative workcenters
Purpose: link workcenters that can do the same job together.
Planning a workorder will be done by choosing, among the similar
workcenters, the one that will finish the production the soonest.

This commit adds a new many2many field on the mrp.workcenter
model. Planning the workorders will:
1. Loop on the operation's workcenter and all the alternative ones.
2. Compute the first available work slot for each of those workcenters.
3. Choose the soonest finished slot

Furthermore, planning workorder is done thanks to the resource module.
Each workorder is saved on its own workcenter calendar by a resource.calendar.leaves
The two date fields are thus computed from the leave date.

Task : 1892819

closes odoo/odoo#33018

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-28 06:50:58 +00:00
William Henrotin 2c299e7b21 [REF] resource: relax ir rule on leaves
The field user_id on resource.resource is optional but the access rules
on resource.calendar.leaves request that field set. Which means a user
can only see his own leaves but not the ones of a machine's calendar for.
instance

This commit relax those rules to give access to the user's leaves and the
one not assigned to a specific user

Task : 1892819
2019-05-28 06:50:00 +00:00
Jigar Patel 9ab3270c5a [FIX] web: avoid flickering when click on action defined using href tag
Before this commit,
Defining action using <a type="action"> outside of normal views(like qweb view)
css style does not apply to it because missing the href tag. by defining href
tag on a link will first open home screen then perform do_action thus it will do
flickering.

After this commit,
Prevent event default behaviour so it will stop flickering and restore css style
for action by defining href tag on it.

closes odoo/odoo#33703

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-28 06:40:33 +00:00
Xavier Morel 10f1a1a0c4 [REM] multi from ir.actions.act_window
Task 1843603

* src_model is redundant with binding_model_id
* multi -> binding_view_types (if empty => all views) (maybe should be
empty by default yo?)
* in convert, type => rec.get(type) but no @type possible on <act_window>...
* removed deprecated auto_refresh & auto_search (not used anywhere (?))

closes odoo/odoo#24738

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-27 12:00:39 +00:00
William Henrotin 0679d0d542 [IMP] mrp: alternative workcenters
Purpose: link workcenters that can do the same job together.
Planning a workorder will be done by choosing, among the similar
workcenters, the one that will finish the production the soonest.

This commit adds a new many2many field on the mrp.workcenter
model. Planning the workorders will:
1. Loop on the operation's workcenter and all the alternative ones.
2. Compute the first available work slot for each of those workcenters.
3. Choose the soonest finished slot

Furthermore, planning workorder is done thanks to the resource module.
Each workorder is saved on its own workcenter calendar by a resource.calendar.leaves
The two date fields are thus computed from the leave date.

Task : 1892819

closes odoo/odoo#33018

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-28 06:50:58 +00:00
William Henrotin 6fad651883 [REF] resource: relax ir rule on leaves
The field user_id on resource.resource is optional but the access rules
on resource.calendar.leaves request that field set. Which means a user
can only see his own leaves but not the ones of a machine's calendar for.
instance

This commit relax those rules to give access to the user's leaves and the
one not assigned to a specific user

Task : 1892819
2019-05-28 06:50:00 +00:00
Davor Bojkić 6dde6b98a5 [IMP] fleet: replace hardcoded ids by reference
More stable to changes

closes odoo/odoo#32960

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 16:15:33 +00:00
Pierre Masereel 3345056c5c [FIX] point_of_sale: fix syntax error
When calling function AND from expression, two arguments are given
instead of one.

closes odoo/odoo#33693

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-27 14:08:08 +00:00
Prakash Prajapati 9181133c1b [FIX] website_crm_partner_assign: fix layout related to lead on the portal
After this commit, lead portal layout alignment looks the same as another portal
layouts like an opportunity.

task-1946124

closes #33610

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-23 05:08:34 +00:00
Shreya Modi 393a824d66 [FIX] product: change in product name
we have changed the product name from Sale Description to
Description For Customers considering the same logic used in
other product namings and to make it more readable.

task-1987076

closes odoo/odoo#33554

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-23 11:27:06 +00:00
Swapnesh Shah ae92cddf60 [IMP] base: correct fields labels
Typos and grammar

closes odoo/odoo#33544

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 15:42:09 +00:00
Yannick Tivisse d83890dd14 [IMP] hr: Display certificate on employee form
closes odoo/odoo#33496

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-27 14:06:11 +00:00
Swapnesh Shah 316b33c869 [IMP] web: correct typo
closes odoo/odoo#33070

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 11:02:07 +00:00
Parth ChoksiandMohammed Shekha 745c7384e0 [IMP] base: notify user when there are modifications in settings
When user will modify something in settings, there will be a message
shown that will tell the user that he/she has unsaved changes.

task-1917637

closes odoo/odoo#31900

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-27 09:13:08 +00:00
Christophe Monniez ad2feb07f0 [FIX] base, account: allow AllL10n test case to start
Since a5b6f31, an attribute allowed_company_ids is set on request when
calling the module button_immediate_install method.
This method is called during the test TestAllL10n which does not have a
bound request and makes it fail.

With this commit, the attribute is set only if request is bound.

By the way, a small improvement is added in the test.
Before this commit, when the test was failing  because of the
button_immediate_install, it was immediately stopped.

The same problem was arising during the test method, it was stopped at
the first failure.

As this test is run as a nightly test, one have to wait the next day to
discover the next problem.

With this commit, the exceptions are catched during the l10n_ modules
installation and a simple error line is written in the logs. That way,
the runbot will still detect the error.

Also, the main test method that installs all the chart of accounts
splits those install into subtests. This prevent the method to stop at
first failure.

closes odoo/odoo#33654

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-05-27 09:17:21 +00:00
mreficent 27c0da9cb9 [IMP] website_livechat: correct typo in a template id
Was livecaht

closes odoo/odoo#33446

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 09:31:56 +00:00
wan 3c67bb20fe [REF] account_analytic_default*: split into multiple modules and add support for PO
Move the SO part in a new module
Add the functionality to PO

Task 1945220

closes odoo/odoo#33282

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-24 09:24:17 +00:00
Prakash PrajapatiandMohammed Shekha 4107dc11de [ADD] web: Allow to add multiple records in m2m_tags widget.
Before this commit when user want to add multiple record at that time
they only allow to add one record at a time.

After this commit user can add multiple record from search more wizard.

Added function _getSearchCreatePopupOptions so that it can be overridden
in FieldMany2ManyTags, options for FieldMany2ManyTags will differ, like
FieldMany2ManyTags SearchCreateDailog should have multi record selection,
Many2ManyTags' SelectCreateDialog should display record other than selected

This commit is related to task id: 1945912

closes odoo/odoo#32453

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-22 13:43:44 +00:00
William Henrotin 199bb65b42 [IMP] mrp: rename final_lot_id
Commit 5ef46664a2 share code between produce
wizard and workorder. Field final_lot_id is now commonly used but not very
well named. This commit rename it into finished_lot_id as it represent the
lot number of the finished product.

Task : 1998064

closes odoo/odoo#32761

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-27 07:45:07 +00:00
rhe f17beeef4b [FIX] sale: Adapt sales count on product
When the sales count on the product form doesn't take into account the
sales done in point of sale.

So we've extend the list of done states to take the ones from point of
sale.

TASK-ID: 1985493

closes odoo/odoo#33422

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-24 09:04:46 +00:00
Xavier Morel 0e1a471144 [IMP] web: warn admin on login if their password is "admin"
* We want to limit the obtrusiveness of the mechanism & at the same
time show the warning immediately, so send the warning through a
private channel between the superuser and the admin user rather than
the regular mail.thread's message_post which would likely send the
warning though email.
* Ignore issue when the request comes from a "private" IP (likely a
local dev box where it doesn't matter).
* Only check for "admin" on the admin user: passwords created manually
are already length-checked (required) and strength-checked (visual
indicator).

Task 31122

Supersedes #22428

closes odoo/odoo#33254

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-13 12:08:53 +00:00
Robot Odoo 079fcd6232 [MERGE][IMP] project, *_timesheet: link analytic account and project
Impacted modules: hr_timesheet, project, sale_timesheet and sale_timesheet_purchase

Currently, the link between the Analytic Account and the Project is non existant if
Timesheets is not installed, and we track any cost linked to the AA set on the Project,
but we only track the revenues linked to Timesheets.

The purpose of this merge is to allow simple project (no timesheet installed or
activated) to track their costs and revenues. This is done through the analytic account; indeed, all
purchase order, sales order, invoices and vendor bills can generate analytic entries. It could
then be interessting for user to see the costs and revenues for a project.
We decided to redirect user from the project dashboard to the "costs/revenues" action of the analytic
account itself, or (if timesheet is allowed on project) to the overview.
This commit also integrates purchase orders on the project overview.

Implementation:
This PR aims to improve the link between Project and Analytic Accounting, by several actions:
* Move all the analytic account business to project
* Add an Other Revenues field in Project Overview,  which represent the positive analytic entries
from the AA set on the Project AND that are not linked
to a Timesheet
* Add two smart buttons on Project Overview to Purchase Orders and Vendor Bill of the project's AA
* Add the results (Sales Orders and Timesheets) linked to the project's AA in the respective smart
buttons of Project Overview
* Add a "Profitability" link on the Kanban card of the Project bringing to the Costs & Revenues of
the AA set on the Project to allow profitability tracking when there are no Timesheets.

To do so, it was required to move back the analytic dependency from hr_timesheet to project, like
before 3dd3e26483 (but without the inheritS).

Limitation:
This will only make sense for project having a "one-to-one" relation with analytic account. If 2 projects
are linked to the same AA, we have no way to deduce from which project the cost entry is linked.

Task-1975022

closes odoo/odoo#33237

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-24 14:15:52 +02:00
Lucas Perais (lpe) af86bc7288 [IMP] point_of_sale: restrict print sale datails
Have two pos config opened, with at least one connected to a POS box with a printer
Do some sales on both
Click on the printer icon in the pos UI to print today's sales

Before this commit, the ticket that was printed contained sales for
both point of sales

After this commit, it only contains sales of the point of sale from which
the print request has been sent

OPW 1958885

Before this commmit everyone could print the sale datails for all day
for the current PoS Config from the UI.

After this commit cashiers can only print the current session,
disregarding the date.

TASK-ID: 1978713

closes odoo/odoo#33036

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-24 09:51:01 +00:00
Geoffroy Larue 3ab9b5192c [IMP] project, sale_timesheet: usability
Fix a tiny typo in project and rename two fields in Project Overview
to improve usability.

Task-1975022
2019-05-24 09:46:46 +00:00
Geoffroy Larue 5837b6c320 [IMP] project, hr_timesheet: profitability link
In order to improve the tracking of costs and revenues on projects,
this commit adds a "Profitability" link on the Kanban card of the
Project which appears for analytic accounting users when the
"Timesheets" / "Overview" link does not appear.

This link brings to the  tree view of the lines from the analytic
account linked to the project.

Task-1975022
2019-05-24 09:46:46 +00:00
Geoffroy Larue f3999314af [ADD] sale_timesheet_purchase: bridge module
Add two smart buttons in project overview : purchase orders and vendor
bills, linking purchases and bills pointing to the project's analytic
account.

Task-1975022
2019-05-24 09:46:46 +00:00
jem-odoo db92ca5fce [IMP] project,hr_timesheet: move analytic account business to project
When we remove the inheritS between project and analytic account, we move the
analytic_accound_id field in timesheet because it was the only use case for
a project to be linked to an analytic account.
This commit prepares new cost origin for a project (other that timesheet).
Register costs on project will required an analytic account to keep analytic
costs tracking. The analytic account management is now moved to project, like
it was in 10.0, but without the inheritS.

Task-1911581
2019-05-24 09:20:06 +00:00
Geoffroy Larue 299a61ecbc [IMP] hr_timesheet: remove useless field
Remove the field company_uom_id as it is not used anymore.

Task-1975022
2019-05-24 09:20:05 +00:00
Vincent Schippefilt 9d9a866cc3 [REF] web: remove hardcoding of maxage for load_menu
use CONTENT_MAXAGE to define the max-age instead

closes odoo/odoo#33634

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-24 07:09:57 +00:00
Pierre Paridans 0771f008ff [IMP] web: searchpanel's categories should unfold when clicked
In the SearchPanel there was a separation between selecting and
unfolding a category with children.

With this commit, when the user click to select a parent category the
children are also folded/unfolded.

This reduce the number of actions needed to reach a sub-category.

Task ID: 1917277

closes odoo/odoo#32660

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-23 13:12:58 +00:00
Pierre Paridans 4d1cce97a9 [IMP] lunch,web: don't disable SearchPanel on mobile
SearchPanel widget in kanban views has been introduced in commit
https://github.com/odoo/odoo/pull/30517/commits/25c9355c02485e85914430188f3281246fc54cda.
But this feature was disabled for mobile.

This commit removes unneeded differentiation between desktop and mobile
for the SearchPanel.

It also adapt related tests to reflect this change.

Task ID: 1917277
2019-05-23 13:12:58 +00:00
Pierre Paridans 627fd77248 [FIX] mail: DocumentViewer's buttons alignment on mobile
The action buttons in the document viewer were badly aligned on small
screens, and specifically when moving to multiple lines to fit on the
viewport.

This commit adjusts the positionning and margins between those buttons
to stay consistent on every screens size (smallest to biggest).

Task ID: 1917277
2019-05-23 13:12:58 +00:00
Pierre Paridans 71a2d7c06a [REF] web: don't destroy twice a widget's children
Widget class indirectly inherits from ParentedMixin (through
PropertiesMixin).

The Widget's children are destroyed in both the ParentedMixin and the
Widget's own destroy() method.

This commit prevents from trying to destroy already destroyed children
and specifically from looping again on those children (resulting into a
minor performance improvement).

closes odoo/odoo#32174

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-23 15:41:30 +00:00
Romeo Fragomeli e5c65b22ab [FIX] hr_holidays: don't use "object shorthand" (es6)
This commit fix non-compliant JS code syntax.

Currently Odoo JavaScript code base supports ECMAScript <= 5 only

Using ECMAScript 6 (2015) feature break compatibility with
Internet Explorer and Android KitKat (4.4)

Ref: https://eslint.org/docs/rules/object-shorthand

closes odoo/odoo#33605

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-23 13:02:08 +00:00
Andrius Laukavičius 62046a1d26 [FIX] base: update res.lang lt_LT date format
Lithuania uses date format `yyyy-mm-dd`, not `yyyy.mm.dd`.

LST ISO 8601:1997 (obsolete) LST ISO 8601:2006 (current)

https://en.wikipedia.org/wiki/Date_format_by_country
https://en.wikipedia.org/wiki/ISO_8601

closes odoo/odoo#33580

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-22 14:59:45 +00:00
Christophe Monniez 3f884fbe3f [IMP] loading: tests are allowed without demo data
As most of the tests are using demo data, a check is performed to verify
that they are loaded.

A best practice is to write tests that does not depend on demo data but
with this check, it's not possible to launch them without demo data.

With this commit, the check is removed, allowing to launch test even
without demo data loaded.

closes odoo/odoo#33531

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-05-22 06:59:39 +00:00
Prakash Prajapati d73f90f055 [REM] project: remove notes field from project.task model.
The notes field is not used anywhere so removed it.

task-1986384

Closes #33514

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-21 07:30:38 +00:00
Parth Choksi 00997c93a9 [FIX] web: pdf file not previewed
The pdf_viewer widget fails to load file and hence shows error.
This is due to the wrong controller called(wrong URI passed),
while loading a file using pdfjs.

For files other than images, /web/content controller should
be called since since odoo/odoo#31811.

This is similar to the enterprise fix 793c76298a2b301a2

task-1932190

closes odoo/odoo#33354

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-22 13:07:21 +00:00
Raphael Collet 047bc013e0 [FIX] sale: browsing [False] is not a good idea
closes odoo/odoo#32930

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-23 05:48:03 +00:00
Raphael Collet 1c1d0b3893 [FIX] mrp: onchange method with one2many field 2019-05-23 05:48:03 +00:00
Raphael Collet 4bc2b14248 [FIX] mail: computed fields with new records only 2019-05-23 05:48:03 +00:00
Raphael Collet d491dedb9a [FIX] account: deal with new records 2019-05-23 05:47:11 +00:00
Raphael Collet 76ee0afb29 [REF] api: remove deprecated env.in_onchange 2019-05-23 05:47:11 +00:00
Raphael Collet e70abb63d4 [REF] addons: avoid using NewId 2019-05-23 05:47:11 +00:00
Raphael Collet d0bb596f1d [IMP] fields: x2many fields of new records are new records
The value of an x2many field on a new record are new records, possibly
related to a real record, called its "origin".
2019-05-23 05:47:11 +00:00
Goaman 60be9f2c09 [IMP] account: add test for writeoff in the reconciliation widget
Test that there is no conversion of debit/credit when creating a
writeoff with the method process_move_lines of the model
'account.reconciliation.widget'.

See 7b636f3342

closes odoo/odoo#33588

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-05-23 09:39:13 +00:00
Robot OdooandJulien Mougenot 99821fdcf8 [IMP] web: Use browser cache to improve startup time of webclient
Today, some resources that varies very infrequentely are requested on
every page load: the menus, the translations and the qweb templates

After this commit, there will be 2 improvements that will make the
loading of the webclient faster:
1. cache almost static resources forever
when loading the /web/ page, the user session will
contain the cache key to be used to fetch these resources. As the content
of the resource itself it used to compute the hash, the request can be
put in cache by the browser forever (for a year).

The up side is that in general less requests are needed to load the web client
The down side is that the load time and number of queries of /web page
has increased to include what is needed to compute the hash of translations,
menus and qweb templates

2. trigger the loading of the menus before the download (and startup) of
the JS and CSS assets:
The menus contains the definition of the action, wich is the first thing
needed to load a page in odoo. Starting the loading of the menu much
earlier means that when they are not yet in the browser cache (see point 1),
the browser does not need to wait for the entire assets to be downloaded
and parsed before starting the 'load_menu' request, but instead start it
immediately and hold onto a promise to be used instead of the rpc 'load_menu'.

Because the request is done before anything else is loaded, including
JQuery, it is made in vanilla JS.

task-id: 1943338

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#33291

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>

Co-authored-by: Julien Mougenot <jum@odoo.com>
2019-05-22 17:02:28 +02:00