Commit Graph
126133 Commits
Author SHA1 Message Date
Pratima Gupta ba5a2b47ac [IMP] base: Allow to sum fields on partner merge wizard
When merging 2 partners, we could want to sum fields instead of
keeping one of the values. Example: Loyalty Points

This commit adds the necessary support to achieve this.

This commit is related to task #1869488.

closes odoo/odoo#30141
2019-02-13 10:35:42 +00:00
Robot Odoo 2d3dbff965 [IMP] web, *: remove explicit references to session_id
Before this rev. the `session_id` was provided by the server to the webclient (in
session_info, mostly) and was stored and accessible. This made XSS injection more
dangerous than they should be as it was very easy to steal the `session_id`.

As the browser automatically set the `session_id` on every request to the server,
the webclient shouldn't need any explicit reference.

Since rev. odoo/odoo@f4d541e the `session_id` cookie uses the `httponly` flag so
it cannot be accessed through client side script.

Task 1905359

closes odoo/odoo#30098
2019-02-13 14:16:25 +01:00
Prakash Prajapati 984bf2492a [IMP] product: Use the vendor code in 'Customer Ref' if set
Currently the 'partner_ref' field is used when generating purchase orders
lines. It computed like this:

Customer Ref : Vendor Product Name on the supplier info
            OR internal reference of the product
            OR product name

As we can set an alternative internal reference for the vendor,
that should be used instead of the internal reference of the product,
this commit will compute it as follows:

Customer Ref : Vendor Product Name on the supplier info
            OR vendor product code on the supplier info
            OR internal reference of the product
            OR product name

closes odoo/odoo#28573
2019-02-13 09:43:36 +00:00
Martin Geubelle 7abeaf56b3 [REF] im_livechat, *: remove JSONP in favor of CORS
When embedding the livechat on an external website, we used to make JSONP calls.
As the support of JSONP calls has been dropped, we now use the CORS mechanism
instead.
2019-02-13 09:38:30 +00:00
Martin Geubelle 06de564074 [REF] web, *: remove JSONP support
JSONP can be entirely replaced by the CORS mechanism, which is simpler.
We support CORS in our routes since 8.0 (odoo/odoo@9cce88a), so it's about time
to get rid of JSONP.
2019-02-13 09:38:30 +00:00
Martin Geubelle 016f9612ba [REF] web: clean ajax and session 2019-02-13 09:38:30 +00:00
Martin Geubelle 31664422c1 [IMP] web, *: remove explicit references to session_id
Since rev. odoo/odoo@f4d541e the `session_id` cookie uses the `httponly` flag so
it cannot be accessed through client side script. But before this rev. the
`session_id` was still provided by the server to the webclient (in session_info,
mostly) and was stored and accessible. This made XSS injection more
dangerous than they should be as it was very easy to steal the `session_id`.

As the browser automatically set the `session_id` on every request to the server,
the webclient shouldn't need any explicit reference.
2019-02-13 09:38:30 +00:00
Prakash Prajapati 30128860da [IMP] sale,purchase,...: Improve description of demo data product
Purpose of the task is some demo data values are not matching with the products
mentioned so update the demo data values with matching product.

Task: 1892754

closes odoo/odoo#28573
2019-02-13 09:20:25 +00:00
Luis Torres 25bb9eab17 [master] hr_expense: Make consistent selection field
The field payment mode in the expense sheet is related with the same
field in the expense, but this must be consistent, and if a new option
is added in the expense must be considered in the sheet.

In Odoo v11 > is not necessary indicate the selection parameter in the
field definition.

closes odoo/odoo#30933
2019-02-12 23:43:26 +00:00
Arnold Moyaux 9f5de8b116 [IMP] stock, mrp: report forecast cell clickable
closes odoo/odoo#30464
2019-02-12 12:12:14 +00:00
Hetashree Chauhan d3f14f6a1d [ADD] stock: Report Forecasted Inventory
Purpose of this task:
Show forecasted inventory for all products.
Before this commit we have to search forecasted inventory for each product individually.
There is no way to check all the forecasted inventory in a single menu.

After this commit:
User can search for all forecasted inventory from the menu 'Forecasted Inventory'.
Features added.
1. Menu for Forecasted Inventory has been added.
2. Default measures has been set to 'Quantity' and 'Cumulative Quantity'.
3. Pivot view is grouped by product (vertical) and by weeks (horizontal).

Why query changes required:
User can search for all forecasted inventory from the menu 'Forecasted Inventory'.
Features added.
1. lines only those containing any stock move will be shown.
2. Reference field added.
3. We remove 'week' from the query, instead of we fetch all the data according to 'date_expected',
and we create three group_bys (i.e. group by date, week and month)
so it is easy for the user to check report according to day, week and month.

This commit is related to task 36088.
2019-02-12 12:12:14 +00:00
Thanh Dodeur 0284e5f3fd [REF] account: prepares hooks for reconciliation requests
This commit changes some methods so they can be used in the account_documents enterprise bridge
and adapts activity tests for the new request on upload_file feature.

task: #1928404
related to: odoo/enterprise#3607

closes odoo/odoo#30950
2019-02-11 14:33:15 +00:00
Aurélien Warnon 9352bb682f [IMP] website_slides: improve channel's "members_count" computation
Task #1937160

Purpose
=======

Performance improvement:

The members_count computed field now uses a compute_sudo with
a read_group allowing to compute all the members_count of the recordset
in a single query.

closes odoo/odoo#31013
2019-02-12 09:22:29 +00:00
Prakash Prajapati 3259bad899 [IMP] sale: Improve invoice order wizard
Improve wording of invoice modal.

Task:1939613

closes odoo/odoo#31011
2019-02-12 08:39:20 +00:00
William Henrotin 3989661c1f [REF] delivery: new delivery carrier wizard
Adapt external carriers tests by using the new delivery wizard in sale order.

Task : 1908654
2019-02-11 13:56:36 +00:00
William Henrotin a1f22d599d [FIX] website_sale_delivery: remove unused variable
3bf8e75379 changes the only call to
has_delivery to a check on another variable. This commit removes
the field from the model as it's now useless.

Task : 1908654

closes odoo/odoo#28976
2019-02-11 13:55:55 +00:00
William Henrotin de88a727b2 [REF] delivery: new delivery carrier wizard
On a sale order, the delivery carrier choice was done directly
on the form view. To get an estimated delivery price, the user need to
click 'add to order' to create a delivery fee line. To get the exact
delivery price on the sale order, the user needed to leave the sale
order without delivery line in order to get the exact price from the
picking at its validation.
As this flow was not so clear, this commit adds a new wizard to choose
the delivery carrier and check its commition fees. This add a line in
any case.

The wizard will be launched from a new button on the sale order

Task : 1908654
2019-02-11 13:55:55 +00:00
William Henrotin 8938afa3f6 [IMP] delivery: invoicing policy of delivery price
The delivery carriers get a new field to specify the invoicing
policy. The two cases are :
  - Estimated cost: the delivery price is charged directly on
the sale order based on the estimated fee
  - Real cost: the delivery price is estimated from the sale order
but not added in the delivery line (we get a line with quantity=1 and price = 0).
Once the delivery is validated, the delivery price is recomputed.
The new price depends on the integration level. If it's 'rate', the price is
the estimated one (carrier.rate_shipment()). If it's 'rate_and_ship, the price
is the one given by the carrier at the delivery

The bases carriers (fixed_on_rule and base) always use 'Estimated Cost'
as their price should not be changed between the sale order creation
and delivery validation

Task : 1908654
2019-02-11 13:55:55 +00:00
Robot Odoo 8b7605c9e5 [MERGE][ADD] website_slides_sale: allow to sell slide.channel
Purpose of this merge is to be able to sell courses [1] when using the
slides / eLearning platform.

This commit adds sale capabilities on a slide.channel. A slide.channel can
now have the 'payment' visibility, that requires a 'product_id' configured
on the channel.

When a customer purchases a product linked to a channel, he is added to the
members of the channel (see slide.channel.partner_ids) when his order is
confirmed.

This merge is linked to task ID 1937160 and PR #30914. Future tasks will
improve homepage of channels and clearly show public, private and payment
based channels [2].

[1] see task ID 1902304 (main eLearning task) PR #29876;
[2] see task ID 1936153 (new homepage for slides) PR #30770;
2019-02-11 20:29:40 +01:00
Aurélien Warnon a15810e0c2 [IMP] website_slides: add a setting to install website_sale
Purpose
=======

With the new 'website_slides_sale' module users can now sell slide.channels.

This commit adds a setting to let the user know he has to install website_sale
to be able to sell courses / documentation.
2019-02-11 17:47:35 +00:00
Aurélien Warnon e5536fc07b [IMP] website_slides: add invite wizard for 'invite' slide_channel
Purpose
=======

Currently, the slide_channels having a visibility configured as 'invite' could
only add members manually.

This commit adds an 'Invite' button on top of the slide channel form that opens
a wizard allowing to send emails to contacts and also make them members of the
related slide channel.
2019-02-11 17:47:22 +00:00
Aurélien Warnon 779d9c9b90 [IMP] website_slides: add a "Attendees" stat button on slide.channel
Task #1937160

Purpose
=======

This commit adds a "Attendees" stat button on the slide.channel form view
showing the members (partner_ids) count.

On click, it redirects to a tree view of slide.channel.partner. The tree
view is configured as editable to be able to administrate members
(add/update/delete).
2019-02-11 17:47:10 +00:00
Aurélien Warnon 9b7bee73e5 [ADD] website_sale_slides: allow to sell slide.channel
Task #1937160

Purpose
=======

This commit adds sale capabilities to a slide.channel. A slide.channel can
now have the 'payment' visibility, that requires a 'product_id' configured
on the channel.

When a customer purchases a product linked to a channel, he is added to the
members of the channel (see slide.channel.partner_ids) when his order is
confirmed.

The feature is added in a new module 'website_sale_slides' that comes as a
bridge auto-installed between 'website_slides' and 'website_sale'.

The final goal is to be able to sell "courses" (see task #1902304).
2019-02-11 17:46:40 +00:00
Christophe Simonis 6e8dff1952 [FIX] purchase: correctly extract date from datetime
Oversight of previous forward-port
2019-02-11 14:23:33 +01:00
Nicolas Martinelli 44b791f5d7 [FIX] hr_expense: multi-currency
- Set your company to USD
- Create an expense in EUR:
  Amount: 100
  Tax: 15% Excluded
- Validate, post the journal entries

It crashes because of a missing `.id`, but on top of that... not a
single AML is correct.

opw-1938570

closes odoo/odoo#30987
2019-02-11 12:44:06 +00:00
Christophe Simonis 75eec26da3 [MERGE] forward port branch saas-11.3 up to 728bb2a28e 2019-02-11 12:47:52 +01:00
Nicolas Martinelli f221936f8b [FIX] stock: location company
Force the location and destination location's company to match with the
picking and picking type company. This is to prevent users to move
products between companies without using a transit location, since stock
valuation is not supported.

The record rule `stock_location_comp_rule` gives access to children
companies. The domain added in the view is more restrictive, and allows,
for a company A, transfers from locations:
Company A -> Company A
Company A -> No Company
No Company -> Company A

opw-1893276

closes odoo/odoo#30952
2019-02-11 11:14:26 +00:00
wan fb8126ddd7 [IMP] l10n_be: change default taxes
Task 1939277
The default tax  TTC (in l10n_be) generate errors in the new business game, need to change that

closes odoo/odoo#30990
2019-02-11 10:34:26 +00:00
Christophe Simonis 1738fbb67e [FIX] test_mail: only patch message_track for test model 2019-02-11 18:35:50 +01:00
Christophe Simonis 8c29df10e0 [MERGE] forward port branch saas-12.1 up to 93d736e905 2019-02-11 17:00:35 +01:00
Nikunj Ladava 0e71f91fa1 [ADD] payment_payulatam: Add new payment acquirer for Latin America
TaskID 1826303

closes odoo/odoo#24802
2019-02-11 11:36:14 +00:00
Robot Odoo 890e47ea7f [MERGE][REF] website_slides: prepare channel model to eLearning
Purpose of this merge is to prepare eLearning feature by already modifying
channel model.

It includes

 * addition of tag and tag groups on channel, allowing to filter and search;
 * addition of statistics computation on channel, notably tracking completion
   of users;
 * removal of promoted slide feature and addition of specific image field
   on channel;

This merge is related to task ID 1936153 and closes PR #30985. More
generally this merge is linked to ongoing tasks

* task ID 1902304 (main eLearning task) PR #29876;
* task ID 1922159 (new user profile and gamification) PR #30514;
* task ID 1937160 (payment flow and integration with ecommerce) PR #30914;
2019-02-11 12:57:57 +01:00
Robot Odoo 47bb7ef796 [MERGE] mail, hr_holidays, *: add out of office status
*: base, bus, mail_bot, test_mail

Before this task, it was not easy to tell when a user is not available (or is on holiday)
from conversations, such as from chat windows.

With this task, a user can now tell that he is out-of-office from the user menu preferences,
by defining an an out-of-office message. This information will be displayed to other users from
chat conversations and mention suggestions (i.e. with `@`).

Also, the computation of the user `im_status` has been changed when he has an active leave:
an out-of-office message can be set on the leave, and this will be displayed on conversations
instead of the user's out-of-office message from the user menu preferences.

Task: 1856205

closes odoo/odoo#29974
2019-02-11 12:57:48 +01:00
Robot Odoo 768844040f [MERGE][IMP] sale: improve usability of down payments
Task #1908673

Purpose
=======

The "invoice" modal is too complex to use for new users and has a lot of useless options for
the most simple use cases.

The goal here is to remove 2 options of the 'advance_payment_method' field:
* Invoiceable lines
* Invoiceable lines (deduct down payments)

And combine them into a new one: "Standard invoice".

If there are any down payments to deduct, another checkbox field appears under this
one: "Deduct down payments".

This keeps all the invoicing features while simplifying the modal.

Spec
=======
* Remove "invoiceable lines, deduct down payment" and replace by a checkbox
  (checked by default, only visible if down payments to deduct)
* Rename "Invoiceable lines" into "Standard invoice"
* tooltip on radio buttons: A standard invoice is issued with all the order lines ready for invoicing,
  according to their invoicing policy (based on ordered quantity or on delivered quantity).

closes odoo/odoo#29978
2019-02-11 11:41:50 +01:00
shreya thakrar 0993546553 [FIX] web: improve visual glitch for 'many2many_tags' field widget on settings view
- For 'res.config.setting' view, when there is a field with
'many2many_tags' widget, a drop-down is not displayed
properly. (For example, see 'default_cashbox_lines_ids'
field from point_of_sale module)

 - This commit fixes the above visual glitch by properly displaying
the field having 'many2many_tags' widget on settings view.

Task id - 1935608

closes odoo/odoo#30956
2019-02-11 10:25:02 +00:00
XavierDo d3b2da41b7 [FIX] note: display date picker in activity menu
The date picker should be displayed when clicking on the fa-calendar
when creating a note from activity systray.

The test was missing the assertion checking that the date picker was displayed,
but fixing this issue breaks the test. The datepicker looks to be
asynchronously initialized, and the blur event raises an error because of
that. Since it is difficult to test external libs behaviour, this
step is simply removed from the test.

Task: 1942850

closes odoo/odoo#31241
2019-02-19 11:52:23 +00:00
Thanh Dodeur d12c993a28 [FIX] mail: chatter attachments without thread
This fix prevents the chatter and attachment box
from assuming that there is a mail_thread on the record;

Reason: if a chatter is set on a record that doesn't inherit
mail_thread, the attachment box will generate errors.

closes odoo/odoo#31206
2019-02-19 07:49:45 +00:00
jbm-odoo 8a4fe6d756 [FIX] l10n_it_edi: Relax zip check for non-Italian buyers.
With Italian localization, the length of zip must be 5 for Italian buyer.
If the buyer is not Italian, we doesn't check his zip length.

closes odoo/odoo#31205
2019-02-18 15:28:23 +00:00
Aaron Bohy 9ba75cd7f4 [FIX] project: remove duplicated step in tour
closes odoo/odoo#31146
2019-02-15 12:18:16 +00:00
qsm-odoo 976b65c31c [FIX] website_sale: correct 'border_primary' color
Some elements in the eCommerce are styled using the 'border_primary'
class. The color used by the class is however the wrong one, as it was
set to the odoo purple while it was meant to be the theme primary color.
This commit fixes the color.

Note that BS4 has an equivalent for that class (.border.border-primary)
but as this is a stable fix, it was not changed. It will be adapted in
master with https://github.com/odoo/odoo/pull/31147

closes odoo/odoo#31214
2019-02-18 16:16:48 +00:00
Nicolas Martinelli b04d78000f [FIX] point_of_sale: barcode and ENTER key
- Set a barcode for a product A
- Open the POS interface
- Click on a product B => it is added to the order
- Scan product A

Product A is added to the order, but a unit of B is also added.

Commit 9de1bc0eef introduced keyboard shortcuts in the POS
interface. In particular, when a product is selected, pressing the SPACE
or the ENTER key adds it in the order. Since the barcode scanner sends
an ENTER key as a final character, it triggers the addition of both
products.

opw-1934520

closes odoo/odoo#31185
2019-02-18 10:00:20 +00:00
Nicolas Martinelli ad3207c1ff [FIX] hr_attendance: multiple clicks
- Have a slow network
- Click multiple times on the 'Check-in' button

Multiple attendances are created.

The view refactoring introduced in 9de1bc0eef changed the
element to a `<a>` tag, on which the `disabled` attribute has no effect.

We introduce a `debounce` instead.

opw-1941647

closes odoo/odoo#31178
2019-02-18 08:57:43 +00:00
Nicolas Martinelli 9f2e1f59d9 [FIX] hr_payroll_account: payroll precision
When the Payroll precision is higher than the currency precision,
accounting entries are inconsistent: debit or credit fields use the
payroll precision, while the balance uses the currency precision.

We make the AML consistent by forcing the currency precision.

opw-1924360

closes odoo/odoo#31131
2019-02-15 09:25:22 +00:00
Nicolas Lempereur 03ea5f9fdd [FIX] webite_sale: "Return to Cart" translatable
opw-1942133
closes #31209
2019-02-18 14:53:02 +00:00
Martin Trigaux c844d66091 [ADD] base: add Arabic and Bengali languge
Now that we have proper support for RTL language, add an Arabic language with
code "ar" (while the only possiblity before was ar_SY).
Use ar_AA code as Arabic unitag.
In master, the ar_SY could be removed as no need to have both.

Add Bengali language
Fixes odoo/odoo#31165

closes odoo/odoo#28640
2019-02-18 09:53:35 +00:00
Xavier Morel 8b5399c476 [FIX] web: properly destroy services in test mock
closes odoo/odoo#30793
2019-02-18 09:46:49 +00:00
Xavier Morel 005164d237 [FIX] web: AbstractStorageService should destroy its storage
If that storage is destroy-able (aka RamStorage), storage objects are
created "inline" without attachment (as they may or may not be parented)
and this means those created implicitly in tests can't be tracked and
cleanly destroyed even by destroying the storage service object.

closes odoo/odoo#30790
2019-02-18 09:34:14 +00:00
Thibault Delavallée 7b81df3747 [REF] website_slides: remove promoted slide feature, add image and channel_type
Purpose of this commit is to clean a bit channel model. Promoted slide
feature is removed as people can already choose an order for a given
channel. Moreover promoted slide will not be used when having a eLearning
display of a channel.

Image field on channels is added as it is not depending on promoted slide
anymore.

To simplify future additions a search-specific template is removed to
have a unique template to display a channel content. It will ease future
merge.

This commit is linked to task ID 1936153 and PR #30985.
2019-02-11 09:55:15 +00:00
Thibault Delavallée 7ee22f1219 [IMP] website_slides: improve and add statistics computation
Purpose of this commit is to add some statistics computation on slide.channel
model. We want notably to have a count of views and votes (likes and dislikes)
on channels. Completion is also computed.

Purpose is to be able to search and order channels based on those statistics.
Having stored computed fields for some statistics help achieving that purpose.

Tests are added.

This commit is linked to task ID 1936153 and PR #30985.
2019-02-11 09:55:12 +00:00
Thibault Delavallée cbc2de0eb6 [IMP] website_slides: add tags and tag groups on channel
Purpose is to be able to filter, search and categorize channels. Notably
with eLearning in mind there will be more channels as a channel will also be
used to hold lessons.

For that purpose we add a model of tag linked to channels. Those tags are
organized by groups in order to be able to display them using a menu or
a small hierarchy of tags. Displaying a tag group as a specific navigation
element is controlled by a specific field.

Those models will be used to display a new and improved home page for
channels / courses.

This commit is linked to task ID 1936153 and PR #30985.
2019-02-11 09:55:05 +00:00