Commit Graph
126133 Commits
Author SHA1 Message Date
qsm-odoo 509a7f73b0 [FIX] website, *: restore color edition in theme dialog
* base, web_editor

Commit https://github.com/odoo/odoo/commit/44d659d0df6b50ae230af39a0d41a46b9549e2ae
made the system work with multi-website but fetching the assets content
was unfortunately not working in multi-website...

Also restore correct search operators.
2018-09-27 13:56:09 +02:00
Jeremy Kersten 64719b71d5 [FIX] website, website_sale: add bg-{color}-light
And use it in confirmation payment card

FP request
2018-09-27 13:13:38 +02:00
Jeremy Kersten d8f0837f94 [FIX] website: last_website_so_id is website dependent
Before this commit, if you use this field outside of a controller website,
it will fail because this field depend of request.website that is only set
on controller of type website.

Now we return False if we call try to use this field outside of the website.

Eg: call get_current_pricelist in json
2018-09-27 13:13:38 +02:00
Vincent Schippefilt 1da9ed30c2 [FIX] crm: add more demo data for dashboard 2018-09-27 13:04:00 +02:00
XavierDo 76c5389cd9 [IMP] core: enable tests when test-tags are set
The goal here is to keep the default behaviour of test-enable and test-tags
except that test-tags will set test-enable to true if set.
- +standart must stay the default test-tags if none are set
	(only usefull if test-enable is set)
- should work no matter the order of "test-tags" and "test-enable"
	options  in args
- knowing the fact that for strange reason, _parse_config is called twice

PR: #27255
2018-09-27 13:01:22 +02:00
Martin GeubelleandAaron Bohy f4b2060af5 [FIX] web: handle lazy load with previous actions
Before this rev. the lazy loading of views was correctly handled if there was
only one action in the action stack (which is usually the case when performing a
F5, the main use case of the view lazy loading).

Nevertheless, it might happen that the lazy-loading is used in top of other
actions (when performing a `doAction` with a form view for an action with
another view as first view, i.e. when leaving Studio while editing the form view).
The controller was `unshift` in the case (put in the first position of the
controller stack), which is not correct.

This causes the breadcrumb to be misordered and a traceback occured when trying
to access a breadcrumb element.

Co-authored-by: Aaron Bohy <aab@odoo.com>
2018-09-27 12:34:04 +02:00
Mathieu Duckerts-Antoine 53a9bdf900 [FIX] web: only default time range works
If a default time range was set in the action but no
other default filter or groupby, the time range wasn't applied.
This commit fixes that situation.
2018-09-27 12:34:01 +02:00
Martin Geubelle fc268a37dd [FIX] mrp: correctly define BOM structure report
Calling `html_container` is not only useless when using the `basic_layout`
but it's also dangerous because it is already present in the latter.

The assets will be added twice in the report (once in the head and once in
the body).

Morever, the <base> tag was added in the report ; this tag is only useful when
rendering the pdf version, which uses minimal_layout that already set the
<base> tag ; this tag can only be present once in an HTML document so it has
been removed from the BOM report.

This results in a report not being editable by Studio.
2018-09-27 12:29:12 +02:00
ThanhDodeurOdoo ed2a8c4f3b [FIX] documents, base: pdf split
Reason: Following feedback from FP and AVW.

- Fixed the "split PDF" feature, it is now possible to leave an
empty page input, check the "split all" box and get a result.

Task: 1888982
2018-09-27 12:12:33 +02:00
len-odoo 2a697f1c5b [FIX] document: update environment before attachments update
Fine-tuning of commit:
b3a3ad8099
ac1e187eea

The environment should be updated before the call to _updateAttachments,
as it depends on the env active_id.

opw 1888651

closes odoo/odoo#27277
2018-09-27 10:11:12 +00:00
Xavier Morel 8eb8495710 [FIX] doc: backport of ac37ca39e
github_link compatibility with Sphinx 1.8

Backport to 11.0
2018-09-28 12:23:41 +02:00
Martin Trigaux b18a4cba0e [CLA] Inspur signs Odoo CCLA
Done at opw-1889259
2018-09-28 11:55:10 +02:00
Adrian Torres 3f4f77fd9d [REF] *: adapt code to new related default behaviour
This commit adapts the business code to changes introduced by
the parent commit in order to keep the same behaviour as before.

All readonly=False fields will have to be checked afterwards to confirm
that the business case requires write access to the source field.
2018-09-27 12:10:23 +02:00
Adrian Torres 52a8ed3c0c [IMP] fields: make related fields readonly by default
With this commit, any *explicitly* related fields will be `readonly=True`
by default.

*Implicitly* related fields (i.e. _inherits fields) however will keep the
source field's `readonly` attribute.

The rationales behind this patch are:
    * Enforce good practices, as the most common use-case for
      related fields is the same as for compute fields: to read data.
    * Avoid errors where some user saves a form view which contains
      a related field that the user doesn't have write access to.
2018-09-27 12:10:23 +02:00
Adrian Torres 67431fcfaa [REF] *: adapt code to new related default behaviour
This commit adapts the business code to changes introduced by
the change to related field's default readonly value in order to
keep the same behaviour as before.

All readonly=False fields will have to be checked afterwards to confirm
that the business case requires write access to the source field.
2018-09-27 12:09:45 +02:00
Mathieu Duckerts-Antoine 3c093a8108 [FIX] web: human numbers and percentages
A recent modification of the float and integer
formatters allowing the rendering to be human readable
causes a bug in the percentage formatter for large values.
The reason is that the latter formatter uses formatFloat (wich can
now produce 'numbers' like 3k) and then parse the result. In the case
of 3k an error is raised since 3k is not recognized as a true number.

This fixes avoid to parse the number in case it has been formatted
to be 'readable'. Note that the parsing was essentially used
to produces better percentages like 10% instead of 10.00%.
This is not necessary in our case since utils.human_number takes care
of the unwanted (not all) decimals for us (the original number is always
rounded by utils.human_number).
2018-09-27 11:58:39 +02:00
Rémi Rahir 49695b0088 [FIX] snailmail: use the correct activity type
The activity generated by the snailmail sending is actually an exception
and should therefore use the corresponding activity type.
2018-09-27 11:30:16 +02:00
Martin Trigaux cf50388d10 [FIX] product: correct bad translation
Already fixed on Transifex but saas-11.3 is no longer translated
opw-1888807
2018-09-27 11:17:43 +02:00
Laurent Smet 4237e162a2 [FIX] account: fix writeoff_suggestion in reconciliation widget
'data' doesn't contains any 'status' key but the 'write_off' key to know if some write off lines
must be applied.
2018-09-27 11:01:48 +02:00
TWA c257b8f0a9 [FIX] partner_autocomplete: prevent possible concurrent flag update 2018-09-27 10:45:30 +02:00
TWA e609a6ad4c [IMP] partner_autocomplete: improved additional informations template 2018-09-27 10:45:30 +02:00
TWA 03cd389024 [IMP] crm_reveal: improved additional informations template 2018-09-27 10:45:30 +02:00
TWA 9adbd587d3 [FIX] iap: fix double rpc in get credit widget 2018-09-27 10:45:30 +02:00
Martin Trigaux 2c26fc0e86 [FIX] calendar: do not crash on all day selection
While start and stop are required fields, it is possible to trigger the
computation from the UI before saving (e.g. create an event, set no date, check
"all day" checkbox).

Fixes #27265
2018-09-27 10:33:33 +02:00
Martin Trigaux 17416e664c [FIX] web: translate search view
Group By and Filters strings in the search view were not translatable
2018-09-27 10:24:32 +02:00
Géry Debongnie dbddb233cf [DOC] doc: rename AppSwitcher into HomeMenu
The AppSwitcher widget was renamed to HomeMenu a long time ago, but the
documentation was not updated accordingly.
2018-09-27 10:06:41 +02:00
Raphael Collet 3a30391e9d [FIX] base: superuser cannot become active 2018-09-27 09:54:28 +02:00
Vincent Schippefilt 13d3456791 [FIX] web: fix crash in sidebar when adding attachment
task-id : 1873908
2018-09-26 21:42:58 +02:00
qsm-odoo 6f3affe886 [FIX] website_blog: BS4, restore blog options 2018-09-26 21:08:35 +02:00
qsm-odoo 86e6345095 [FIX] website: allow choosing a body background in full layout
Previous system was strange: you were able to choose a body color but
not a body background when you were in full layout mode.
As transparent colors will soon be able to be chosen by the user, it
makes even more sense to give that possibility as the user can set a
body background pattern and a transparent footer color to let it
appear. Choosing a transparent background image which will be mixed with
the body color is also a common feature.

Also changes boxed layout option to use a white background for the boxed
content (we should maybe give the opportunity to the user to choose that
color instead of using always white).
2018-09-26 21:08:35 +02:00
qsm-odoo 5c9d313007 [FIX] website: better allow color extensions in the future 2018-09-26 21:08:35 +02:00
qsm-odoo 67ac1b541d [FIX] website: remove "Ok" button of theme customize dialog 2018-09-26 20:49:26 +02:00
Christophe Simonis b3d9496263 [MERGE] forward port branch 11.0 up to 1e8ab568c1f 2018-09-26 20:02:37 +02:00
Christophe Simonis a17ddde9a1 [MERGE] forward port branch 11.0 up to 1e8ab568c1f 2018-09-26 20:02:37 +02:00
Raphael Collet 186b1c09cc [FIX] base: avoid prefetching all the fields when getting context
When getting the context of res_users, all the fields are read but if
the schema is being modified and the modifications are not yet commited
in the database, this leads to a bad query.

With this commit, a read is used to fetch only the needed fields.

Thanks to @RCO for finding this issue that only occurs in specific
planetary alignment.

closes odoo/odoo#27263
2018-09-26 17:49:30 +00:00
Katherine Zaoral b08aa26d8f [CLA] add new member to Adhoc CLA
closes odoo/odoo#31333
2019-02-26 09:46:46 +00:00
Jorge Pinna Puissant 5021791fa9 [FIX] account: empty partner field in payment
* Create a new invoice and validate it.
* Create a new bank statement, without having the partner filled in.
* Reconcile the bank statement to the invoice.
* Open the generated payment.

Before this commit, the field partner and partner type are empty in the
payment.

Now, the field partner is filled with the invoice's partner, and the
field partner type is calculated.

opw-1917028

closes odoo/odoo#31399
2019-02-25 10:48:56 +00:00
Nicolas Martinelli 9274dfc44e [FIX] product: pricelist based on cost
- Create 2 companies C1 (USD) and C2 (EUR)
- Create 2 products P1 and P2
  P1: company: C1; cost: 50
  P2: company: C2; cost: 50
- Make sure to define the cost in both companies since it is a property
  field (set it to 50 in all cases)
- Update the currency rates for both companies
- Create a pricelist in EUR, with a price based on the cost price.
- Create a SO in C1, select the pricelist previously created
- Add P1 and P2

The unit price for P1 is converted, while the unit price for P2 is 50.

This is not correct: both cost prices are set to 50, so the unit price
should be identical.

This is because the pricelist always assumes that the price retrieved is
in the product currency. In this case, this is not correct: the price
retrieved is in the company currency, since the cost price is in the
company currency.

Closes #30616
opw-1934443

closes odoo/odoo#31402
2019-02-25 13:58:02 +00:00
Nicolas Martinelli 950d0f1849 [FIX] product, stock_account: cost currency
The cost of the product is a property field, meaning that:
- its value depends on the current company;
- its currency is the company currency

However, several views use the monetary widget to display its currency
with the default `currency_id` field. This can be incorrect, since the
latter is computed based on the product's company.

We introduce the new computed field `cost_currency_id` which has the
appropriate value and can be used in the views.

Closes #30616
opw-1934443
2019-02-25 13:58:02 +00:00
Arnold Moyaux 443b810e09 [FIX] stock: validate a picking with only scrap
Usecase:
- Create a planned transfer
- Add line with initial demand
- Create a scrap
- Click on button validate

The wizard asking for a backorder or not is diplayed. The UserError
that prevent to validate a picking without quantity done or reserved
should have been raised. The scrap moves are directly processed once
the user validates his scrap order. Validate a picking with only done
moves, will not have any effect.

closes odoo/odoo#31076
2019-02-20 09:17:10 +00:00
Arnold Moyaux 86cb78740b [FIX] stock: picking to scratch location with BO
Usecase to reproduce:
- Create an internal picking from stock to scrap
- Add some scrap move inside due to scrap button in header
- Add some move with initial demand for future
- Mark the picking as done and validate it
- The wizard asking for a backorder appear -> Validate or No backorder

The moves with initial demand are duplicated(one new move for each
without intial demand nor quantity done)
A note is logged in the chatter with backorder False has been created.

There is a problem since _action_done on a scrap move from scrap model
will process the scrap move individualy but will create a back order
(commit e088acbc0f try to fix this issue)
However when we create a picking that goes to scrap location, the back
order will not be created since all moves are scrapped.
With the current configuration we can't guess in _action_done if
it comes from scrap or picking validate that goes to a scrap location.

The current solution is to use a context key in order to indicate if the
call come from picking validate or scrap. If it comes from scrap do not
create a back order no matter the case. If it comes from picking, follow
the standard beahvior with a backorder or not.

opw-1934835
2019-02-18 10:02:06 +00:00
Odoo Translation Bot f7a976584b [I18N] Update translation terms from Transifex 2019-02-24 03:16:28 +01:00
Lucas Perais (lpe) 71a295a1d5 [FIX] base: qweb t-call propagates t-lang
Before this commit, the t-lang on a t-call was not
propagated into the context's of the callee template

It resulted into mismatch translation and formatting in the final
rendered template
i.e. having a t-esc with a qweb widget float would take the wrong float format

After this commit, the t-lang parameter alters the context of the template
and t-esc with widgets are translated

OPW 1939989

closes odoo/odoo#31291
2019-02-22 13:40:39 +00:00
Lucas Perais (lpe) 64a3d8f1d6 [FIX] portal: portal access management wizard for company
Have a partner which is a company, with some children
Click on the action "Portal Access Management"

Before this commit, only the children of the company is selectable in the wizard
but not the company itself

After this commit, the company is part of the list

OPW 1931920

closes odoo/odoo#31344
2019-02-22 08:51:46 +00:00
Moens Alexandre 21e44d472d [DOC] base: more explicit documentation
compute_sudo has no effects on non stored computed fields.
It was technically already said in the previous lines (REcomputed) but
it was not particularly explicit

closes odoo/odoo#31320
2019-02-21 13:00:47 +00:00
Moens Alexandre a874858981 [FIX] auth_signup: incorrect use of compute_sudo
compute_sudo does not do anything when the computed field is not stored.
This fixes an issue where user not part of base.group_erp_manager
couldn't modify res.partner

opw-1942803
2019-02-21 12:59:31 +00:00
Abu Zafar 82e526fc36 [CLA] signature for MjAbuz
closes odoo/odoo#31163
2019-02-20 13:13:46 +00:00
Luis 9f6fbca89b [CLA] add eilst to savoirfairelinux
closes odoo/odoo#31255
2019-02-20 13:03:44 +00:00
Christophe Simonis 5f08d82bcd [MERGE] forward port branch 11.0 up to fd122aec52 2018-09-26 19:37:29 +02:00
ThanhDodeurOdoo 2d82692648 [REF] documents, base: binary_content
- Changed the binary_content method
to make it more generic and allow alternative ways of checking
the access rights by using a new method check_access_mode.

   Reason: Asked by ODO following documents' security review.

- if all pages are processed, splitting a pdf will
archive the original attachment.

   Reason: FP feedback.

Task: 1853490
2018-09-26 19:18:38 +02:00