Commit Graph
124195 Commits
Author SHA1 Message Date
Lucas Perais (lpe) 40b4584b00 [FIX] *: boolean in domains should have value True or False
Because the JS cannot handle 1 or 0 being equivalent to true or false, the views should comply
Issues specifically arise in the kanban view when, instead of reloading every record with python,
the JS actually computes which record should be displayed by reinterpreting the domain

From a user point of view, on a fresh db with CRM installed, go to the app kanban view
Click on the contextual menu of the CRM kanban label, click uninstall

The modal opens, but click cancel. The kanban label of the kanban view has disappeared

This is due to commit 33ba61bfdb, which prevents reloading all the view
for performance purposes

This commit prevents the label from disappearing

OPW 1903534

closes odoo/odoo#28484
2018-11-13 10:09:03 +00:00
Sebastien LANGE 0a6a1c149d [FIX] stock: readonly on show details operations
commit c6b0d36622 introduced a wrong
domain. The readonly should be added if the show_operations is false
OR state is done AND is_locked is true.

close #28595
2018-11-13 09:00:42 +00:00
Duc Dao 46b296dc4f [FIX] Update required version of num2words to have more languages
closes odoo/odoo#25982
2018-11-13 02:22:39 +00:00
Lucas Perais (lpe) 3a0f9da0eb [FIX] web: load SubViews without previous' view _view_ref context keys
On a form view (of model A), define a many2one (model B) with a [form|tree]_view_ref context key
In that view, have a x2m field (model C) with a different [form|tree]_view_ref context key

Before this commit, the second load_views (i.e. on the model C) crashed because
the wrong context key was sent to the server, which returned the view to which the _view_ref points
i.e. the view of the model B

After this commit, we clean the context of subviews loading, because those keys are only useful for the python
and one shot. Hence, there is no crash

OPW 1903780

closes odoo/odoo#28260
2018-11-13 09:02:24 +00:00
Humberto Arocha 09fde26854 [FIX] account: Calling oldname cash_basis_account instead of new field
closes odoo/odoo#28594
2018-11-12 20:16:10 +00:00
Robot Odoo 5f8d3c61be [MERGE][FIX] mail: preview not linked to any document
This fixes two issues relating to previews in the systray messaging menu
that are not linked to any document:

1. Clicking on such preview now redirects to Inbox

There was a traceback, because it was attempting to open a document.

2. Marking a read one of those previews now only marks this preview

It was marking all previews not linked to a document as read.

Task-ID 1891350
Task-ID 1907159

closes odoo/odoo#28462
2018-11-14 08:13:29 +01:00
Goffin Simon 8efa9e5fe9 [FIX] website_sale: Impossible to modify text in "shipping" area on e-commerce
Inspired from this commit: 90219a7e0a

It's not possible to modify the shipping area description on a product in
the e-commorce.

opw:1908308

closes odoo/odoo#28624
2018-11-13 12:43:46 +00:00
Vincent Schippefilt fe7fd9c0d7 [FIX] web: fix qweb test that fails on windows
When the qunit tests runs they are expecting the new line to be the character 10,
but in windows the new line is 10+13.
The test has been updated to ignore the character 13.

closes odoo/odoo#28599
2018-11-13 08:14:07 +00:00
Antoine Prieels (ANP) 8000638ade [IMP] iap: Add full div to Web Settings Dashboard
The IAP link in Web Settings Dashboard used to be a simple text link in DashboardApps, now we've created a full div

closes odoo/odoo#28566
2018-11-12 16:15:49 +00:00
Robot Odoo ddf2243d6e [IMP] stock, mrp, repair: locations per company
Each company should have their own inventory loss, production, scrap and transit locations in order to apply specific accounting configurations.

TASK 1882269

closes odoo/odoo#28508
2018-11-15 11:21:12 +01:00
qmo-odoo 7f0ca92bf6 [IMP] crm,hr,event: Allows linking in pivot views
Allows users to click on pivot cells and be redirected
to the corresponding list view

Task: #1895410
Closes: #28095
2018-11-14 13:51:44 +00:00
Gert Pellin 817441b091 [IMP] point_of_sale: remove barcode scanner bool
Remove the barcode_scanner Boolean and always load the default nomenclature if
no other is defined in pos.config.

Because barcode scanners are seen as keyboard by the computer, they always work
in the point of sale. Because of this some clients begin using them without
activating the nomenclature in pos.config. Barcodes get only recognized if
search-fields are selected this way, resulting in clients complaining about the
workflow.

Enabling the default Nomenclature by default will have almost no effect on the
loading time of the point of sale and has no influence on the work flow if not
using a scanner.

closes odoo/odoo#28537
2018-11-14 15:57:29 +00:00
Arnold Moyaux b6ba6038ad [IMP] stock: archive warehouse
Archiving a warehouse didn't archive its related locations, routes and
rules.

So we now archive the related objects and add some constraints to avoid
having an inconsistent state in stock with archived warehouse.

TASK-ID: 30659

closes odoo/odoo#26555
2018-11-14 12:23:33 +00:00
eco-odoo 116d45633b [ADD] account_analytic_default_hr_expense: default analytic account in hr.expense
When a product is selected for an expense, an analytic account (and analytic tags) can now be automatically selected based on the settings.

closes odoo/odoo#28673
2018-11-14 12:39:29 +00:00
Pierre Masereel b046f3ff6d [IMP] stock: transit location for each company
We have refactored the way transit locations are created to work as the
other company specific locations.

TASK-ID: 1882269
2018-11-14 10:52:03 +00:00
Pierre Masereel 46c2ac2fc9 [IMP] stock: scrap location for each company
Each company should have its own scrap location to allow specific
account on it.

TASK-ID: 1882269
2018-11-14 10:52:03 +00:00
Pierre Masereel ee1ea10c8c [IMP] stock, mrp, repair: production location for each company
Each company should have its own production location to allow specific
account on it.

TASK-ID: 1882269
2018-11-14 10:52:03 +00:00
Pierre Masereel 5df621f665 [REF] stock: missing warehouse creation
We move the code from the 'post_init_hook' into a function tag, to be
consistent with the way we populate missing data when stock module is
installed.

TASK-ID: 1882269
2018-11-14 10:52:03 +00:00
Pierre Masereel 6b95bb6a61 [IMP] stock: inventory loss location for each company
Each company should have its own inventory location to allow specific
account on it.

TASK-ID: 1882269
2018-11-14 10:52:03 +00:00
qdp-odoo 3c36745672 [IMP] l10n_ch: adds a res.config.setting field for config parameter
commit 68dafa0620 introduced a solution to hide the Swiss QR code by default, by conditionning its display on the existence of an ir.config.parameter that one could manually add.
This commits creates the ir.config.parameter and relates it with a field in the accounting settings for more convenience for when we'd need to enable it

closes odoo/odoo#28654
2018-11-14 08:38:42 +00:00
Aaron Bohy ce611ae439 [FIX] web: wrong tests
This commit fixes two tests that became meaningless after tweaks
in production code:

 - form_tests: use two char fields, as integer fields can't be
   unset since rev. c62a4edcb
 - pivot_tests: the button is disabled since rev. 4f4f111, but
   simulating a click with jQuery bypasses the disabled attribute

This commit also removes unecessary overrides of mockRPC. Those
overrides existed  because the attachments part of the sidebar
used to make a search_read RPC, but this has been removed at rev.
1dbb555.

closes odoo/odoo#28651
2018-11-13 20:00:17 +00:00
David Arnold d1fd939bdb [IMP] hr_payroll: Manage duplicated 'code' on input/worked_days lines
Purpose
=======

Before this commit, inputs (workdays or inputs) could not manage two lines having
the same code (Example: two holidays of the same type in the payslip period).

The result was a wrong computation as only one of the 2 lines was taken into account.
Without even warning the user.

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

Put recordsets on the local dictionaries, where previously only a browse record was set.

This requires a modification on the salary rules to make them work (with multiple lines,
otherwise it is still ok).

Example: <field name="quantity">worked_days.WORK100 and worked_days.WORK100.number_of_days</field>
Should become <field name="quantity">worked_days.WORK100 and sum(worked_days.WORK100.mapped('number_of_days'))</field>

closes odoo/odoo#26386
2018-11-13 17:05:00 +00:00
Gustavo Valverde b8c5637e7e [FIX] hr_payroll: Compute all payslips when closing batch
Closing a Payslip Batch has to ensure that all payslips inside of it
are well calculated and closed. Otherwise some helpers (as `sum`) won't
work correctly because there are open payslips from the last month batch.

This action ensures that if there's a Payslip Batch with 200+ employees,
closing the Batch will complete the whole process including the accounting.

closes odoo/odoo#25755
2018-11-13 17:33:23 +00:00
Yannick Tivisseandsimosuu bf03b4ba93 [IMP] hr_payroll: Avoid random payslip line order on display
Purpose
=======

If the lines have the same sequence, then the display could be random for these lines.

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

Order on sequence, then code.

Co-authored-by: simosuu <simo.suurla@simonit.fi>

closes odoo/odoo#27124
2018-11-13 16:30:52 +00:00
Xavier Morel 79728da9d3 [IMP] core: setup o2m edition views recursively in server-side form
Before this commit, the SSF would only set up edition views on o2ms at
the toplevel. This usually isn't an issue, but in some cases involing
onchanges on o2ms which themselves contain o2m, odd results could
happen as the second level would try to list the sub-o2m's fields in
order to cleanup its (possible absence of) values (cf the `subfields`
local variable in _cleanup_onchange), which would blow up due to the
missing `"edition"` key.

Fix by recursively processing o2ms and setting up their edition view.

Also fix the fields iteration in fvg processing: don't recurse inside
fields. There still is no support for embedded views (I think?) but we
should not try to treat subview fields as view fields, that could have
very bad results.

closes odoo/odoo#28645
2018-11-13 16:15:07 +00:00
RomainLibert 1e4b3d093e [IMP] hr_holidays: compute number_of_days on create and write
closes odoo/odoo#28610
2018-11-13 10:04:41 +00:00
Yenthe V.G aff35db94b [IMP] hr_contract: add sheet on contact type form
It's better to display form views in sheets.

closes odoo/odoo#27333
2018-11-13 11:09:40 +00:00
Christophe Monniez 2ff49c5fcb [FIX] packaging: make Debian package depends on qrcode and vobject
As stated in issue #27752, some Debian packages are only recommended.
As a consequence, these packages are not installed on the Official
Docker image. In that case, if the user wants to install an Odoo module
that needs one of these package, the Docker container has to be
modified.

python3-qrcode and python3-vobject are now part of the latest Debian
stable (stretch) and the latest Ubuntu LTS (Bionic Beaver).
Also, they are pure python, and very small.

Thus, the Debian package can depends on them.

co-author: @sbidoul
Fixes #27752
Closes #28588
Closes #28371
Closes #28372
2018-11-13 09:00:30 +00:00
Lucas Perais (lpe) 293f9d27ad [WIP] another testable solution 2018-11-12 16:12:29 +00:00
Lucas Perais (lpe) bd83517fec [FIXUP] testable solution 2018-11-12 15:29:07 +00:00
Lucas Perais (lpe) c346428397 [FIX] web: search input date in another timezone
Put the browser in timezone Sao Paulo (Or like West of UTC)

Trigger the autocomplete (and the subsequent search) on a date field
by writing a date (in the locale format) in the search view

Before this commit, the domain sent to the server contained the date as the day
**before** the one asked for in the input

This is because, the string input is parsed and gives:
input = 12/02/2018
When creating the moment object:
> since there is no explicit time, moment will interpret it as 12am (midnight)
> We force moment to consider the string as being UTC (function: moment.utc())
> the moment contains, as output the time ** 2018-02-12T00:00:00 UTC **

When getting the facet value for making the domain
> we call toDate on the moment object, which, according to the browser is UTC and will
be converted to the locale timezone before formatting
> And the domain will use the date 2018-02-11T22:00:00 Brazil/SaoPaulo
which gives the day before the one we asked for

After this commit, this issue doesn't arise, because we use the string representation of
the moment object in search_inputs (i.e 2018-02-12T00:00:00 UTC), to create a new one
*BUT* we create it with a date format that excludes the time from being interpreted.
Also, the resulting moment object in this case is not flagged as UTC anymore

OPW 1903224
2018-11-12 14:07:36 +00:00
mreficent 8ca728bb93 [FIX] website: redirect_type oversight
In https://github.com/odoo/odoo/commit/2924b77b6f52e7ee9f4a6f2fb0cc79211be42292 type field was renamed to redirect_type
One was missing

closes odoo/odoo#28570
2018-11-12 11:28:21 +00:00
Vincent Schippefilt 98936f79a1 [REF] web: split relational fields tests into multiple files
The file relation_fields_tests.js was a huge 12K lines files for which some editors have a
hard time managing.

We have split it in 4 files to be more managable and removed remove unused data
and import.

closes odoo/odoo#28561
2018-11-12 12:36:53 +00:00
Fabrice Henrion d3567a8890 [IMP] sale: rephrase label
Expiration is clearer than validity

closes odoo/odoo#28517
2018-11-12 08:14:40 +00:00
Christophe Simonis 99d0e1b80e [MERGE] forward port branch 12.0 up to a403155dec 2018-11-12 13:06:48 +01:00
Nicolas Martinelli 1a0f5a50af [FIX] account: domain on reconciliation model
The `context.company_ids` variable seems mostly empty in the case of the
Manual Reconciliation widget. Therefore, we fetch the current company of
the user in the session.

Complement of e5c8071484

Fixes #28270
opw-1904475

closes odoo/odoo#28541
2018-11-09 16:14:33 +00:00
Lucas Perais (lpe) c8133d7133 [FIX] calendar: activity deadline from event date
Be in the timezone Australia/Brisbane

On an object, create a Meeting activity

Create the calendar event and set a start date "tomorrow" at 7:00am

Now go back to the object to see the activity

Before this commit, the activity appeared as due "today"

After this commit, it is due "tomorrow"

OPW 1891110

closes odoo/odoo#28576
2018-11-12 12:48:07 +00:00
Nicolas Lempereur bba78c7fe1 [FIX] web_editor: can't unquote on firefox
Firefox when asked to block format (formatting over a block with
blockquote, h1, ...) has a special case for blockquote (it is documented
in https://developer.mozilla.org/docs/Web/API/Document/execCommand at
formatBlock command) and will wrap any element instead of replacing
existing block formatting.

Thus the code not expecting it was not able to remove a blockquote in
firefox once introduced.

opw-1903735
closes #28587
2018-11-12 14:48:20 +00:00
Nicolas Lempereur e0b906d74d [FIX] web_editor: firefox ctrl+a and un/format
When we for example do ctrl+a in firefox, the selection is over the
container and not the content.

This is an issue when we apply a format, since the container could be
removed.

  eg:

  we have selection over `<pre>hello</pre>`, on firefox the selected
  node is `pre`, on chromium it is `TextNode "hello"`.
  if we remove the style, `pre` is deleted so firefox selection is
  broken, whilst chrome has no issue since "hello" still exist.

There was also an issue when the selection was over the blockquote,
there was no error but the style could not be removed.

opw-1903738
opw-1903735
closes #28369
2018-11-12 11:22:43 +00:00
Odoo Translation Bot 8d77288a8c [I18N] Update translation terms from Transifex 2018-11-11 03:16:11 +01:00
Thibault Delavallée 4d53266e23 [IMP] base, mail: better xpath for server actions and add autofocus
Commit linked to task ID 1906924 and PR #28538.
2018-11-09 15:36:59 +00:00
Sainu Abideen 79e8378518 [CLA] update cybrosys signature
Was signed with the wrong name

closes odoo/odoo#28496
2018-11-09 14:57:37 +00:00
Martin Trigaux dd4288092d [ADD] mail: add 💔 emoji
The world ain't all sunshine and rainbows.
~~ Sylvester Stallone

closes odoo/odoo#28529
2018-11-09 12:43:43 +00:00
jem-odoo 352807298f [FIX] hr_presence: propagate options in longpolling
The hr_presence module recently introduced adds
a hook on the bus controller in order to execute
its very important and legally business, but this
hook brings an error as it forgot to propagate the
bus options.
Consequence: the bus_inactivity, responsible of the
bus.presence are not pass to super. So all user
appears offline.

closes odoo/odoo#28531
2018-11-09 13:04:34 +00:00
Nicolas Lempereur 5f066552c3 [FIX] website_form: custom file -> mail attachments
There was a code that on:

- a form that sent a mail
- with a custom file field

would set the file as attachments, but the code was dead because of a
typo in `if` statement order.

opw-1906883
closes #28525
2018-11-09 11:09:32 +00:00
Nicolas Lempereur 726bc301cf [FIX] web_editor: don't prepend http to ${..} link
In mail template a link with reference such as:

  ${object.user_id.signup_url}

are often used.

These are template directives that are replaced when the mail is saved,
so when editing in the editor and they are prefixed by "http://" this
breaks the link which is not wanted.

Now link beginning with `${` are not prefixed anymore to prevent
shooting oneself in the foot.

opw-1906695
closes #28522
2018-11-09 10:45:17 +00:00
David Beguin bf441b984f [IMP] mass_mailing : add blacklist and opt_out demo data
In order to understand more easily the impact of an opt out
or a blacklisted contact on the interface, blacklist and
opt-out demo data are added.

Tests updated to only test mails on contacts created inside
the test environement and not with demo data.

Task ID 1892998
Closes PR #27674
2018-11-09 08:46:35 +00:00
Geoffroy Larue 8e15a23ca6 [IMP] mail: add view icon on all app (activity systray)
Before this commit, you could only access the activity view of the
Contacts app via the activity icon in activity systray menu.

With this commit, all apps in the activity systray menu that support
the activity view now have this icon that redirects to the
corresponding activity view.

Also, the icon in the activity systray menu has been changed in order
to match the icon of the activity view in the view switcher.

Task-ID 1894900

closes odoo/odoo#28066
2018-11-08 23:28:13 +00:00
Christophe Monniez e9e864802f [REV] base: revert rename ir.logging type to logging_type
This reverts commit c42a130a98
and commit fb7ac56d65.

The runbot is using cross db logging and those commit were breaking the
mechanism. As a result, the master builds logs were empty.
If we update the runbot to use logging_type instead, the other versions
builds will be impacted hence this revert.

closes odoo/odoo#28512
2018-11-08 14:31:57 +00:00
Yenthe V.G ecedd77928 [IMP] fleet: add sheet on model brand and tag form views
It's better to use sheet on form views

closes odoo/odoo#27327
2018-11-08 15:31:36 +00:00