Commit Graph
117975 Commits
Author SHA1 Message Date
Christophe Matthieu ae39a89a09 [FIX] web_editor: add thumbnail image to send attachment 2018-02-08 11:25:51 +01:00
Christophe Matthieu 6494f51171 [FIX] base/mail: Added an access_token on the attachments url
The access_token is automatically added by the media editor. It's added
on the website and by the html editor to send by email. The widget display
the attachments from 'ir.ui.view' (public attachment) and the attachment
from the current record.

Issue: can't load image in gmail or mobile because the client mail use a
proxy who avoid ours odoo access.
2018-02-08 11:25:51 +01:00
Christophe Matthieu 152e3f8686 [FIX] web_editor: encoding of the attachment name is missing in image src 2018-02-08 11:25:51 +01:00
qsm-odoo ce51ad7e69 [FIX] web_editor: allow deleting all images in table cells
Before this commit, it was impossible to delete an image which was a
direct child of a table cell using the trash-icon button in the
toolbar.

This commit fixes the behavior by changing the logic quite a lot, so
it is kinda tricky (see https://github.com/odoo/odoo/commit/25849e918651eba080dac3af4e4fcdc8f1280241
for more explaination).

Closes https://github.com/odoo/odoo/issues/22523
2018-02-08 10:48:14 +01:00
qsm-odoo 8dfd6a2507 [FIX] web_editor: fix image deletion and replacement
Deleting/replacing an image through summernote gave unexpected results.
As modifiying the related function may be tricky, this commit instead
wrap them to solve the specific erratic behavior: if the range is in/
matches an image, then simply remove the image and move the cursor to
its previous location.
2018-02-08 10:48:14 +01:00
Yenthe V.G 72a8b420d2 [IMP] doc: specify to go in developer mode to access a feature
Closes #22877
2018-02-08 15:10:23 +05:30
Lucas Perais (lpe) d2f9994e92 [FIX] sale, website_quote: right display of confirmation mode
Create a quotation in sign confirmation mode.
Send it by email
Follow the link

Go the quote's user's portal
Go to the quotes menu, and enter the right SO

Before this commit, although the confrmation mode of a SO
was rightly computed, it was badly retrieved and displayed.
The button on the email was 'accept and pay'
On the portal, the form view of the SO displayed 'pay now'

After this commit, in both cases it displays 'accept and sign' or the like

OPW 806554

related to #22390
2018-02-08 10:32:00 +01:00
Lucas Perais (lpe) 9645a64d0e [FIX] base_vat_autocomplete: address fields should not be conservered on change vat
Bafore this commit, fields that were not written during on change were kept
leading to having a wrong overall address when changing vat when the return of the API
did not contain the same fields as before.
Also, ZIP from Netherlands were not supported

After this commit, when changing the VAT number, fields that were not set by this operation
are reset to False
Also, NL zip codes compute fine

OPW 807666
2018-02-08 10:29:30 +01:00
Pedro M. Baeza 84b0ec4da3 [FIX] delivery: Get correct carrier price on picking created from SO
Steps to reproduce:

* Create a sales order (SO).
* Assign a carrier.
* Don't press on "Set price" button next to carrier.
* Validate SO.
* Validate picking.
* Delivery line is added to the SO with price 0.

This is because the delivery SO line is added with the value of
picking carrier_price field, but that field hasn't been set.
If you modify on view carrier field, there's an onchange that
fills correct price, so I use that onchange method for getting
same results.
2018-02-08 10:17:06 +01:00
Prakash Prajapati dfdc06fe43 [IMP] base_settings,...: Improve usability to tend towards a perfect onboarding.
Purpose
=======

Lots of small things could be improved in the general settings (labels to rename, layout issues,...)

Specifications
==============

- auth_oauth: Remove useless title
- base_gengo,  : Fix layout issue due to missing oe_inline class
- base_setup: Modify Inter_company_rule labels
- google_calendar: Remove technical menuitem leading to general settings
- ir_actions_todo, ir_ui_menu, mail_message_subtype: Add a handle widget on the line instead of displaying the sequence
2018-02-08 08:04:10 +01:00
Christophe Simonis da19a7701e [MERGE] forward port branch saas-16 up to 23752102a0 2018-02-07 17:47:26 +01:00
Laurent Smet b10932d8a5 [IMP] account: allow partial reconciliation with write-off
Suppose you have an invoice of 3000. You want to pay with paypal
    3 x 1000 but having of fee of 10 in each transaction. So, you attempt
    to reconcile 3000 with 3 x (990 + 10) that is not possible with the
    reconciliation widget.

Was PR #17489. Was task: https://www.odoo.com/web#id=23384&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
2018-02-07 16:48:53 +01:00
Robert Rübner 32a7a1ed09 [FIX] website: do_not_show option in translator dialog not working
Before this commit, it would do the opposite of what it should:
When 'Do not show this dialog later' is checked, it would remove the
localStorage item instead of creating it.
When unchecked, it would create the localStorage item to prevent the dialog to
shows up again.

Now, we perform the correct behavior.

This closes #10882, closes #11550
2018-02-07 16:34:38 +01:00
Nirali Sapra 4cfda8cef9 [IMP] purchase : improve the error message for Purchase Requisition. 2018-02-07 16:26:57 +01:00
Martin Geubelle 36d07bfc0f [FIX] web: properly handles ESC in editable lists
This is a small correction of odoo/odoo@3aad756 ; a traceback occured when ESC
was pressed in a list view with modifiers.

The `confirmChange` was done on the parent datapoint (of type list) which has no
attribute `evalModifiers`.

`confirmChange` is now called on the record datapoint. Note that for x2m, it
means that all modifiers linked to the parent record won't be re-evaluated (but
this wasn't probably intended as this is a bit overkill).

Closes #22718
2018-02-07 15:25:54 +01:00
Martin Geubelle 4ae44b3bd9 [FIX] web: prevent crash when downloading pivot view
A traceback was occuring when downloading the pivot view without data.

The export function expects the attribute `main_row` set on data, which
is defined in `_prepareData`. The latter wasn't called because of the `return`.

Closes #22728
2018-02-07 15:25:54 +01:00
Christophe Simonis 23752102a0 [MERGE] forward port branch saas-15 up to 830327c66a 2018-02-07 15:18:07 +01:00
Christophe Simonis 830327c66a [MERGE] forward port branch saas-14 up to af8de1a3ed 2018-02-07 14:55:37 +01:00
Dhaval Panchal 197a5f3887 [IMP] account: Display full instead of cut bullets on dashboard graphs
Purpose
=======

http://nimb.ws/q12J40
Bullets are cut in the middle, improve so we can see the full bullet.
2018-02-07 14:32:17 +01:00
Christophe Simonis af8de1a3ed [MERGE] forward port branch 10.0 up to 66e76d681d 2018-02-07 14:29:24 +01:00
Rémi Rahir 376415052c [FIX] phone_validation, crm_phone_validation: Phone number parsing
Before this commit, when filing a phone number field on a model form (typically on website_form),
the module phonenumbers would try to parse the number against the country of the model.

However, this call fails when the number starts with 00 instead of + and that the model
doesn't have a country_id field or if said field is not set.

For this specific case, we chose to skip the number parsing altogether as providing a default
country to the parser can lead to a wrong parsing. i.e, phonenumbers.parse(+32477111111, 'US') will
find the number as US-based when it is a belgian number.

solves issue #22513

Also corrected a faulty behaviour where the option to have a number parsed in its international format
field `phone_international_format` on `res.company` was never properly assessed when the field comany_id of a
model was not present in the model's form view. Added company_id field on opportunity's form view for a proper fix.

Also fixed a syntax error in a logger.
2018-02-07 14:22:46 +01:00
Romain Derie 66e76d681d [FIX] payment_stripe: integer currencies (portal payment)
Before this commit:
On portal (My Account > Invoices > Pay Now), a stripe payment in a normal
currency (eg: a non integer currency) would debit the amount *100.
This comes from b335ae0348 which added a workflow to handle integer
currencies but it also sent the *100 amount to /website_payment/transaction
that would create a TX with that amount instead of the normal amount.

Now, the normal amount is correctly sent to the backend, the multiplied amount
is just sent to StripeCheckout handler to correctly display the amount on the
popup after clicking on "Pay Now".

Note: the amount will be multiplied on the backend independently ecda057e11
2018-02-07 13:59:33 +01:00
Romain Derie b2b71efb36 [BACKPORT] website: translation if website default lang is not en_US
Before this commit:
When website default lang was not en_US, the translation of fields* in the
web_editor would not be saved correctly.
Let's illustrate with fr_BE set as main lang:

  The web_editor's RPC calls does not send language in the context when editing
  a page (6ebcc06), but it does in translation mode.
  Note that editing is always performed in the website main lang, fr_BE in this
  case.
  Therefore:
  1. When EDITING:
    The backend suppose the language is en_US as there is no lang in the
    context (hardcoded everywhere).
    It then write in the record itself instead of the ir.translation as it
    should since fr_BE is a translation. (In Odoo, every lang is a translation,
    en_US is  always the main lang)
  2. When TRANSLATING (in en_US):
    It would also write on model as the web_editor send the language to the
    backend when in translate mode. But since en_US is recognized as the main
    lang (which is correct), it also writes in the model, overriding the
    incorrect fr_BE writing which was also wrote on the model.

This has been fixed in 10.0 with these 2 commits:
036ccbe
2955bf2

With these fixes, the lang is correctly added (by the backend) if the website
module is installed.
By ensuring the lang is correctly set, the ORM _write() function will process
the edition and translation datas as it should:

  - If it receive en_US, it will write on the model
  - If it receive another lang, it will write on ir.translation

This closes #10883, closes #22403

*Not the HTML/XML fields which are handled differently by the ORM/translation
2018-02-07 13:35:03 +01:00
Christophe Simonis ae3643ba2a [MERGE] forward port branch 10.0 up to a93a9d43e6 2018-02-07 13:34:03 +01:00
Martin Trigaux 2c6bad6b75 [FIX] calendar: wrong label on field
Was not meaning anything, or implying a number while the fields is a boolean

Courtesy of e2f translators
2018-02-07 17:54:10 +05:30
qsm-odoo a93a9d43e6 [FIX] website: allow "Customize theme" when CDN option enabled
Traceback because the `_get_asset` function was called by the
`theme_customize` route without the `values` argument (which is not
necessary for the feature).

Closes https://github.com/odoo/odoo/issues/22516
2018-02-07 12:50:28 +01:00
Christophe Simonis 7f153c021a [MERGE] forward port branch 9.0 up to 80f88ad63b 2018-02-07 12:32:32 +01:00
celm1990 80f88ad63b [FIX] point_of_sale: unmark order finalized when invoice failed
When we validate an order that need to be invoiced, and the customer is
not set, you have to enter a customer, but your order is finalized so
you have a traceback saying it cannot be modified when you try to set
the customer.

When the invoicing fails, we don't set the order as finalized.
2018-02-07 11:00:48 +01:00
Aaron Bohy 7937347d75 [IMP] web: invalidate JS cache for some models
Models concerned are 'ir.ui.view', 'ir.actions.act_window' and
'ir.filters'.

The DataManager's cache is invalidated at each create, update and
unlink operation. This cache stores actions (results of calls to
/web/action/load route), views (results of load_views RPCs) and
filters (fetched alonside views).

This rev. thus spares the user from reloading the webclient after
performing such operations on these models to see the changes in
the interface, as he only has to replay the action to see the
changes.
2018-02-07 08:49:58 +01:00
Florent de Labarre ee7e9198f2 [FIX] stock: don't update a move line with qty=1 with serial product
Use case to reproduce:
- create a product A with serial number
- add 2 product A in stock
- create a delivery order with this 4 product
- Check Availability
- add 2 more product A in stock
- Check Availability
- in the first line the quantity is now 3

It happens because _update_reserved_quantity on stock move
try to add the quantity reserved on simililar move lines.
Howevever in serial case we don't want to have a move line
with a reserved quantity greater than 1.
2018-02-06 17:10:20 +01:00
Nicolas Lempereur c123049805 [FIX] mail: notif display form view not kanban
In mail change about activities in 07f1e902 when opening the record of a
notification, kanban view was in the action views but there doesn't seem
to be a reason and this caused an issue on enterprise mobile (since
kanban view if available has priority).

opw-804529
closes #22848
2018-02-06 15:53:25 +01:00
Martin Trigaux 34d2765faa [FIX] crm: allow to unlink multiple records
Closes #22647
2018-02-06 20:12:37 +05:30
Martin Trigaux 20f2de8296 [FIX] resource: prevent adding wrong hours
e.g. negative hours, over 24h, start > end

Task id: 36965
opw-802816
Closes #20449
2018-02-06 19:58:42 +05:30
Mehul Patel 2a350c0934 [IMP] *: Add kanban view for smart mobile list view
See https://www.odoo.com/web#id=40281&view_type=form&model=project.task&action=333&active_id=131&menu_id=4720 for more information...
2018-02-06 15:23:44 +01:00
Florent de LabarreandNicolas Martinelli 71d5425c83 [FIX] purchase: update PO line in procurement
Allow inheritance for PO update as it is already the case for PO
creation.

Closes #22224
opw-806807

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2018-02-06 13:38:12 +01:00
Nicolas Martinelli 4d213a3795 [IMP] purchase: consistency in method parameters
Make `_prepare_purchase_order` and `_prepare_purchase_order_line` using
consistent parameters.

opw-806807
2018-02-06 13:36:46 +01:00
Mitali Patel 3d913cd5f4 [IMP] website_quote: show product description only once ,In case of several variants of the same product template in the quotation
Purpose
=======

In website quote template
Example: I have 3 bikes with 3 different colors.
     On web page i have 3 blocks, 1 per variant.
This is confusing to have 3 times the same description...

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

In case of several variants of the same product template in the quotation, only show the product html description once (since it's common to all the variants)

- On the Preview Quotation page, display the product description only once.
- On the Quotation Template edition, display the suggested product and the product description only one.
2018-02-06 13:08:59 +01:00
Pierre Rousseau 3c2d407dd6 [IMP] sms: show characters count 2018-02-06 12:57:50 +01:00
Martin Trigaux 0bd8c0ddc8 [FIX] account: typo 2018-02-06 17:12:22 +05:30
Martin Trigaux 539a67e62f [IMP] account: clarify error message
Courtesy of e2f translators
2018-02-06 17:03:47 +05:30
Martin Trigaux 57da0a5d60 [FIX] hr_payroll: fix typo
Courtesy of the e2f translators
2018-02-06 16:38:35 +05:30
rmu-odoo f6216a99df [IMP] sale,account: display tax amount when rounding method is perline
Display the tax amount on the sale/invoice line report

Task id: 31052
Closes #20531
2018-02-06 15:49:45 +05:30
Nikunj Ladava 7895862584 [IMP] sale_payment: hide payment acquirer form when order total is 0 2018-02-06 10:35:39 +01:00
Nikunj Ladava 359769aa8b [FIX] sale_payment: able to pay sale order from portal
Revision on https://github.com/odoo/odoo/commit/eefe879a37aba221bda84adfd880fb7876955920
Changes in the portal payment are wrong, it stops user to pay sale order from portal.
2018-02-06 10:35:39 +01:00
Swapnesh Shah a04a97cec5 [Fix] hr_maintenance: typo
`auto-install` key in manifest instead of `auto_install`
2018-02-06 10:19:38 +01:00
Kinjal Mehta e25d0b3891 [IMP] project: Remove a shared stage if no linked record inside this project
Purpose
=======

Projects may have share columns. If we want to delete a stage on a project there's several use case

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

Different use cases:
- The stage is shared
	- There's no task in this stage for this project: Remove the stage from this project, don't delete it
	- There's a task in this stage (Active or not): Raise an error from the ondelete restrict
- The stage is not shared
	- There's no task in this stage: Delete the stage (unlink)
        - There's a task in this stage (Active or not): Raise an error from the ondelete restrict
2018-02-06 08:56:54 +01:00
Kinjal Mehta 05fc6f52d0 [IMP] web: combine user context with record context on 'deleteRecords' 2018-02-06 08:56:54 +01:00
Kinjal Mehta 89c07862d5 [IMP] crm, project,...: Prevent stage deletion when there's a linked record
Purpose
=======

Avoid having people getting some tasks lost in the "undefined" column. Because they won't understand what it means an how they achieve it.

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

Add an "ondelete='restrict'" on the stage field definition.
2018-02-06 08:56:54 +01:00
Nikunj Ladava b2d4238246 [FIX] account_payment: Remove the title argument form UserError
Purpose
=======

Actually UserError is not made to take a title actument.
2018-02-06 08:49:31 +01:00
Miquel Raïch d219963192 [FIX] purchase_mrp: correct manifest
Title underline was too shat, making the rendering crash

Closes #21756
2018-02-06 12:46:19 +05:30