Commit Graph
124195 Commits
Author SHA1 Message Date
William Henrotin 939b022ebf [FIX] mrp: done workorder on multiple reserved move lines
Producing a manufacturing order on components with more than one unit
could leads to multiple move line reserved on this component. Marking the
workorder as done, in that case, will trigger an error saying "Cannot set
the done quantity from this stock move, work directly with the move
lines". Instead of setting the quantity done directly, this commit
uses the magical function _set_quantity_done() that manage the case
of more than one move lines.

OPW-1888780

closes odoo/odoo#27773
2018-10-15 13:20:52 +00:00
Nicolas Martinelli 121fb6f1e7 [FIX] stock: incorrect translation
The translation was not ported in saas-11.3 by Transifex.

opw-1889820
opw-1893527
2018-10-15 15:20:37 +02:00
Arnold Moyaux dd501bbe37 [FIX] stock: replenish infinite loop with production
Usecase to reproduce:
- Create a BoM for a product with route Manufacture
- Use replenish wizard in order to fill your stock

It traceback due to an infinite loop.
It happens because when the production order creates the raw
moves, it does not set a product template. However a default_product
template is in the context and is used as default value. So it creates
a raw move with the component as product.product and the production product
as template. Since they are related it will modify the product_tmpl_id
of the product.product. It result by having a component with the
finished product as template and it will use the same stock rules and
bom again and again.

This commit clean the context before running procurement rules.

opw-1890661
2018-10-15 15:05:56 +02:00
Christophe Simonis 900db95457 [MERGE] forward port branch saas-15 up to f026255f12
closes odoo/odoo#27792
2018-10-15 12:21:50 +00:00
Martin Geubelle 70560d1f11 [IMP] web: add showSearchInput option on ModelFieldSelector
The option `showSearchInput` has been added on the ModelFieldSelector to allow
the user to easily filter the displayed fields. An input is displayed in the
popover title.

The search method is fuzzy for optimal results.

closes odoo/odoo#27788
2018-10-15 11:59:33 +00:00
Yenthe V.G 9e3583fc87 [IMP] survey: remove debug statements
Leftovers from debugging

closes odoo/odoo#27768
2018-10-24 08:29:26 +00:00
Yenthe V.G d4f83da1c3 [IMP] hr_salary: add sheet to form views
Adapt xpath that was no longer working
Add name attribute on some missing groups

closes odoo/odoo#27340
2018-10-24 08:37:51 +00:00
Romain Derie 2876b216d2 [IMP] delivery, stock: reorganize stock.picking form view
This commit will avoid having the company_id and/or website_id field(s) alone
on the top right of the 'extra' tab if the `picking_type_code` is in `incoming`

task-1894793

closes odoo/odoo#28016
2018-10-23 09:17:33 +00:00
Aaron Bohy 03fe95d6af [REF] web: small refactoring pass on some web components
(mainly views and ActionManager)

- add missing docstrings
- fix typos
- correctly order functions and imports
- put functions in correct sections
- stop using 'event' as argument of handlers
- don't call handlers directly
- remove trailing spaces/tabs
- move module created in stable version to its own file
- follow js guidelines in general

closes odoo/odoo#28024
2018-10-23 10:56:12 +00:00
Christophe Monniez 3c59add416 [FIX] survey: fix sent_survey domain
survey.user_input type was renamed to input_type in 35a5db9.
This domain was forgotten and made the click_everywhere test fail.

closes odoo/odoo#28010
2018-10-22 12:53:45 +00:00
Christophe Simonis c9356a1096 [FIX] core: adapt forward-ported code after 4d581e26c2 2018-10-22 19:26:18 +02:00
Christophe Simonis 9dbb7d199c [MERGE] forward port branch 12.0 up to b81c2bce84 2018-10-22 17:57:08 +02:00
Géry Debongnie a8cec47c93 [IMP] assets: remove css files split
Before this commit, our asset bundles had a special behaviour for
bundles of type css: because of an old limitation in IE9, css files had
to be split to make sure they had less than 4095 rules per stylesheets.

Since we no longer support IE9, this code can be removed, which should
slightly simplify the bundle code, and should slightly reduce the number
of requests required to properly load odoo.

closes odoo/odoo#27933
2018-10-19 09:18:28 +00:00
Vincent Schippefilt 2b0642d09e [IMP] web: remove es5 shim
The library es5 shim was usefull for older browsers that do not implement
completely the es5 specifications, like IE9.

As we do not support browsers older than IE11, that fully supports all
the features of es5, the library has become useless.

Removing this library will remove a little bit of noise in the callstack
when debugging.

closes odoo/odoo#27877
2018-10-19 08:49:56 +00:00
Fabrice Henrion 9d7ad0fe54 [FIX] terminology
The last time when a user connected to Odoo is a different concept than the last time when a user authenticated to Odoo. I can authenticate once and connect many times afterwards (cookie/session).

closes odoo/odoo#27963
2018-10-19 08:02:17 +00:00
Robot Odoo b262dc7c1c [MERGE][REF] various: rename columns "type" to be more business oriented
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.

closes odoo/odoo#27722
2018-10-19 14:16:32 +02:00
Robot Odoo 64971170d2 [IMP] hr_*: Improve the search views for department fields
1 Display department on manager list views
==========================================

On the manager list views (Leaves/Allocations to approve), the department
is not displayed. Display it on these list views, but keep it hidden for the
employee views.

2 Allow to search employees on allocations
==========================================

3 Search on department and on children departments
==================================================

Currently when searching on a department (on the employee view for example)
we only retrieve employees from the specific department. It should return
all the employees from the department and also from its children
departments, like for partners or companies.

Adapt all the search view where a department field is used by
specifying a 'child_of' operator.

TaskID: 1892639

closes odoo/odoo#27902
2018-10-19 11:44:40 +02:00
mreficent 46b2fe4db1 [REF] hr_holidays: rename hr.leave.report type to report_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:13:15 +00:00
mreficent 35a5db92c2 [REF] survey: rename survey.user_input type field to input_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:13:12 +00:00
mreficent b70ccc45bd [REF] survey: rename survey.question type field to question_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:13:09 +00:00
mreficent 77e5e8b7ff [REF] base: rename ir.server.object.lines type field to evaluation_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:13:06 +00:00
mreficent fb7ac56d65 [REF] base: rename ir.logging type field to logging_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:13:03 +00:00
mreficent 529c1a2e28 [REF] fetchmail: rename fetchmail.server type field to server_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:13:00 +00:00
mreficent 4f9afa6a64 [REF] calendar: rename calendar.alarm type to alarm_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:12:55 +00:00
lul-odoo b952e1a197 [IMP] hr_holidays: Display department on manager list views
On the manager list views (Leaves/Allocations to approve), the department
is not displayed. Display it on these list views, but keep it hidden for the
employee views.
2018-10-19 08:22:48 +00:00
lul-odoo d7b505f09b [IMP] hr_holidays: Allow to search employees on allocations 2018-10-19 08:22:26 +00:00
lul-odoo a086761848 [IMP] hr_*: Search on department and on children departments
Purpose
=======

Currently when searching on a department (on the employee view for example)
we only retrieve employees from the specific department. It should return
all the employees from the department and also from its children
departments, like for partners or companies.

Specification
=============

Adapt all the search view where a department field is used by
specifying a 'child_of' operator.
2018-10-19 08:16:55 +00:00
lul-odoo 584211b1c9 [IMP] hr_holidays: Update department on upcoming validated leaves
Purpose
=======

Currently if a department is modified on an employee, the department is
modified accordingly on the leave request if it still in 'draft' or
'to submit' states.

This should also be the case for confirmed leaves, if it is still planned
in the future.

Note: A test has been added for this specific use case.

TaskID: 1882544

closes odoo/odoo#27661
2018-10-19 08:04:51 +00:00
Robot Odoo ed322f76a2 [IMP] mail: Return a browse record in _track_subtype instead of xmlid
Purpose
=======

- A manager could want to follow only home working of its own department
- A HR officer could want to follow only sick leaves of all dpts.

We have to improve what people follow and how they follow it in the leaves module

Specifications
==============

Subtype on department
---------------------

In department form view, right now, people can follow approvals

Instead we should have some generic and specific subtypes depending on the leave type

For instance, a HR Officer wants to follow only sick leaves and a manager only home working

Following mechanism
-------------------

Remove first / second approval subtype differences
if a leave type is not linked to a specific subtype, consider only classic
people follow it (employee and assigned HR people / manager)

Link leave type to subtypes, with some by default (i.e. home working, ...), not mandatory

When creating a leave type, link it to the department to be able to
activate the subtype for only one department.

closes odoo/odoo#27620
2018-10-19 11:44:24 +02:00
TWA 398f0eb8e9 [IMP] hr_holidays: Define notifications by leave type
Purpose
=======

- A manager could want to follow only home working of its own department
- A HR officer could want to follow only sick leaves of all dpts.

We have to improve what people follow and how they follow it in the leaves module

Specifications
==============

Subtype on department
---------------------

In department form view, right now, people can follow approvals

Instead we should have some generic and specific subtypes depending on the leave type

For instance, a HR Officer wants to follow only sick leaves and a manager only home working

Following mechanism
-------------------

Remove first / second approval subtype differences
if a leave type is not linked to a specific subtype, consider only classic
people follow it (employee and assigned HR people / manager)

Link leave type to subtypes, with some by default (i.e. home working, ...), not mandatory

When creating a leave type, link it to the department to be able to
activate the subtype for only one department.
2018-10-19 07:52:41 +00:00
TWA e61286ecd4 [IMP] mail: Return a browse record in _track_subtype instead of xmlid
Purpose
=======

It's possible to gain some requests with returning a browse record instead of
an xmlid. It's also cleaner.
2018-10-18 13:07:30 +00:00
Gert Pellin 9e90817530 [FIX] point_of_sale : display discount on ticket
According to the setting set on the pricelist

More the discount_policy field from sale to product to be usable in point of
sale, even without sale installed

Task id: 1853454

closes odoo/odoo#27310
2018-10-18 06:09:03 +00:00
Yenthe V.G 83dee8e449 [IMP] hr: add sheet to employee tags form view
closes odoo/odoo#27332
2018-10-17 12:21:14 +00:00
Yenthe V.G ea4c27233f [IMP] mrp: add missing sheet to Productivity Loss form view
closes odoo/odoo#27329
2018-10-17 13:11:31 +00:00
Martin Trigaux 7e5afbefa7 [IMP] base: remove duplicated entry
Twice in the file

Coutresy of dhamedic, cf odoo/odoo#27826

closes odoo/odoo#27858
2018-10-16 16:01:41 +00:00
Robot Odoo c487334b58 [IMP] stock: backorders created only when needed
Description of the issue/feature this PR addresses:
Creation of backorders only when needed

Current behavior before PR:
- When the option "No Backorder" was selected, a backorder was created then cancelled.

Desired behavior after PR is merged:
- When the option "No Backorder" was selected, no backorders are created.

( Task ID : 46981 )

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

closes odoo/odoo#27624
2018-10-16 13:17:41 +02:00
arbaes 35a27f5151 [IMP] stock: Doctring update and useless kwargs deleted
- The docstring for the method `create_backorder(self)` was updated to a more convenient one.
- The kwargs `backorder_moves` was remove since it was useless.
2018-10-16 10:45:23 +00:00
arbaes 9764f04a3c [IMP] stock: backorder created only when needed
Before this commit, when the user chose to not make a backorder, a backorder was created then immediatly canceled.
This behaviour is now changed as in such a case the backorder is simply not created anymore
2018-10-16 09:14:48 +00:00
arbaes 3747f36802 [IMP] stock: Doctring update and useless kwargs deleted
- The docstring for the method `create_backorder(self)` was updated to a more convenient one.
- The kwargs `backorder_moves` was remove since it was useless.
2018-10-16 09:14:48 +00:00
Géry Debongnie d91f0ce95d [IMP] web: log error when module crashes at loading
Before this commit, if a JS module caused an error while being
evaluated, the error was silently swallowed (and only logged in debug
mode, in the extra information about the state of all modules).

With this commit, we always log the error in the console.  Note that
this only applies to JS execution errors.  If a file has invalid
javascript structure, then a parsing error will happen, even before the
module system has the possibility to do anythin.

closes odoo/odoo#27836
2018-10-16 08:44:29 +00:00
Robot Odoo a19eb47caa [FIX] point_of_sale: fp map 2m taxes // align with account + Tests
Before this commit, it was not possible to map one tax to multiple taxes
in the point of sale, just as it is in the account module.

This commit implements fiscal positions that can map to various taxes
on POS.

Furthermore, id adds test to secure that somewhat implicit feature on which
several localisations seem to depend upon.

A typical use case if one tax is not replaced but complemented by another.

**Description of the issue/feature this PR addresses:**
- Taxes can only be replaced in POS.
- Not complemented by a peer tax.
- Behavior not aligned with backend fp mapping.

**Current behavior before PR:**
- Tax cannot be mapped to several taxes (aka: complemented: "to itself and other") on POS

**Desired behavior after PR is merged:**
- Tax can be mapped (aka: complemented) to various taxes on POS

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

@xoe-labs

closes odoo/odoo#26415
2018-10-16 08:25:45 +02:00
Arnold Moyaux 17b6256955 [FIX] mrp: bom structure in batch
Usecase to reproduce:
- Create a BoM that create more than 1 finished product
- Use a routing
- Open the BoM structure report

The operations time from the routing are multiplied by the quantity show
on the report.

It should not happen since routing's operations are not by unit.
If a user create a BoM that produce 50 finished products then the
operation time is always the same when the user produce between 1-50
units. It then double from 51-100,... (workorder use the same process
for the expected duration).

This commit fix this behavior by using a rounding up on the
quantity asked on the report / BoM product quantity.
It also take care of the workcenter capacity.

opw-1890005
2018-10-15 13:04:49 +02:00
Christophe Simonis f026255f12 [MERGE] forward port branch saas-14 up to 5f3739aebd 2018-10-15 11:40:20 +02:00
Andreas Raster 956b3ce54d [FIX] server: ignore broken symlinks
Previously broken symlinks would cause a FileNotFoundError
exception in the filesystem watcher thread spawned when using the
--dev=reload argument.

This problem appeared when using emacs to edit python files while
they are being watched by an odoo instance for changes. Emacs
creates a broken symlink as lockfile in the same directory as the
python file that it edits.

This commit makes the filesystem watcher silently ignore any
FileNotFoundError that occurs when it tries to open a file.

Fixes  #21214, closes #21215
2018-10-15 11:15:42 +02:00
Andreas Raster d63de90a8a [CLA] Signature for rakete 2018-10-15 11:13:47 +02:00
Christophe Simonis 5f3739aebd [MERGE] forward port branch 10.0 up to 8fb61cd830 2018-10-15 11:03:34 +02:00
Lucas Perais (lpe) 8fb61cd830 [FIX] product_margin: sales and purchase in invoice's currency
Invoice price should be adapted to the invoice currency
Before this commit, it was not.

OPW 1889997

closes #27710
2018-10-15 09:24:20 +02:00
Odoo Translation Bot 156d099e32 [I18N] Update translation terms from Transifex 2018-10-14 06:02:03 +02:00
Laurent Smet 64fcd9748d [FIX] account: fix clause on accounts in reconciliation widget
The reconciliation widget must provide visibility on black lines having an account in
a different bank journal.

Example using Paypal:

Invoice:
Receivable: debit=x, credit=0 matching_number: A
sales     : debit=0, credit=x

Payment transaction:
Paypal    : debit=x, credit=0 matching_number: B
Receivable: debit=0, credit=x matching_number: A

Statement line payment:
Bank      : debit=x, credit=0
Paypal    : debit=0, credit=x matching_number: B
2018-10-12 15:42:00 +02:00
Simone Rubino d704d616f9 [REM] sale_stock: delete unused file
The file stock_config_settings_views.xml is not mentioned in the manifest, and
it is wrong as the model `stock.config.settings` which does not exist anymore

closes odoo/odoo#27540
2018-10-12 13:13:04 +00:00