Commit Graph
115968 Commits
Author SHA1 Message Date
Alexandre Kühn 60bbce2e53 [FIX] mail: nocontent helper discuss (inbox & starred)
Revision on https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417

From the UX/UI changes above, we also changed the style for empty
inbox and starred in Discuss.

There are two issues with the empty boxes message:

    1. The text is not centered at all (one word per line,
       and everything is stuck on the left-side of the screen)
    2. The style is inconsistent with nocontent message on search

In this commit, inbox and starred use the same style as the no_content
message from a search. The style of the nocontent from a search has been
slightly changed to mimick the intended style for inbox and starred:

    - centered text
    - title is in bold 125% font size
    - other text is not in bold, 115% font size.
2018-03-08 09:30:37 +01:00
Christophe Simonis 4aa5ec3fa5 [MERGE] forward port branch 11.0 up to d67b410dfc 2018-03-07 18:46:38 +01:00
Christophe Simonis d67b410dfc [MERGE] forward port branch saas-15 up to cb87388d72 2018-03-07 17:42:02 +01:00
Denis Ledoux 43f0cbcc86 [FIX] hr_holidays: employee onchange when no employee set
When changing the employee to None in an allocation,
this onchange raised an error because it attempted
to set an employee browser record (empty but still)
in a department many2one.

- Create a new leave allocation
- Try to change the field Mode (holiday_type) from "By Employee" to "By Employee Tag"

Fixes #23345
opw-1820069
2018-03-07 15:52:16 +01:00
Alexandre Kühn 3c821d4035 [FIX] mail: no traceback with attach/detach (discuss mobile)
Revision on https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498

From the refactoring above, some snake_case attributes have been
converted into camelCase. That was the case in discuss.js, but
we missed to propagate the changes in discuss_mobile.js.

This commit fixes the traceback that came from the mistake above.
2018-03-07 15:11:01 +01:00
qsm-odoo b7b8634575 [FIX] web: statusbar buttons design when no statusbar status
When there were no status widget in the form view statusbar, the left
buttons appeared without any vertical space around them in a smaller
statusbar.

There also was a 1px mistake that made the buttons appear non-centered.
Now they appear centered in any case and a row of buttons is always
forcing the correct statusbar height.

Closes https://github.com/odoo/odoo/pull/22053
opw-(1)813479
2018-03-07 15:05:17 +01:00
Arnold Moyaux 98547bf0cd [FIX] barcodes: Do not trigger useless onchange server side.
This commit improve perf by not trigger onchange server
side on one2many field if the js could find a candidate.

opw-785425
2018-03-07 14:55:31 +01:00
Nicolas Martinelli cf3ed5e547 [FIX] l10n_be_hr_payroll_fleet: max cars
The field `max_unused_cars` is impossible to read in the configuration
view.

Closes #23412
opw-1819898
2018-03-07 14:50:02 +01:00
Christophe Simonis cb87388d72 [MERGE] forward port branch saas-14 up to b16129d108 2018-03-07 14:28:05 +01:00
Christophe Simonis b16129d108 [MERGE] forward port branch 10.0 up to 69c7d696d8 2018-03-07 14:27:15 +01:00
Pierre Masereel a2d554c0a5 [FIX] stock: fix various bug in picking views
The following bugs in detailed operations have been fixed in this
commit:
- Avoid to edit reserved quantity on move lines. When a picking is set
  in 'UNLOCK' mode you are able to edit the reserved quantity of move
  lines, even if it doesn't really causes problems it create confusion
  on what is the reserved quantity.
- Avoid to edit the product_id on a move if there is a move lines linked
  to it. This will cause inceonsistencies by having move lines with
  product_id different than the related moves.
- Avoid to edit the product_id on a move line if it has a linked move for
  the same reasons as above. We also avoid the edition when picking is
  done to avoid issues with the stock valuation
- Remove call to 'force_assign' method on demo data as this method is
  not used anymore and set some pickings in wierd states
- Adding a move line in the detailed operation view does not create an
  associated move.
- Don't allow editing moves when we are in detailed views and state is
  done, even if picking is unlocked.

TASK-1817931
2018-03-07 13:59:28 +01:00
Arnold Moyaux f95566f08a [FIX] barcode: set quantity with key press
Allow the user to set the quantity with barcode
scanning. This functionality was present in v9 but
didn't work in v11.

The code in order to make it work was already present in
_quantityListener however it makes a check on setQuantityWithKeypress
key on the obejct activeBarcode. Howver the key was never set during the
activeBarcode event.

This commit set the key on the activeBarcode if passed in the event data.
It also allow to trigger a barcode if the user is inside a modal.
2018-03-07 13:20:52 +01:00
Arnold Moyaux 93ae1b1a04 [REF] stock, purchase: scheduler move exception
This functionality comes from v10. In v10 you had an object procurement that could be with a state exception. For example you had a product with routes MTO and buy but no vendor(supplierinfo). In 10.0 it would create all the move except the receipt from supllier and since it can't find a supplier it would pass the procurement in state exception. The scheduler each day checked all the procurements in exception and try to run them again until it can process them(in our case if a user finally set a vendor on the product).

In v11 we removed the procurement and an error is directly raised if the moves's chain couldn't be totally created if the action comes from a user. A next activity is created with the error if the action comes from the scheduler(a reordering for example). No move at all are created if the MTO/RR moves's chain couldn't be completed.

Thus the scheduler should now only be responsible to create moves from RR and to log next activity on product with missing information in order to help the user to correct it. Once the error is corrected, the user can run the scheduler manually or wait the cron responsible for it, it should then create the complete move's chain. the scheduler is not responsible anymore to create picking in broken move's chain since it should not be possible to create them automatically. Also creates picking/RFQ/MO automatically goes against the will of the user since he cancelled the first manually.

In order to help him to remember that he cancelled some documents next activities has been implemented with this purpose.
2018-03-07 13:12:33 +01:00
Adrian Torres 69c7d696d8 [FIX] base: whoopsie
Autovacuum wouldn't be executed at all!! `cr` is not defined.

Fixes commit 8b119e2
2018-03-07 11:44:36 +01:00
Stefan Rijnhart (Opener) 1cc21d7eb6 [FIX] account: use correct model in report definition
`account.report.journal` and `account.report_partnerledger` aren't valid models
2018-03-07 11:29:04 +01:00
Christophe Simonis e52607e4e3 [MERGE] forward port branch 9.0 up to 9cf9938f04 2018-03-07 10:37:45 +01:00
Christophe Monniez 9cf9938f04 [CLA][FIX] fix encoding of a CLA that was in ISO8859-1
In a near future (I hope), runbot will reject CLA that are not UTF-8
encoded.
2018-03-07 10:32:52 +01:00
Nikunj Ladava a44fd6f2df [FIX] web_settings_dashboard: no redirect on social button click
Before this commit, when we click on social tags in the Settings,
it opens a pop-up while redirecting to the home page in the main window.
The redirection is not intended.

This is caused by href="#", which purpose is to show the pointer cursor when
hovering on the links. The issue is that href="#" redirects to the index page
on click, which is the home page.

This commit keeps the href while cancelling the redirection on click in the
main window.
2018-03-07 09:35:15 +01:00
Lucas Perais (lpe) cf5142e059 [FIX] im_livechat: make /history command work for public user
Have the public user (not logged in -- user B) having a live chat with any logged in user (user A)
Having in mind that:
- (A) issues /history in his chatter to see where (B) has gone on the website
- The bus sends a kind of a "pull cookie request" on each clients
- The browser of (B) retrieves the cookie info and calls the relevant route
- That route sends the transient message for (A)

Before this commit:
The command did not work because the user of the route we end up on is the public one
hence, the search for the channel would not yield anything

After this commit:
The command does work as expected

OPW 1818732
closes #23485
2018-03-07 09:12:47 +01:00
RomainLibert 97bdc14bce [FIX] hr_expense: fix the display of state field
On expense lines the state field was present both in the parent view
and in the child view. This was causing the javascript not to render the
widget as intended.

Closes #23496
2018-03-06 16:14:26 +01:00
Aaron Bohy 9ccda20764 [FIX] web: BasicView: prevent crash in tests
A crash occured in several Studio tests that have just been
forwardported to saas-11.2, because of a line that hadn't been
adapted in rev. cb339842 (technically, the previous code was
correct, but it crashed when viewInfo.fields was undefined, which
doesn't happen outside the tests environment).
2018-03-06 15:49:38 +01:00
Alexandre Kühn 72b75028d7 [FIX] mail: tests: correctly destroy with createDiscuss helper
Before this commit, when using createDiscuss and performing
discuss.destroy, the parent widget was not destroyed.

This is an issue, because the mocked environment is attached
to the parent widget of discuss. Any call to this.getSession()
is mocked by the addMockEnvironment, and this mocked behaviour
is removed only when the corresponding widget is destroyed.

This commit overrides discuss.destroy(), so that the parent
widget is also destroyed, so that it removes the side effect on
this.getSession() from the mocked environment.
2018-03-06 15:19:49 +01:00
Dhawal Limbuwala 66acbe30f1 [FIX] web: set cursor pointer on link hovering in nocontent help
While displaying no content help, hovering over link was not displaying cursor
as a pointer type.

This bug has been introduced with the new design on nocontent helpers.
2018-03-06 15:12:26 +01:00
Nicolas Martinelli 8cfb485891 [FIX] im_livechat: empty regex
If `regex_url` is not set, `re.search` crashes.

opw-1805669
2018-03-06 15:02:22 +01:00
Thibault Delavallée a13eacdefb [FIX] hr_expense: do not try to add several times the same follower
Hr_expense add several people as follower of expense reports to ensure
various responsibles are notified. However depending on configuration
same partner could be added several times in an ORM command. This makes
the unicity of partner_id for a given document crash.

This issue has been introduced at ab8f5ec95d when working on task ID 30933.
2018-03-06 14:39:20 +01:00
Christophe Simonis cc86634b81 [MERGE] forward port branch saas-14 up to 5ddb3fdb0e 2018-03-06 14:19:32 +01:00
Christophe Simonis 5ddb3fdb0e [MERGE] forward port branch 10.0 up to d59fe9c58c 2018-03-06 14:18:10 +01:00
Lucas Perais (lpe) d59fe9c58c [FIX] website_sale_delivery: if state_ids is not specified, all states supported
Set up a delivery method that has a country set on it, but no states
(e.g. USA)

When the client is required to fill his address info in and when he chooses USA as the country

Before this commit:
The selection field where the states are selectable is not displayed.

After this commit:
All the states of the country are selectable

The usability choice is to say that if states are not specified on the delivery method
that means all states are supported

OPW 1818591
2018-03-06 13:16:43 +01:00
Nicolas Lempereur d18976d748 [FIX] stock_account: difference yml/py stock_input
The python/xml try to create a default value for
property_stock_account_input_categ_id for all categories, but the yaml
only try for the All category and in 11.0 this is not propagated to
child categories.

This commit make the yaml coherent with account.chart.template
generate_properties and
stock_account.property_stock_account_input_categ_id XML record.

note: second part of 1bf25fc01
2018-03-06 12:34:55 +01:00
Christophe Simonis ac89023155 [MERGE] forward port branch 10.0 up to 5e6bb745e8 2018-03-06 12:28:30 +01:00
Christophe Simonis 5e6bb745e8 [MERGE] forward port branch 9.0 up to 4aea19d9e8 2018-03-06 11:56:50 +01:00
Raphael Collet 42798b9337 [FIX] purchase_requisition: decorator on create 2018-03-06 11:25:11 +01:00
Raphael Collet 24f7911499 [FIX] account: constraint method on recordset 2018-03-06 11:24:50 +01:00
Christophe Simonis 4aea19d9e8 [FIX] sale_crm,crm: handle timezone in dashboard
Complete parent commit by correcting overwritten method.

Also use existing method to retrive date depending on tz in context.
2018-03-06 11:23:46 +01:00
Raphael Collet 36d6910269 [FIX] survey: constraint method on recordset 2018-03-06 11:23:29 +01:00
dip-odoo 038ca02dd6 [FIX] stock_landed_costs: filter out internal pickings
Applying a landed cost on an internal picking is not supported.

closes #22280
task 58991
2018-03-06 11:11:27 +01:00
Nicolas Lempereur 1bf25fc018 [FIX] stock_account: no creating 2 def ir.property
property_stock_account_input_categ_id,
property_stock_account_output_categ_id,
property_stock_valuation_account_id ir.property default values on
product.category could be duplicated eg. if l10n_generic_coa was
installed before stock_account.

This did not happen in enterprise but happened in enterprise breaking
the test added in odoo/odoo@6bcf9ac2e.
2018-03-06 10:25:24 +01:00
Nicolas Martinelli 037cfc9f67 [FIX] delivery: products not shared
- Define 2 companies A and B. Delivery methods are linked to products in
  company A
- Deactivate 'Share product to all companies'
- Create a user B in Company B only
- As user B, create a SO and open the drop-down list for delivery
  methods

An access error is raised.

Delivery methods should follow the same record rules than the products
they are linked to.

opw-1815490
2018-03-06 10:02:44 +01:00
Odoo Translation Bot 38ae172c3b [I18N] Update translation terms from Transifex 2018-03-06 09:33:49 +01:00
Christophe Matthieu 108d22ecdf [FIX] website_form: public user can send attachment
Issue:
An additional information page is part of our shop process to allow
additional information to be submitted. If this form is left blank,
then selecting the next button allows the process to continue.
However, if data is added to the form the form freezes and the process
will not continue when 'next' is selected.

Why:
Public user can not read the field 'model' of 'ir.model' (to save the
attachments)

opw-1818592
2018-03-06 09:26:34 +01:00
Aaron Bohy 4f084a2fe1 [FIX] web: ActionManager: F5 on form view in mobile
This rev. fixes two issues with the loading (e.g. after an F5) of
form views in mobile.

First, the form view being not a mobile-friendly view, it opened
the kanban view instead (if there were one defined in the action),
whether it should have kept the form view as they don't diplay the
same things (one is multiRecord, the other isn't).

Second, after fixing the first issue, the main (multiRecord) view
which was lazyloaded when loading a form view wasn't
mobile-friendly so if the user clicked on the breadcrumbs to go
back, he landed on a list view (if the list view was the first view
of the action), whether he should be on a kanban view, which is
mobile-friendly.
2018-03-06 09:13:02 +01:00
Aaron Bohy cdb01d52ea [FIX] web: create favorite filters in dialogs
This is a manual forwardport of rev. b466b3bc60.

Consider the following scenario: open in edit mode a form view
containing a many2many field displayed with widget many2many_tags,
on the many2many field dropdown, click on 'Search More' (it opens
a dialog), and in the dialog, try to save the current search in
the searchview's favorite menu.

Before this rev., it crashed because it tried to retrieve the
action's context (to add to the saved filter), whereas there is no
action in this case.

Actually, the action's context should never been used in this case.
What must be used is the controller's context (this mainly makes
sense for Pivot and Graph views).

Fixes #23293
2018-03-06 09:12:21 +01:00
Aaron Bohy 16a27c94e0 [FIX] web: create favorite filters in dialogs
This is a manual forwardport of rev. b466b3bc.

Consider the following scenario: open in edit mode a form view
containing a many2many field displayed with widget many2many_tags,
on the many2many field dropdown, click on 'Search More' (it opens
a dialog), and in the dialog, try to save the current search in
the searchview's favorite menu.

Before this rev., it tried to retrieve the context of the active
controller in the closest instance of a ViewManager-like widget
in the SearchView's ancestors.

First, it is wrong as in the given scenario, the requested context
is actually the one of the list controller in the dialog, not the
one of the form controller in the background.

Second, it produces a crash in Studio, when trying to save filters
in the dialog opened by clicking on 'Search More' on the groups
many2many field in the sidebar.

This part of the code can't be tested in this version, but tests
will be added in master.

Fixes #23293
2018-03-06 09:11:11 +01:00
Aaron Bohy b466b3bc60 [FIX] web: create favorite filters in dialogs
Consider the following scenario: open in edit mode a form view
containing a many2many field displayed with widget many2many_tags,
on the many2many field dropdown, click on 'Search More' (it opens
a dialog), and in the dialog, try to save the current search in
the searchview's favorite menu.

Before this rev., it tried to retrieve the context of the active
view in the closest instance of a ViewManager-like widget in the
SearchView's ancestors.

First, it is wrong as in the given scenario, the requested context
is actually the one of the list controller in the dialog, not the
one of the form controller in the background.

Second, it produces a crash in Studio, when trying to save filters
in the dialog opened by clicking on 'Search More' on the groups
many2many field in the sidebar.

This part of the code can't be tested in this version, but tests
will be added in master.

Fixes #23293
2018-03-06 09:06:45 +01:00
Lucas Perais (lpe) 31ad2aa31e [FIX] crm: avoid timezone date change to mess with dashboard stats
Have your OS be in Vancouver with time = 15:59:00
We are on day X
Have a next activity on a lead, scheduled for today
At 15:59:00 the next activity is not overdue

Before this commit:
Past 16:00:00 the next activity becomes overdue
This is because 16:00:00 is 00:00:00 in UTC (+8 hours)
And the next activity is scheduled for day X
But in UTC, we just passed at day X+1
Hence, the next activity being overdue

After this commit:
The next activity is not overdue, since we are actually on day X

OPW 1815323
2018-03-06 08:58:06 +01:00
Nicolas Lempereur bc66da2dfa [FIX] purchase: complete c410911a and revert part of 60aa759
is_recurring_document is removed after revert of 76427541 in c410911ad
2018-03-05 22:53:38 +01:00
Nicolas Lempereur 3de9d443c7 [FIX] account: typo self/this in reconciliation 2018-03-05 22:25:36 +01:00
Christophe Simonis 2534bd19fb [MERGE] forward port branch 9.0 up to 6deed451ee 2018-03-05 18:50:51 +01:00
qdp-odoo 6deed451ee [FIX] account: fix the runbot after commit 0e881fcd3a
The previous commit forbids to change the currency of a company having accounting entries, but there are some created by demo data and some tests were trying to set a different currency (to set up a fix environment). So in order to allow that in tests, we do it via a SQL query directly
2018-03-05 17:39:10 +01:00
Simon Lejeune 6bcf9ac2ee [FIX] stock_account, sale_stock, stock_dropshipping: dropshipping valuation
Following the previous fixes in stock where we had to handle non-valued
move lines inside a valued move, the valuation of the dropshipping was
bypassed because a dropshipping move is not an in move, nor an out move.

We now value the dropshipping move always positively. We adapt the
sale_stock code that generate the anglo saxon entry to use the abs value
of the move, not -1 * value. It was done this way because all out moves
are negative.

We add 8 tests to test all the valuation cases: continental or anglo
saxon, ordered or delivered, fifo or standard.

opw-1817363
fixes #23214
2018-03-05 16:16:05 +01:00