Commit Graph
104208 Commits
Author SHA1 Message Date
Jairo Llopis 88e455b6e9 [FIX] event: Allow to override default method
Without this patch, you have to redefine the field to be able to override this field.

closes odoo/odoo#33049

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-02 08:19:20 +00:00
Géry Debongnie 578c99475d [IMP] web: various small improvements to form view
This commit is a few small improvement/fixes to the web framework:

- allow placeholder attribute on input tags in form view
- only bind click event handler to buttons managed by the framework, not
  custom ones
- _onExecuteAction method in action manager properly fails if event
  cannot be properly handled

closes odoo/odoo#32458

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-05-02 07:14:52 +00:00
Rishabh Jadia c388505fbe [IMP] event_sale, mass_mailing_sale, pos_sale, sale(_crm): added utm parameters (utm_source, utm_campaign, utm_medium)
- added the campaign parameters on event_registration.
- added the campaign parameters on sale_order and move the same parameters to the invoice generated for that so.

Task-1929272
2019-04-30 05:00:30 +00:00
Rishabh Jadia 1e3310d923 [MOV] website_sale: removed the website_sale_link_tracker module and moved it to the website_sale.
Task Id #1929272
2019-04-30 04:55:20 +00:00
Julien Mougenot ede3317b68 [IMP] web: close dropdowns on scroll
Dropdown from many2xxx and datepicker widgets now close on scroll
to allow access of background information when scrolling.

Related to task #1929483

closes odoo/odoo#32836

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-30 07:30:56 +00:00
Kaushalya Mandaliyaandqsm-odoo 3f18d67f9e [IMP] website: improve customize dialog UI for font selection
Replace the font selection UI by a dropdown. Make the system generic
so that a dropdown can be used for any set of options.

task-1942241

closes odoo/odoo#32437

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-04-30 14:30:09 +00:00
Lucas Lefèvre 0d21735a92 [FIX] web: Send attachment ids on file loaded
This commit fixes a bug introduced when migrating
from jquery deferred to native JS Promises (ab56e63).

Steps to reproduce:
1. Go to the Expense app
2. Create a new expense
3. Click on "Attach Document" and upload a file
=> crash and infinite loading spinner

After loading files, the `attach_document` widget is
supposed to call a callback action with attachment ids
as argument.

Currently, attachement ids are not correclty retrieved.
They are retrieved via the `arguments` object but since ab56e63
`arguments` refers to the arguments of the Promise callback
function and no longer to the handler function `_onFileLoaded`
arguments.

closes odoo/odoo#33048

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-30 11:22:32 +00:00
Jinal Patel 91fd1cf202 [IMP] payment : make s2s card validation transaction optional
Currently, when some add token for s2s payment, dummy transaction of
1 unit was performed and it was frautrating for customer.

So added option on acquirer's settings that check if you want's
to validate the transaction or not.
If 'verify Card validity' is ticked on payment acquirer then and then
it will verify with dummy transaction otherwise it will not going to verify
the card details.

Task-1903170

closes odoo/odoo#29595

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-04-24 08:48:01 +00:00
Sébastien Theys f159ba8f31 [IMP] tools,website: correctly handle favicon and .ico files
Previously the image that we uploaded as a favicon of the website was not
resized, so it could be extremely excessive in size and resolution, and it also
was not guaranteed to be a square.

Now we always resize it appropriately and save it as an ICO file.

The default favicon is now applied to all websites instead of only the first.

task-1958000
PR: #31811
2019-04-29 13:45:34 +00:00
Sébastien Theys ec436c75e4 [IMP] website_sale: center images in cart popup and right panel
If the images are not all square, it looks better if they are centered.

task-1958000
PR: #31811
2019-04-29 13:45:34 +00:00
Sébastien Theys 0ab1940189 [IMP] base,web: adapt kanban image following image tools changes
Since the images are not guaranteed to be square anymore, the kanban image had
to be adapted to better handle the different image ratios.

Also the placeholder has been moved into the actual image div instead of
being a separate div that acted differently.

The avatar placeholder was white... displayed on top of white. Now it's grey
so we can actually see it.

task-1958000
PR: #31811
2019-04-29 13:45:34 +00:00
Sébastien Theys 7d3fe51100 [FIX] http,web,website_*: return the correct Content-Type for images
* = website_profile, website_slides

Before this commit, the returned Content-Type was not always correct, for
example if the image tool was changing the format, which happens when given
a BMP (converted to PNG), or other types being converted to JPEG.

The previous method `force_contenttype` was too specific and it wasn't available
in every controller. It didn't even need to be a controller method because it
didn't use self.

Now we create a generic helper to ease updating headers.
The Content-Type is only updated when it is safe to do. It is especially unsafe
for example for SVG files.

task-1958000
PR: #31811
2019-04-29 13:45:34 +00:00
Sébastien Theys 425f197f16 [IMP] tools,base,*: remove intermediary image functions
* = hr, im_livechat, mail, payment, purchase, web, web_editor, web_unsplash,
	website_profile, website_slides

Since the merge of all image tools into one function, the intermediary functions
are not needed anymore.

task-1958000
PR: #31811
2019-04-29 13:45:34 +00:00
Sébastien Theys e479138558 [IMP] tools,base: merge all image tools
Make the image tools more consistent and easier to maintain by having a single
function handling all the cases, instead of several functions doing more or less
the same thing with obscure differences.

Also introduce a new function to guess the size based on a field name, to be
used in the following commit.

task-1958000
PR: #31811
2019-04-29 13:45:03 +00:00
Sébastien Theys d870877967 [IMP] tools,base,web,website_*: keep image ratio on resize
* = website_partner, website_profile, website_sale, website_slides

Before
======

Since commit: 2e3848b394

The images that are resized have additional borders if the target ratio is
different than the image ratio. Those borders are transparent if the image
format supports it, and are white otherwise.

With that current solution, if the background where the image is displayed is
another color than white, it is looking really bad.

Moreover, most images are stored resized like this, so it is not even possible
to decide if it should have borders or not depending on the context, the
original image and ratio is forever lost.

It is also inconsistent because if the image is already smaller than the target
size then it doesn't include borders. In that case it keeps the original ratio
instead of the target ratio. So it isn't even guaranteed that the target
ratio is going to be respected.

After
=====

This commit will solve all of those problems by always keeping the ratio of the
original image.

This implies the views should be taking care of adding borders when necessary.

task-1958000
PR: #31811
2019-04-29 13:45:03 +00:00
Sébastien Theys b230114fcf [IMP] web,website_profile,website_slides: rename content and base64
There is a mix in the variable names: before this commit, what is called
`image_base64` is actually not base64 encoded, and what is called `content` is
actually base64 encoded.

The variables have been renamed to avoid further confusion.

task-1958000
PR: #31811
2019-04-29 13:45:03 +00:00
Sébastien Theys 433d007075 [IMP] tools,web_editor,web_unsplash: improve image optimize for web
This commit introduces the possibility to resize and to select the quality when
optimizing an image for web.

This will be used by the media dialog in a future commit.

The arbitrary resolution limit of 42e6 has been increased to 45e6 to fit some
of the biggest images we might get from Unsplash, and this value has been moved
into a variable so it can be customized.

The mimetype computation has been moved after the image processing because in a
next commit the operation could return the image in a different format than what
was originally given. Eg. BMP -> PNG, or unsupported format -> JPEG.

task-1958000
PR: #31811
2019-04-29 13:45:03 +00:00
jbm-odoo b8dd1b2ac5 [FIX] web: path computation issues on non unix platforms
closes odoo/odoo#32845

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-04-29 10:03:56 +00:00
Yenthe666 58294b451a [IMP] website_event_track: add activity view type on event tracks
closes odoo/odoo#30171

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-01-14 13:33:35 +00:00
mreficent b605f6d981 [IMP] mail: remove create_date from blacklist form view
closes odoo/odoo#28200

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2018-11-06 16:16:17 +00:00
Swapnesh Shah 638ef219eb [IMP] calendar: make method private
closes odoo/odoo#32932

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-24 18:59:56 +00:00
Yenthe666 1be517e9c4 [IMP] mass_mailing: improve sentences in help fields
closes odoo/odoo#32734

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-16 13:52:22 +00:00
Thibault Delavallée e87189222d [IMP] test_mail: add tests for mail gateway and perform light cleaning
This commit add some tests related to the mail gateway: more bounce management
tests and some additional thread formation tests. Some test asserts about
bounce / blacklist management are commented as they are not completely working
currently. This will be improved in master soon.

Some cleaning in also done in all mail gateway tests. Notably some call to
tool methods are cleaned / simplified, duplicate tests are removed. Some
low-level checks are removed.

A new test model is added for mail gateway: mail.test.gateway. It is a
chatter model with blacklist enabled on it. It allows to tests the
various blacklist-related overrides and features as well as all basic
mail gateway features.

Sub-part of task 1853147 (pre-cleaning before implementing mail gateway
improvements)
Linked to PR #32974
2019-04-26 10:28:09 +00:00
Thibault Delavallée 6aac6418fc [FIX] mail: fix unfollow through followers widget
Purpose: fix crash when removing someone from followers through UI.

Sub-part of task 1853147 (pre-cleaning before implementing mail gateway
improvements)
Linked to PR #32974
2019-04-26 10:01:44 +00:00
Thibault Delavallée c87b351855 [REF] fetchmail: clean and remove unnecessary code about mail.mail
Purpose: small cleaning of code linked to mail.mail model in order to
avoid unnecessary overrides

  * create mail: default_fetchmail_server_id in context should be sufficient
    as it is the base mechanism of default_get;
  * write: unused in codebase. Anyway we should not write on mail and if it
    is the case giving fetchmail_server_id directly should be the correct
    way of doing it;

In case of a clean_context use we might loose default_fetchmail_server_id
key. It is used notably for tracking message generation. In that case
this information could be lost. However the whole concept of propagating
a fetrchmail_server-id from incoming mail server to outgoing emails (as
mail.mail is used only for sending email) is strange and does not require
so much specific code.

Sub-part of task 1853147 (pre-cleaning before implementing mail gateway
improvements)
Linked to PR #32974
2019-04-26 10:01:25 +00:00
Romain Derie 01d1cf35bb [FIX] website_sale: fix pricelist GeoIP
Before this commit:
If the user was GeoIP located and it's pricelist (property_product_pricelist)
was not allowed for it's GeoIP country, that pricelist would still be return.

This issue was detected as a test `test_get_pricelist_available_geoip2` was not
working since forward ported in master (only on theme runbot or local..).

Before master (saas-12.4), `property_product_pricelist` would not be recomputed
once set, so the test was actually not working as expected.
Since master, reading `property_product_pricelist` just after setting it goes
through the compute method, resulting in different value than in previous
versions.

closes odoo/odoo#32961

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-26 08:02:07 +00:00
Victor Feyens 50caae5bc0 [REF] survey: replace dynamic survey.stage by a static state on survey.survey
Stages modification through the clickable statusbar wasn't very intuitive.
By fixing default behavior through states (and corresponding buttons), default user experience is simplified.

3 static states available : draft, open, closed

Form view: navigation through states with buttons
Kanban view: disabled modification of survey state

Task ID : 1949110

closes odoo/odoo#32325

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-25 14:17:45 +00:00
jpr-odoo 28e1686bc5 [FIX] calendar: add timezone info to avoid DST issue on recurrent events
As original timezone is not taken into account when computing recurrent event
time of a given recurrency change depending on the DST. This commit fixes that
behavior by correctly storing the event timezone and using it when computing
recurrency datetimes.

Related to task 30388

closes odoo/odoo#32950

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-25 11:59:32 +00:00
Jorge Pinna Puissant d80b607aa2 [FIX] mrp: bom structure & cost report indentation
When a product's name is too big, in the structure & cost report, the
product's name line go to the line automatically.

Before this commint, the indentation applied on the products in the
report was only applied on the first line of the product's name.

Now, the indentation is applied on all the lines of the product.

opw-1966440

closes odoo/odoo#32945

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-04-25 09:14:13 +00:00
Jaydeep Barot d153e950e7 [IMP] account, purchase, sale, repair: sync tree & form readonly views
This commit synchronises the editable tree view and the form readonly view of
the following objects:

- account.invoice.line
- purchase.order.line
- sale.order.line
- repair.line

Task-1912608
Closes : #29566

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-11 08:37:31 +00:00
Rishabh Jadia 535db7a9ac [FIX] layout: increase font size of boxed layout.
While printing the reports using boxed layout, the font-size is bit smaller
and the report does not look so good. This commit improves the boxed layout
by slightly increasing the font-size.

Task id: #1931768

closes odoo/odoo#30497

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-01-25 08:47:15 +00:00
dbhandqsm-odoo 6af61e81a9 [IMP] web_tour: review consume event for m2x widgets
Tour steps on m2x widgets are now consumed only when an actual record
is selected (not on random click on the widget).

closes odoo/odoo#21625

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-04-24 15:17:42 +00:00
qsm-odoo b94395b501 [IMP] web, *: share and improve notification system
* barcodes, calendar, partner_autocomplete, web_settings_dashboard

Make the notification system better, using bootstrap toast component,
and make it available in the frontend.

The toast component allowed to remove some JS code and made the
component customizable by themes but it had to be reviewed/fixed to make
it functional (maybe bootstrap will review its work in next versions).

This work should still be improved because there are still too many
ways (deprecated and not deprecated) to instantiate toasts in the
backend. The goal here was however to make the toasts more modern and
make them available in the frontend.

This work is needed for some tasks. @kig-odoo and @fja-odoo made a
pre-work to instantiate toasts in the frontend for their respective
tasks. This commit unifies the system.

Part of https://github.com/odoo/odoo/pull/32793
task-1970731

closes odoo/odoo#32793

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-24 13:21:41 +00:00
qsm-odoo 09c3df17cd [REF] web: reorganize assets_common scripts order
Just reorganize the files by alphabetical order and group them by
folder (core / services / ...) and move the libs on top.

Part of https://github.com/odoo/odoo/pull/32793
task-1970731
2019-04-24 10:16:26 +00:00
Arnaud Baes 1a727ed5fc [IMP] stock: Add hybrid procure method 'mts_else_mto'
In some occasions, products can be available in a location,
but are still ignored when the MTO is set on those products.
(e.g.: When a product is returned)

To avoid this, we add a `procure_method` named `mts_else_mto`,
allowing procurement to reserve the products if enough of them
are available in his source location.
In order to achieve this,  we apply the MTS or the MTO `procure_method`
on the moves from the procurement depending on whether or not there are
enough quantities of the needed products in the source location
('All or nothing' logic).

Quick performance test:

With a Sale Order of 800 differents products set as MTO+Buy,
Half of these products available in stock.
Before the patch :
2m30s to confirm the SO (800 PO Lines created)

After the patch:
MTO (procure method MTO):
2m30s to confirm the SO (800 PO Lines created)
MTO (procure method MTS_ELSE_MTO):
2m26s to confirm the SO (400 PO Lines created)

TaskID: 1831347

closes odoo/odoo#32778

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-24 13:22:50 +00:00
Axay Javiya eda806a40e [IMP] mail: add an option to preview templates in a specific language
Purpose: allow to check email preview in a specific language in order to see
the result in a given translation context.

Specifications

  * added preview_lang field to change language of template
  * set default language from the template by evaluating expression if lang field of template is set,

This commit is related to task ID: 30245

closes odoo/odoo#19165

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-24 13:35:04 +00:00
Nimesh Jethva 916639de6a [IMP] crm(_*), sales_team : another round of sales team/channel renaming
Rename model description, field strings & filter names from "Sales Channel"
to "Sales team". From section to team [1], from team to channel [2],
from channel to team [3], then re-adding channel naming [4][5], now back to
team.

Related to task 1929561
Linked to PR #30335

[1] https://github.com/odoo/odoo/commit/fd659e908be0cc598b8a8af46b066f914dbb03d7
[2] https://github.com/odoo/odoo/commit/eed8a3468639aff82360a7552f9c7a1216b89345
[3] https://github.com/odoo/odoo/commit/384647e58326476d5e68d2ecb5230cb6678a3fdb
[4] https://github.com/odoo/odoo/commit/71820dbc20313dfbacc56277b197b267ac81b7a4
[5] https://github.com/odoo/odoo/commit/44fd3bc8082205290e38de183d092b42c02c8215

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-24 13:26:21 +00:00
Martin Geubelle e8c4ecd3d4 [IMP] web: disable cache in debug assets
When altering a view (regular or wizard's) in code/file (rather than via the
client's interface) and restarting the server view caches don't get cleared and
it's necessary to reload the entire client before the changes can be seen.

This is annoying, and sometimes confusing so the cache is now disable in debug
assets.

Task 1911601

closes odoo/odoo#31667

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-07 15:02:37 +00:00
Juhil SomaiyaandMohammed Shekha 5dc971b1ae [IMP] web, *: add a description to generic widgets
A `description` key has been added on AbstractField and all generic
field widgets ; it is used to display a more user friendly name (both in
the webclient and in Studio).

Non-generic field widgets have an empty string as description.

Related task 1918327

closes odoo/odoo#30131

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-04-24 09:57:56 +00:00
Martin Geubelle 0aa4906843 [REF] web, *: remove one2many_list widget
This widget was exactly the same as a `one2many` and was kept for backward
compatibility reasons. It can be safely removed in master.

Related to task 1918327
2019-04-24 08:04:39 +00:00
svs-odoo a765a38edb [MOV] mrp_account: merge with mrp_bom_cost
Merges mrp_bom_cost into mrp_account since they have both the same
depedences.

Task #1964809

closes odoo/odoo#32722

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-24 08:13:56 +00:00
Julien Giannone e5479fcfdb [IMP] mail: prevent message loss during connection issue
Before the changes, when a message was posted (on Discuss or in
the chat window), the composer was cleared directly as it didn't
wait for the rpc response. If there was latency or a connection
loss, the message disappeared from the composer but took time to
appear in the content window or didn't appear at all and was lost.
Now, the composer waits for the rpc response and then is cleared.

Task #1957856

closes odoo/odoo#32422

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-23 12:05:31 +00:00
9b90d8727d [IMP] web: enable drag&drop in ungrouped kanban views
With this rev., the resequencing feature (with drag and drop) that
was already available in list views is now available also in kanban
views having a field with widget="handle". This works for main as
well as x2many kanban views.

Some code handling the resequencing has been moved from the list
components (controller and renderer) to the basic ones, so that the
logic is shared between list and kanban.

Task 1902808

closes odoo/odoo#28581

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-04-23 13:45:15 +00:00
jpr-odoo ee0a5ca449 [MOV/IMP] web, mail: update attachment widget and moved the common scss code from mail to web
with this commit, we have updated the attachment widget view same as like chatter attachment view
moved the common scss code from mail to web for many2many_binary widget, which is used for attachment
and update test case according to the widget

Task ID: 1930087
2019-04-12 09:04:28 +00:00
jpr-odoo d6d7554a6e [IMP] account: improvement into the invoice mail template
with this commit, we have added  comma ',' after the name of the customer

Task ID: 1930087
2019-04-12 09:04:27 +00:00
jpr-odoo caad35c29c [IMP] account, sale: improvement into the invoice report view
with this commit, changed the label of 'Shipping address' => 'Shipping Address' and removed 'Reference'
into the printed invoice report for a portal view

Task ID: 1930087
2019-04-12 09:04:26 +00:00
jpr-odoo 3d204d063f [IMP]account, website_sale: improvement into the invoice form view
with this commit, we have restructured 'other info' tab with few fields and updated the tooltips
and update the 'XPath' regarding the new restructure

Task ID: 1930087
2019-04-12 09:04:26 +00:00
Thibault Delavallée a7ac71ed44 [FIX][IMP] various: perform small cleanup of mail templates
Notably
 * remove cdata and fix html code when necessary;
 * re-order fields declaration to have globally the same order in various
   template definition;
 * remove unnecessary reply-to, make user signature and auto delete fields
   explicit when necessary;
 * improve some name to ease template ordering and understanding in the
   template list view;

Related to task 1972615
Linked to PR #32872

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-23 14:26:50 +00:00
Thibault Delavallée 678e04c19d [FIX][IMP] various: improve lang computation in mail templates
Purpose: add lang definition on templates where it is missing

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Thibault Delavallée 0b74c9ab6e [FIX][IMP] various: improve recipients computation in mail templates
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.

Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00