Commit Graph
115262 Commits
Author SHA1 Message Date
Nicolas Lempereur 088e3d2fec [FIX] website_event_sale: pricelist show no discount
On the website when selling a ticket, a percentage discount may be
applied on the ticket price.

This percentage is calculated as:
  {event product price} - {event product price reduced} / {event product price}

So with a ticket price 20, a linked product priced 60 reduced to 30, we
would get a ticket price 10 on the website.

This commit hide the discounted price if the pricelist that is applied
was configured as "Discount included in the price".

opw-1807889
closes #23611
2018-03-13 12:24:58 +01:00
Christophe Simonis c921d94236 [MERGE] forward port branch saas-15 up to 3730a0d2df 2018-03-13 12:05:36 +01:00
Darshan Kalola 2b392636c4 [FIX] web_editor: rpc of 'many2one' snippet option
Before this commit, changing the value of a many2one field on the
frontend was not possible anymore since 11.0 because the RPC 'order'
parameter was not properly formatted with the new conventions.

See task-1767802
Closes https://github.com/odoo/odoo/pull/23545
2018-03-13 11:37:59 +01:00
Duc Dao 66c7e130d5 [FIX] base_setup: don't crash if template is empty
Before this commit:

* Activate debug mode.
* Go to general settings > Document Template.
* Change the Template selection to the empty value.
* Click on "Edit Header".

Result: Traceback.

This happens because we try to concatenate the value of the template
field to a string, and since it's empty (False) boolean and str can't be
implicitly concatenated, this of course raises an uncaught error.

After this commit:

* We check if a template has been selected before performing the
concatenation.

Closes #22736
Fixes #22622
2018-03-13 10:53:32 +01:00
Adrian Torres 84b6c46943 [FIX] registry, loading: re-init inherited SQL views
Before this commit:

* Install any module that creates a SQL view and another that extends
this view.
    e.g.: sale and pos_sale for `report.all.channels.sales`.

* Uninstall the module that extended the SQL view.
    e.g.: uninstall pos_sale.

* Try to access the view from the web client -> Traceback, table not
found.

This happens because when reloading the registry, postgres drops the sql
view and it must be re-initialized.

After this commit:

We solve this issue by calculating all missing tables/views during the
uninstallation process, and re-initializing all of them right before
reloading the registry.

Also remove sql-view hacks in the modules `sale` and `sale_margin`.

Fixes #23528, #23529, #23530
2018-03-13 09:41:43 +01:00
Goffin Simon 31a0bdec73 [FIX]stock: Default scheduled date in a stock.picking
When creating a stock.picking with the barcode, a default scheduled date
is required if you want to go further.

opw:1824629
2018-03-13 09:24:53 +01:00
Martin Trigaux bfffe17d37 [FIX] account: duplicated entry in pot file
Added at 57ff6a17b7 and 3715244a51
2018-03-13 08:47:15 +01:00
Christophe Simonis 3730a0d2df [MERGE] forward port branch saas-14 up to 0e898eae35 2018-03-12 18:48:15 +01:00
Christophe Simonis 0e898eae35 [MERGE] forward port branch 10.0 up to 0440e25380 2018-03-12 18:16:02 +01:00
Nicolas Lempereur 1653f39d53 [FIX] website_sale: 40px for mobile/list view/desc
When activating the list view of product and description, if the
description was too big things were overflowing over their box and
became unreadable.

The issue is that the height limit on description was of 200px for
tablet device and there was no lower limit. Thus the limit of an product
line being 200px: the description + picture could break out of the box.

With this change, the description at lowest width devices is limited to
40px as is the case for the grid view (which is very similar on low size
devices).

opw-1819184
closes #23604
2018-03-12 17:31:31 +01:00
Grzegorz Krukar 3715244a51 [FIX] account: missing 'Enterprise' labels in Invoicing settings
This patch is a workaround waiting for the real patch in upgrade field widget.

Export source to match recent changes in account module

Closes #22984
Fixes #20030
2018-03-12 16:51:44 +01:00
Bole afa02f15ee [CLA] signature for dajmi5
Done at #23602
2018-03-12 16:11:05 +01:00
Martin Trigaux 1a4d736a86 [I18N] website_crm: fetch translations
To get the changes following 6f18af73e0
opw-1813360
2018-03-12 15:04:18 +01:00
Christophe Simonis 0440e25380 [MERGE] forward port branch 9.0 up to 7c6da3e076 2018-03-12 14:33:58 +01:00
Odoo Translation Bot 1027f5ace7 [I18N] Update translation terms from Transifex 2018-03-12 14:30:40 +01:00
Géry Debongnie e7fab23420 [FIX] web: better experience for one2many edition (paged)
A big problem with the o2m edition happens when the user has a full page
(so, in general, 40 records) and click on add.

If the o2m is in editable="bottom" mode (which is actually a really
common usecase), then the next record will be added at the end.
However, since we have a limit of 40, it will immediately go to the next
page.

The effect is even weirder when there is a required field in the tree
view.  In that case, the new record appears correctly, the user can edit
it, then, as soon as the required fields are set, it will immediately
disappear from the current screen.

In this commit, we have a really simple solution: we simply increase the
limit in this case.  An interesting thing is that it is actually temporary:
when the user goes to the next page, the limit is back to its original
value (due to the pager click: it resets the value to what the pager knows).
2018-03-12 13:53:39 +01:00
Raphael Collet 2ea3c333e4 [FIX] models: update non-stored inverse field on several records
Issue: when the inverse method writes on a dependency of the first record, it
invalidates the cache of the field for the other records...  Solution: simply
evaluate the inverse method one record at a time.
2018-03-12 13:35:57 +01:00
Goffin Simon 96ebf00ca8 [FIX] account: Due date should be readonly on open invoices
The due date is printed on the invoice given to the customer and then
it is quite "official". That's why it shouldn't be correct to change it
when it's validated.

opw:1823175
2018-03-12 13:35:06 +01:00
Nicolas Lempereur 60c920d4a1 [FIX] portal: no dynamic chatter on edit so no dup
When editing a view on the frontend with a dynamic chatter (chatter
added dynamically to the view), if that part was edited, that
dynamically rendered part would be saved as is. Thus we would get a
duplicated chatter (with the first one statically the rendering at the
edit time).

opw-1813792
closes #23593
2018-03-12 13:12:06 +01:00
Aaron Bohy a0b06afcf3 [FIX] web: 'toggle_button' widget in edit mode
The 'toggle_button' widget is one of special field widgets that
can trigger changes in readonly mode (in this case, toggle the
boolean value when clicked). It was working fine in form views in
'readonly' mode, as in this case, the new value is saved directly,
and the form view is re-rendered (a new widget is created with the
new value).

However, in 'edit' mode, the value isn't saved directly (the user
has to click on 'Save' to save the changes), the widget is reset
with its new value, and the reset wasn't correctly handled in this
particular widget.

Fixes #23400
2018-03-12 12:56:00 +01:00
Aaron Bohy 8a1603eeda [FIX] web: don't scroll to top when opening a dialog
Steps to reproduce the issue: on an MD sized screen (i.e. such that
the chatter is below form views), go to a sale order in edit mode,
scroll down and click on 'Add an item', a modal opens, and the form
view behind scrolls back to the top, whereas it should keep its
scroll position.

This is because the ActionManager listens to event 'DOM UPDATED',
and when it occurs, it restores the current action's scroll
position (the main purpose is to restore the scroll position of a
previously visited action to which we return using the breadcrumbs).
When a dialog opens, this event is also triggered, but in this case
we should not restore the scroll position of the action in the
background.

Fixes #23491
2018-03-12 12:55:40 +01:00
Romain Derie f02cd2977e [FIX] website: use user timezone when handling date in page property
Before this commit:
1. The date would be displayed as UTC regardless of the user timezone.
2. The date would be sent to the backend in the browser timezone

Now we correctly take the user timezone into consideration when handling date.

Step to reproduce:
  - Install a second language where time format is: %H.%M.%S or %H,%M,%S
    (eg: Finnish, Bulgarian, Albanian )
  - Set it as website default's language
  - Open page properties dialog on any page
  - The date looks correctly displayed but it is in fact the UTC hour and not
    the user timezone date. (eg: 2 hours missing in Albanian case, it would
    show '2018-Pri-05 02.11.02.' instead of '2018-Pri-05 04.11.02.')
  - If you save, it will crash since it will send the wrong date format to the
    backend that is expecting 'YYYY-MM-DD HH:MM:SS' format.

Closes #23500, closes #23566
2018-03-12 12:06:55 +01:00
Nicolas Martinelli 6f18af73e0 [FIX] website_crm: contactus_thanks
Commit 4ecbacaf59 changed the XMLID of the `contactus_thanks` page,
but didn't adapted the .pot file. Therefore, the translations were not
loaded anymore.

opw-1813360
2018-03-12 12:03:13 +01:00
Nicolas Martinelli 2021f44c0e [FIX] fields: empty date or datetime
When the `create` or `write` method receives an empty string for a date
or a datetime field, PostgreSQL will fail since this is not an accepted
value for this field type.

We fallback on `None` for falsy values.

opw-1819336

@KangOl : watch out when forward-porting, the signature of
`convert_to_column` has changed in saas-14.
2018-03-12 12:01:42 +01:00
Nicolas Martinelli 6fd9d31848 [FIX] website: edit company data
- Go to 'Contact Us' page
- Edit, then try to change company data
- A dialog window asks if the user wants to edit the company data
- Confirm

It redirects to an unexisting page.

opw-1825662
2018-03-12 11:23:29 +01:00
David Arnold 231cae2e7f [FIX] fields: copy_cache with failed values onto sudo env (#23122)
Do not copy failed values, as they usually reveal access error that should
not occur in the sudoed env.

Closes #23121
2018-03-12 10:14:01 +01:00
Alexandre Kühn 3360c550cc [FIX] board: redirect to form on calendar event click
Before this commit, when clicking on a event of a pinned calendar view
in the Dashboard app, nothing occurs.

The cursor turns into pointer type when hovering on an event, suggesting
that clicking on it should do something. Kanban and list views redirect
the user to the document's form on click, so a similar behaviour is
expected with calendar view.

This is indeed the case in v11, but not in v10. The reason that it works
in v11 for calendar is that when we click on a record of a pinned views
in dashboard, it performs a do_action to open the form view. In v10, however,
it performs a do_switch_view to the form view. Since there's only one view mode
when we pin something in dashboard, the processing of the click fails silently.
Kanban and list were working because the dashboard app overrides their
handlers functions when loading the views, which wasn't the case with calendar.

This commit solves the issue by also overriding the handler function
of calendar view, so that it performs a do_action to open a form instead
of performing a do_switch_view to the form view.

(Note: pivot and grid views work, because they use do_action)

opw-1817725
2018-03-12 08:38:52 +01:00
Simone Rubino 671d54114f [FIX] project_issue: override _track_template
Properly override `_track_template` similarly to what is done for
`project.task`, so the method can accept a recordset.

Co-authored by: Nicolas Martinelli <nim@odoo.com>

Closes #23466
opw-1823244
2018-03-12 08:13:00 +01:00
Simone Rubino 18109edc6e [CLA] Signature for SimoRubi 2018-03-12 08:13:00 +01:00
Nicolas Martinelli 00acd9882b [FIX] l10n_fr_fec: escape references
Escape the character `|` in the reference, to avoid messing with the
exported CSV file.

opw-1814994
2018-03-12 08:09:20 +01:00
Odoo Translation Bot 6df7f619fb [I18N] Update translation terms from Transifex 2018-03-11 04:19:01 +01:00
Odoo Translation Bot 3e7835134d [I18N] Update translation terms from Transifex 2018-03-11 00:27:33 +01:00
Juan Pablo Arias 895f32d185 [IMP] base: add Panama address format
Closes #19217
2018-03-09 17:10:46 +01:00
Juan Pablo Arias 6d6a8f2b5b [CLA] add new email to Kurkop's CLA
Done at #19217
2018-03-09 17:10:46 +01:00
Nicolas Lempereur 0ddcdb1315 [FIX] l10n_ch: config and css ISR scanline offset
Our positionning of the scan line (ligne de codage) was possibly wrong
depending on wkhtmltopdf.

In eg. chromium the font is configurable exactly but in wkhtmltopdf it
seems there is bigger limitation on giving eg. a decimal pixel number.

But this was necessary to have the same character positionning than
expected in BVR, and this line is read by scanner and must match.

This change:

- have an absolute positionning for each character in the scan line
- add two parameters "ISR scan line horizontal/vertical offset" that
  will move the scan line to the choosen distance.
- changes some other CSS value to match better the ISR documents on
  accounting on differences between wkhtmltopdf 0.1.2.1 and  0.1.4.1
- remove currency which should be on the BVR background.

opw-1813776
closes #23518
2018-03-09 16:26:31 +01:00
qdp-odoo c0e547d348 [FIX] account: allow translation of error message from previous commit
Previous commit 57ff6a17b7 was introducing a new error message, and I forgot to add it in the .pot file. Dummy me
2018-03-09 15:39:15 +01:00
Fabrice Henrion f4042b5975 [FIX] doc: grammar
Closes #19377
2018-03-09 15:37:47 +01:00
Olivier Dony da54c40c6e [FIX] payment_ogone: fix refunds for 3DS validation
Complements rev. 9b1009cd5a to fix the
handling of validation transactions for 3DS-enabled cards.

This handles a few issues:
- make sure to trigger the refund for validation transactions even if
  the first feedback we get is the S2S feedback
- feedback URL called by the users' browser should not reset the payment
  transaction to 'done' when the refund process has been initiated
- status 81 for "refund pending" should not end up with a transaction in
  error. It may be that Ingenico will send a feedback transaction later
  or not at all, but the refund is likely to succeed at that point.

Without this commit, validation transactions would never be refunded for
3DS cards.

Remaining issue: the return_url does not seem to be set for those
validation transactions, so the user ends up on the homepage after
completing the 3DS step.
2018-03-09 15:36:30 +01:00
mreficent 57ff6a17b7 [FIX] account: fix bank_account_id field in account.journal
* In account.journal model, the domain of bank_account_id field was incorrectly comparing the partner_id with a res.company object
* When modifying the company of a bank journal, the company of the related res.partner.bank was changed without checking if it had a company and also its partner (account holder) was not changed.

Was PR #23480. Courtesy of Miquel Raich (Eficent)
2018-03-09 15:24:06 +01:00
Akim Juillerat af83bb6640 [FIX] stock: add space in warehouse sequences name
The sequence name was something like:
    	"YourCompanySequence in"

Closes #19564
2018-03-09 14:15:56 +01:00
Olivier Colson 7c6da3e076 [FIX] account: display partial payments in overdue report
Before that, partial payments on open invoices were ignored by the query, due to the fact we used checked "reconciled=false" instead of "full_reconcile_id is not null".
2018-03-09 14:14:54 +01:00
Olivier Colson 6f35d859c5 [FIX] account: show partial payments into partner ledger
Before that, partial payments of invoices were not shown into the partner ledger unless the option to show reconciled entries was activated. This was due to the fact we checked full reconciliation with the field "reconciled" instead of the full_reconcile_id, so the query did not return the partial payments (which have reconciled=True, but don't have any full_reconcile_id unless the invoice is fully paid).
2018-03-09 14:02:19 +01:00
Denis Ledoux c4601f775e [FIX] point_of_sale, pos_restaurant: bill receipt, vat_label crash
Revision ec96c0b3c2
attempt to display the VAT label according to the country
vat label.

This a very commendable effort, except that the
`vat_label` was not available under the variable
`company.country_id.vat_label`

Actually even `company.country_id` was undefined.

This revision does what it must be done in order
to read the countries `vat_label` and to make
it available through a variable for the bill receipt.

opw-1817333
2018-03-09 12:34:13 +01:00
Nicolas Martinelli 11c6f1b322 [FIX] account: tax rounding
- Set 'Round Globally'
- Create an excluded tax of 10 %
- Create an invoice for a product costing 34.55, and apply the tax.

The tax on the invoice is 3.46, while the tax on the tax line is 3.45.

When rounded in `compute_all`, the tax amount is 3.455, which is the
value expected. However, the `create` method won't round this value
before storing, leading to the inconsistency.

We make sure the currency is sent at saving, so the method
`convert_to_column` receives the appropriate values for rounding.

opw-1819902
2018-03-09 12:20:47 +01:00
ddelangle 21c509964c [FIX] base: use correct MAD currency symbol
change د.م. to DH

source:
	http://www.iotafinance.com/en/ISO-4217-Currency-Codes.html

Closes #20064
2018-03-09 12:19:46 +01:00
ddelangle 277c382f5e [CLA] signature for kazacube
Done at #20064
2018-03-09 12:19:31 +01:00
Romain Derie cc97fa292a [FIX] website: prevent URL from being encoded twice
Before this commit, the twitter share (intents) would encode the URL twice.
The URL on the tweet would then be broken.
Eg: https%3A%2F%http://2Fwww.odoo.com%2Fforum...
2018-03-09 10:42:27 +01:00
Lucas Perais (lpe) 262be78957 [FIX] sales_team: allow own_lead user to qualify leads
Use case:
Have a user with access rights "See Own leads"
In the CRM settings check the "use leads" boolean

Before this commit:
This user couldn't create a lead directly nor qualify it as an opportunity
AND
the default sales team on the lead displayed as 'Unknown'

After this commit:
This user can read the sales team, even though he is not a member of them
He can create leads on the default sales team
And qualify them as opportunities

OPW 1816309
ref #22360
2018-03-09 09:13:41 +01:00
Lucas Perais (lpe) 45c5a07d89 [FIX] account: allow to include zero amount lines in aged partner balance
Make an invoice
Make a payment
Unreconcile them

Before this commit:
The invoice and the payment weren't display in the aged partner balance

After this commit:
Both payment and invoice *can* be included in the balance

OPW 1819359
2018-03-09 09:07:33 +01:00
Christophe Simonis fcb48b7241 [FIX] purchase,stock_dropshipping: keep current company currency
Changing it is not needed and generated missmatch against existing
entries (created by l10n_generic_coa demo data, thus depending on module
install order).
2018-03-08 18:16:55 +01:00