Commit Graph
126133 Commits
Author SHA1 Message Date
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
Christophe Simonis 94a9fc9902 [MERGE] forward port branch 11.0 up to e5c8071484 2018-11-08 14:13:52 +01:00
Josse Colpaert 0b586677e2 [FIX] sale_margin: Error in Margin calculation
If cost(purchase_price) was 0, margin calculation was incorrect.
The function _product_margin didn't consider the use case
where the cost of the product was set to 0 on the line.

So before the fix it fallback on standard price instead of considering  a cost of 0.

opw:1890452, 1885587
2018-11-08 13:10:10 +01:00
Toufik Ben Jaa fe518f1fea [FIX] website_sale: performance when creating a cart
- When creating an eCommerce cart using the Public User, the code tries
  to access all the sale orders linked to it.

  Depending on the count of sale orders linked to the partner, the
  loading can take a lot of time.

  To avoid this, we only search for the sale orders of connected users
  and we only retrieve the last one.
2018-11-08 11:16:02 +01:00
Pierre Rousseau 6e457c44dd [FIX] google_calendar: broken documentation link
The previous link did not contain the version. The default version (12.0) was added, which resulted in a 404 error.

opw-1904268
2018-11-08 10:12:28 +01:00
Sylvain Van Hoof 9b16af6a4b [CLA] sign CLA for Okia SPRL
Backport of 12.0 signature that was done at ff83dfbb60ce

Closes #28493
2018-11-08 10:02:44 +01:00
Christophe Monniez 055e1b8324 [REM] packaging: remove useless code
PKG-INFO is generated during the setup phase and is not needed anymore.
Also this file contains outdated informations.

py2exe is not used anymore to build the windows installer.

closes odoo/odoo#28494
2018-11-08 08:50:33 +00:00
Nicolas Lempereur fc70c35195 [FIX] mail: enable composer after message sent
c5dc0b2f39 disabled send button on composer sent.

But this is only needed for chatter composer, other composers directly
send the message and are not refreshed asynchronously.

So for other composer, the send button worked one time but then was
disabled and the only way to sent was ENTER (on basic composer) or
CTRL+ENTER (on extended composer).

With this fix, disabling the button is done only for chatter composer.

11.0 backport of 12.0 #28474

issue found when checking opw-1904029
closes #28506
2018-11-08 13:19:19 +00:00