Commit Graph
117975 Commits
Author SHA1 Message Date
Romain Derie 56ae134bb2 [FIX] website: allow user to create/remove website.menu
Before this commit, an user could not create or remove a website.menu since
there was no list/form view for it. Changing sequence also impossible.
Therefore, it was impossible to create or delete a menu from an event. (you
could just edit the existing one)

Now, user can access in debug mode to the list and form view of website.menu to
manage the menus.

This commit also add a link on the ir.ui.view form view to access it's related
website.page

This closes #21302
2017-12-12 15:27:51 +01:00
Josse Colpaert b0acb42f0b [FIX] stock: avoid infinite or longer than necessary loops
In some cases the MRP scheduler can remain blocked on an infinite loop
consuming a lot of CPU. The reason comes from the loop 'Check done
procurements'

If a new procument is created from another process (such like MTO
orders) during this loop, the process never ends.

The only way to reproduce is in debug mode:
1. Put a breakpoint on line 'Check done procurements'
2. Launch the MRP scheduler manually and stay paused on the breakpoint
3. In parrallel, create and confirm a sale order with a MTO route, this
   will trigger the creation of a new procurement order in state
   'Running'
4. Continue debugging step by step the scheduler and you will notice
   that the loop never ends.

Closes #21565
opw-787651
2017-12-12 15:20:57 +01:00
Simon Lejeune 7a17c15bf0 [REL] saas-11.1 2017-12-12 15:00:59 +01:00
Arnold Moyaux fda755b885 [FIX] mrp: problem with rounding
Basic operation are used instead of using function
from float utility tools.
2017-12-12 14:56:09 +01:00
Arnold Moyaux 81e983443c [FIX] stock: unlink move line don't update move state
Use case to reproduce:
- Go for a delivery order and use show detailed operations mode
- Have something reserved on a picking
- Manually delete the stock.move.line
-> The move state is not adapted to the new state of the stock move lines

It happens because the move state is not computed not
update on the move line unlink method.

This commit use the existing move function in order
to compute the state and add a test.

A part of test_stock_flow_74 is updated. Since procurement
refactoring make a move mto and confirm it will not work
since purchase or mrp are not install (Usererror). Also do an unreserve
on a draft move is not a real use case and should not pass
it in waiting since moves orig are never created.
2017-12-12 14:55:55 +01:00
Christophe Simonis 744c2934b3 [MERGE] forward port branch 10.0 up to 219c93252f 2017-12-12 14:49:29 +01:00
jem-odoo 5bbd1b1790 [MERGE] rating,project: rating as project dependency
Impacted modules: rating_project, project, sale_service_rating,
website_rating_project and rating.

This merge remove some small modules to integrate them
directly into big one; indeed, we wanted to set rating as
dependency of project module.

As consequence, we see:
- rating_project is removed (its features) are included in
project, hidden with a group
- sale_service_rating is absorbed by sale_timesheet
- website_rating_project is moved into project too, so the
rating page does not depends on website anymore

No feature change, simply moving code, and reorganize some ;)
2017-12-12 14:18:13 +01:00
Christophe Simonis 219c93252f [MERGE] forward port branch 9.0 up to 7a24a2f45f 2017-12-12 14:15:15 +01:00
jem-odoo 0f08bafd00 [FIX] project: bad help message in settings 2017-12-12 14:06:29 +01:00
Jérome Maes d7d30f69d7 [REM] website_rating_project: move feature in project
Displaying the rating of project is moved directly
in project module, since it does not depends on website.
User may want to display rating of its support project
even without website.
2017-12-12 14:06:29 +01:00
Jérome Maes 93adbdbb20 [IMP] project: simplify filters for rating
Since rating in on project directly, and task
and issue are merged, we can simplify some domain
and replaced them by default filters.
The search domain will be less complex and the
performance will be better.
2017-12-12 14:06:29 +01:00
Jérome Maes 95698bd408 [REM] rating_project: kill the module and move feature in project
Impacted modules: project, rating_project,
sale_service_rating and website_rating_project.

Removed modules: rating_project and sale_service_rating.

Move code to empty 'rating_project' module, in order
to kill it.
Code is not modified, simply copy/paste at the right
place in 'project' module code.

However, 'enable rating on task' options is convert
into a res.groups that can be activated from the
project settings.
2017-12-12 14:06:29 +01:00
Nicolas Martinelli 7a24a2f45f [FIX] field: avoid overhead of record._set_dirty when setting fields (#21378)
Setting fields as dirty was dramatically slow for huge one2many fields.
2017-12-12 13:36:23 +01:00
Pierre Masereel 96c3001f0e [FIX] delivery: compute package weight
The package weight is computed by summing all move lines related to it,
which is wrong, because if you have a package that is in two pickings,
its weight will two times bigger than the real weight.

To fix this, we will compute the weight based on the quants in the
package, except if we are opening the package from a pickin, it's weight
will be the sum of move lines of the package that are in the current
picking. This allow user to see the weight of a package after a put in
pack when there are not yet any quants in the package
2017-12-12 13:34:06 +01:00
Pierre Masereel b62973e901 [REF] stock: packages and report
- delivery slip: remove mention of packages
- package: fix the report's traceback
- picking: moved the packages references to a table at the bottom of the report
2017-12-12 13:34:06 +01:00
Pierre Masereel 3799043fdb [FIX] stock: move entire package
When an entire package is moved from a location to another and reserved,
we can process all the move_lines of a package in one step.
2017-12-12 13:34:06 +01:00
Nicolas Seinlet eb36f42729 [FIX] stock: complete_name of stock location
Have the following location structure: Loc A -> Loc B -> Loc C
The `complete_name` fields are:
- Loc A
- Loc A/Loc B
- Loc A/Loc B/Loc C

When changing Loc A to Loc D, the `complete_name` are:
- Loc D
- Loc D/Loc B
- Loc A/Loc B/Loc C

Compute `complete_name` of stock location using `complete_name` of
parent instead of parsing the full bunch of ancestors.  This improves
the computation speed, and moreover solves the recursivity problem.

Closes #21585
2017-12-12 13:15:47 +01:00
Nicolas Seinlet 68cb2ade09 [IMP] base_import: defer parent store
Makes possible to choose `defer_parent_store_computation` in UI.

Closes #21320
2017-12-12 12:05:51 +01:00
Goffin Simon 2720eb84ee [FIX] website_portal: Verification of vat number in EU country
We have problems when trying to validate our EU VAT report because some vat number are wrongly encoded in Odoo.
    There are 2 problems:

    1) We use vatnumber library to check the validity of the VAT number entered by the user on website.
       That library removes the following characters '.' and '-' in order to perform the check and
       thus can return True for a number like 123.123.123.13 or -123-3454-34
       And those VAT number are then saved in our database but are rejected by the state
       as VAT number should only contains alphanumeric character
    -> Solution: prevent entering vat number with other characters than alphanumeric for users that are located in EUROPE!

    2) Usually VAT is prefixed by country code, however some people in europe managed to bypass the system
       by prefixing their VAT number with CC instead of their country code, CC is consider valid in odoo
       (it means Country Code) but is not a valid European country code in general, which means that those
       people that should have pay some tax have not. Which is a huge problem.
    -> Solution: prevent the use of CC as country code by the user when entering a vatnumber only if the user country is in EUROPE!

    source: https://en.wikipedia.org/wiki/VAT_identification_number

opw:785443
2017-12-12 11:51:52 +01:00
Pedro M. Baeza d82b360309 [CLA] backport signature for Tecnativa
backport of dc8010c9b to 9.0
Asked in #21496
2017-12-12 11:39:35 +01:00
Martin Trigaux ffbcf69af5 [FIX] product_extended: remove not working price computation
costs_hour field no longer exists
Some modules in a different repository (let say enterprise), may be still using
it but it is not its place here.
For stability reasons, we keep the computation if an external module adds the
missing field anyway

Fixes #16269
Closes #20899
2017-12-12 11:36:58 +01:00
Nicolas Seinlet 98072f1ad0 [IMP] stock: performance on _compute_reserved_availability
Improve performance (* 2.5) on _compute_reserved_availability
`mapped` makes use of orm prefetch, which is inefficient in this use
case when facing high volume.

Closes #21198
2017-12-12 11:17:54 +01:00
Christophe Simonis eff2c77726 [MERGE] forward port branch 10.0 up to 17c9208889 2017-12-12 11:05:29 +01:00
Mahendra barad 945b71cb2b [MOV] (website_)sale_stock: move customer portal directly into sale_stock
Customer portal is not dependent from website anymore. In this commit we
move customer portal code related to sale stock directly in sale stock
instead of website sale stock.
2017-12-12 10:56:13 +01:00
Simon Lejeune b610e2a812 [FIX] purchase: po line and force_save
Two fiels are set readonly according to the status of the purchase
order: product_id and product_uom_id. They become readonly once the
purchase order is confirmed, but according to the options a user is
still able to add purchase order line. Make sure to always send the
required fields to the server.

Fixes #21519
2017-12-12 10:52:54 +01:00
Christophe Monniez 17c9208889 [FIX] base: backport of set mimetype on js and css assets
On MS Windows, the mimetypes module relies on the Windows Registry to
guess mimetypes. As a consequence, when generating assets bundle for
javascript files, the mime type of js files may be wrong. In that
particular case, the Odoo user is facing an empty web page.
This commit enforce 'application/javascript' for js assets when they are
saved as ir_attachment in the database.

This commit is a backport of 77ca51f
2017-12-12 09:42:55 +01:00
Nicolas Lempereur d0d9196da4 [FIX] crm: crm team graph error if stage deleted
When a stage on crm leads is removed, the leads appear in an
"Undefined" column in a kanban view, but this was not handled when
getting the "graph data" (eg. in version 11.0 for sales team graphs
when grouping by stage in CRM > Reporting > Sales Channels).

opw-784455
closes #21507
2017-12-11 16:04:01 +01:00
Pierre Masereel 598f4f7315 [REF] delivery: pacakage weight tooltip 2017-12-11 14:18:44 +01:00
Pierre Masereel 7e89865ea1 [REF] product, stock: packages wording 2017-12-11 14:03:58 +01:00
Denis 'Ledur' Vermylen d0dcd22456 [IMP] hr_holidays: tree views cleaning 2017-12-11 13:49:36 +01:00
Denis 'Ledur' Vermylen b8c95c2e0b [IMP] hr_holidays: menus reordering and cleaning 2017-12-11 13:49:36 +01:00
Richard Mathot 6cc5ebed1a [FIX] hr_holidays: prevent crash when no employee is linked to the user 2017-12-11 13:49:36 +01:00
Denis 'Ledur' Vermylen 1f563b713d [IMP] hr_holidays: leaves allocation per department 2017-12-11 13:49:35 +01:00
Richard Mathot 8106788788 [REM] *: clean unused key 2017-12-11 13:49:35 +01:00
Pierre Masereel 63b4e2342e [REF] stock: change icon of packages statbuttons 2017-12-11 13:40:47 +01:00
Nicolas Martinelli 4732a16dd1 [FIX] account, project, sale: do not display 'View' button
When adding a partner (without any backend or portal access) as a
follower of an invoice, project, task or SO, the mail received contains
a 'View ...' button. When clicked, it redirects to the login page.

In the case of projects and tasks, no `auth_token` exist, so the user
faces an access error in the backend. For the other objects, it
redirects normally to a frontend page.

This feature is not yet complete in v11. So simply hide the button until
this is properly developed in master.

opw-785824
2017-12-11 12:50:20 +01:00
Xavier Morel 9ad6458241 [FIX] website_twitter: finish P3 migration
I clearly missed some bits in 01e3514147
as _get_access_token was still using urllib.Request despite that
import having been removed.

Fix it up by properly converting it to requests.

Fixes #21544
2017-12-11 11:51:17 +01:00
Adrian Torres b7ce07ad2a [FIX] website, mass_mailing: same field defined twice (#21503)
The ORM does not currently, an probably won't support two fields with
the same name in different modules that do not depend on each other.

This is obviously a nasty hack, but it's the best one can do for a
stable branch.

THIS IS WHY WE HAVE DEPENDENCY MODULES, PEOPLE.
2017-12-11 10:43:48 +00:00
jem-odoo b2347b6821 [IMP] sale_stock: expense policy should not impact delivered qty on SOL
When making a SO with a stockable product with an expense policy set,
confirming
the SO will increase the delivered quantity according to the validated
picking. But
when unlocking and modifying the ordered quantity on picking the
delivered quantity
on SO does not change (it is if the product have no expense policy).
So the expense policy influence the flow in a way (update validated
picking) but not
on the the other (confirm SO) to compute SO line delivered quantity.

This commits make the expense policy not relevent when modifying ordered
quantity
on picking.
It also prepare the cleaning to unify API of delivered quantity
computation on SO
line for stock and service.
2017-12-11 11:34:10 +01:00
jem-odoo 537435299b [IMP] analytic,hr_timesheet: force partner from task or project
Since partner is not required on analytic account, nor
on AAL, we may have lines related to different partner (a 'support'
project for instance, with task for different partner, the AAL will
thus also have different partner). This use case is not possible with
the field override in account.
This commit will allow to do cost analysis by partner in the same
analytic account.
2017-12-11 11:34:03 +01:00
jem-odoo 00cdc5095a [IMP] analytic: clean account semantics
When installing account module, some field semantic on AAL
changed. Indeed this module modify some concept for its own
use cases.

Since analytic accounting is only used inside the company,
there is no interess to have the amounts stored in both
currencies. So the fields amount_currency, analytic_amount_currency
and company_currency_id can be removed. Doing that, we remove the
unfair related of account module.
2017-12-11 11:33:49 +01:00
jem-odoo 6272ac13ff [IMP] sale: factorize condition to determine sol on AAL
Simple code 'optimization' to make it clearer and reduce
the number of generated environnement.
2017-12-11 11:33:41 +01:00
jem-odoo 2bf369a172 [IMP] sale: better amount to invoice and invoiced computation
Since quantity to invoice and quantity invoiced
already take into account refund invoices, the
calculation of those amounts can be simplify.
Also, we simply need those on the sale.report,
so removing them from sale.order.line model
will ease performance.
2017-12-11 11:33:31 +01:00
Romain Derie a1c5af2556 [FIX] website_sale_stock: unicode as uom name will throw encode error
Before this commit, if you had an uom with an unicode character as name, it
would throws an UnicodeEncodeError.

Now, since the str() parsing is not needed, removing it fixes the issue

This closes #20325
This closes #21374
2017-12-11 11:24:45 +01:00
Arnold Moyaux 6d02f7d6bf [FIX] purchase: Only use purchase UOM on vendor bill
It was the purpose of this commit fea667a243
However it uses purchase uom in any cases and not
only vendor bill.

This commit correct it by using it only if a purchase
order is linked to the invoice.
2017-12-11 11:24:33 +01:00
Andrea d062e39b1c [REM] hr_timesheet_attendance: remove leftover files
Delete not inmported files. Those are leftover of
removal of hr_timesheet_sheet from
2e251f7599
2017-12-11 11:18:13 +01:00
Géry Debongnie f2a5ebe32f [FIX] web: properly handle setting stored in localstorage 2017-12-11 10:26:57 +01:00
Adrien Dieudonne 35c4057422 [FIX] web: FieldMany2One: don't re-render if dirty
The 'main_flow_tour' noticed an error that we
had already corrected for the input fields.
See here: @a71f2237

In fact the same error can occur in the many2one fields
for the exact same reason.
It's why the 'main_flow_tour' crashed at the following step:
".ui-menu-item > a:contains('the_flow.customer')"
2017-12-11 10:17:15 +01:00
Abdulmomen Kadum عبدالمؤمن كاظم 15026b8a86 [FIX] base: import translation file
Correctly open file

Closes #21064
2017-12-11 10:09:17 +01:00
Abdulmomen Kadum عبدالمؤمن كاظم e521f43256 [CLA] signature for bluemix
Done at #21545
2017-12-11 10:07:15 +01:00