Commit Graph
129975 Commits
Author SHA1 Message Date
Gert Pellin bc863ef4a5 [FIX] pos_restaurant: transfer empty order
Before this fix, if an empty order gets transfered to another table, the
screen gets stuck on the floorplan until the window is refreshed.
With this fix the new table is opened.
2019-09-13 10:05:44 +00:00
Gert Pellin ff4e4d8985 [IMP] point_of_sale: Connected devices strings
replace 'Other Devices' with 'Connected Devices'
2019-09-13 10:05:43 +00:00
Gert Pellin c32558e5e4 [FIX] pos_sale: traceback on installing sales
If a pos session is started in the automatically created pos config and the sales app is installed afterwards,
a traceback will be shown. This is because pos_sale tries to make
changes to the config, which are not allowed.

We removed the hardcoded team in data, and manage the default value
in an onchange on the company_id to keep a consistant team.
2019-09-13 10:05:31 +00:00
Simon Lejeune e4cba4d037 [FIX] purchase_requisition: supplier info
When a blanket order is opened, a supplier info is created and should be
used in priority over a regular supplier info with the same values.

That's what rev [0] tried to do but there was some mistakes: the
`purchase_requisition_id` field added in the order is ignored since it
isn't stored and the test didn't failed because the created blanket has
a lower price unit than the regular supplier info, meaning it is used in
priority. Setting the same price unit (50) result in the new purchase
order line merged in the first one.

Do not re-implement the same order.
Adapt the test now that we know the order didn't work (see rev[1]). The
user has to manually set a higher priority to the supplier info
generated by the purchase requisition.

[0] e85838d358
[1] 2ac4f2ee0f

closes odoo/odoo#36840

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-13 10:09:40 +00:00
Simon Lejeune 3f0ed7d045 [FIX] product: _select_seller
With the new ORM, x2m records are not ordered by default.

The _select_sellers implementation requires to loop on the supplier info
records ordered by their _order. We fix that by sorting with a lambda
with the same order set on the model. Simply using .sorted() isn't
enough since it does a sort in sql, so newId records are completely
removed from the resulting recordset.

This is related to task 1947351 and PR 34049.

We move the tests into purchase_stock and actually implement the tests
proposed in the task.
2019-09-13 10:08:48 +00:00
RomainLibert 4c9624db9d [FIX] web: add context to /report/download
This commit fixes the /report/download route in multicompany

Since the multi company revamp (a5b6f31cf2)
the multi company rules depend on the context.

However the route /report/download was not forwarding any context, this meant
that when trying to read some fields on a record in a company that is different
than the default one, it would crash with the multi company ir.rule

Forwarding the context from the session in the Javascript call is quite simple
however since (521f7d36c1) it also requires to change
the signature of the `report_download` method in order to pass the context to the final
method.

As there was already some code allowing the adding of some context in `report_routes`
this PR reuses this code by simply passing the context as a kwargs.

closes odoo/odoo#36839

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-13 10:00:34 +00:00
Simon Lejeune f6d88a2e8d [FIX] stock: put in pack without showing the reservation
rev[0] added the possibility to put in pack without setting any done
quantity on move lines but when the reserved move lines are hidden
(thanks to rev[1]) it got confused on which move lines to work on.

[0] e03c1a836f
[1] ffd5d5a097

closes odoo/odoo#36832

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-13 09:37:32 +00:00
wan 8d7837c035 [FIX] account: removing a line produced by a model
If a line was produced by a reconciliaion model, it shouldn't be put back
in the reconciliation propositions because a rpc request would not give
it back. Also, the line is not correctly formatted.

closes odoo/odoo#36826

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-09-13 08:57:17 +00:00
wan afb352cf8b [FIX] account: focus and click concurency in reconciliation widget
When trying to edit the amount of a proposition of an inactive
statement, the focus of the line tried and the edition of the amount
were racing one against each other causeing flickering and making it
hard to edit the line.
We removed the focus as it was intended for the keyboard navigation but
it was not fully usable, so we also removed the accesskey needed for the
focus.
2019-09-13 08:43:59 +00:00
RomainLibert 247df46453 [FIX] hr: remove duplicate group
This duplication was introduced by a forward port

closes odoo/odoo#36841

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-13 10:13:21 +00:00
Odoo's Mergebot d0e6c5fb37 [MERGE] survey, website_slides: fix various issues
PURPOSE

Fix various issues in eLearning application after new round of testing
and bug hunt. Some surveys fixes are included as they are used a lot
in eLearning.

SPECIFICATIONS

[FIX] mail: remove channel and partner default context keys when creating
  followers
[FIX] survey: fix another crashing computed field
[FIX] survey: set email_from on certification mail template
[FIX] website_profile: fix another broken image thingy
[FIX] website_slides: make content stat button redirection match counters
[FIX] website_slides: remove unnecessary action
[FIX] website_{slides, profile}: fix display of not square user image
[FIX] website_slides: avoid admin being twice member of courses in demo data
[FIX] website_slides: still another fix of computed fields
[FIX] website_sale_slides: synchronize publish status of a channel and its
  product
[FIX] website_slides_survey: create certificates with scoring by default

See sub commits for more details.

LINKS

Task 2065425 (avatar ratio badly displayed)
Task 2067324 (counters / action on content mismatch)
Task 2067872 (eLearning internal testing)
Task 2058598 (survey internal testing)

closes odoo/odoo#36756

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-13 13:10:57 +02:00
Thibault Delavallée 6e5b211f4e [FIX] website_slides_survey: create certificates with scoring by default
Certificate field is not sufficient, scoring type should be set by default
to avoid creating non certificates without knowing it.

Task 2067872 (eLearning internal testing)
Task 2058598 (survey internal testing)
PR #36756
2019-09-13 10:05:43 +00:00
Thibault Delavallée 0b4d052bb5 [FIX] website_sale_slides: synchronize publish status of a channel and its product
Currently when creating a payment-based channel with its product and then
publishing the channel public users cannot browse the channel as the product
is not readable.

This commit fixes that by synchronizing the publish status of channels and
their products.

Task 2067872 (eLearning internal testing)
PR #36756
2019-09-13 10:05:43 +00:00
Lucas Lefevre 290341b455 [FIX] website_slides: still another fix of computed fields
This commit fixes 2 issues coming from the recent ORM changes: records are
new records in onchange and compute methods must assign a value for all records.

In an onchange method, self.ids is a list of integer (real records)
whereas self.id is a NewId (virtual record)

Here a result dict was built using the reals ids as keys but later NewIds
are used as keys. Solution is to use record._origin to access the real record.

Moreover, the two dicts `result` and `type_stats` are the same. Assigning one
into the other is useless.

Task 2067872 (eLearning internal testing)
PR #36756
2019-09-13 10:05:43 +00:00
Thibault Delavallée 0eec4d22a2 [FIX] website_slides: avoid admin being twice member of courses
Since admin is responsible of all created demo channels and then re-added
manually as member in demo data of slide.channel.partner he is actually
twice member of some channels. This commit fixes that by resetting its
membership status before adding membership demo data.

PR #36756
2019-09-13 10:05:43 +00:00
Thibault Delavallée 98f847be3a [FIX] website_{slides, profile}: fix display of not square user image
When having not square images for user avatar several issues appear

  * website_slides: heroes of the week banner is broken as circles are not
    circles anymore. They look more like UFOs or funny snowmen;
  * website_slides: my user status / leaderboard / achievements card display
    is broken as image may take much more width than planned;
  * website_slides: channel page view displays user avatar when having joined
    it, and it is broken;
  * website_profile: user avatars in top 3 of users karma ranking is broken.

In this commit we apply strict rules on width / height combined to an object
fit in order to always have a bioutifoul displayed circled image.

Task 2065425 (avatar ratio badly displayed)
PR #36756
2019-09-13 10:05:15 +00:00
Thibault Delavallée 477b73ed31 [FIX] website_slides: make content stat button redirection match counters
Course content counters count only published content while content stat button
redirects to all contents. Solution to this mismatch is to apply a search
filter on button action to display published ontent by default.

Also remove unnecessary action. Using a type="edit" seems sufficient, no need
to define a python method just for that purpose.

Task 2067324 (counters / action on content mismatch)
PR #36756
2019-09-13 10:05:15 +00:00
Thibault Delavallée 1dbeaddeae [FIX] website_profile: fix another broken image thingy
As image fields have been renamed recently [1] we have to update controllers
of profile in order to write on image_1920, not image anymore.

Task 2067872 (eLearning internal testing)
Task 2058598 (survey internal testing)
PR #36756

[1] See 58a2ffa26f
2019-09-13 10:05:15 +00:00
Thibault Delavallée 65c3be37fd [FIX] survey: set email_from on certification mail template
Otherwise public users cannot receive their certification. Indeed email_from
will be the one of public user which is probably not set.

Task 2067872 (eLearning internal testing)
Task 2058598 (survey internal testing)
PR #36756
2019-09-13 10:05:15 +00:00
Thibault Delavallée e3828ec9cd [FIX] survey: fix another crashing computed field
Still due to some recent ORM changes: finding a real ID, assigning values
even in create mode with default values.

Task 2058598 (survey internal testing)
PR #36756
2019-09-13 10:05:15 +00:00
Thibault Delavallée 93c6f77799 [FIX] mail: remove channel and partner default context keys when creating followers
Purpose of this commit is to avoid conflicts when creating new followers
with existing context keys. Indeed some actions may propagate a default
partner id or channel id that is not wanted. Example if when inviting someone
on a slide.channel in eLearning, a default_channel_id is set in context
that clashes with follower creation, thinking it is a mail.channel.

Task 2067872 (eLearning internal testing)
PR #36756
2019-09-13 10:05:15 +00:00
Pierre Masereel a96048afcc [FIX] delivery: remove radio button
This commit (https://github.com/odoo/odoo/commit/6173dd21415ab441caaf4404bf812ce2413e29f0) put a radio widget on the carrier selection
which makes no sense, so we removed it.

closes odoo/odoo#36824

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-13 08:41:46 +00:00
Martin Trigaux 19e50ea374 [FIX] tools: do not translate selections with _translate=False
If a model is tagged with _translate=False, it should not be translated.
A special case was made for ir.model.fields but not ir.model.fields.selection

Before this commit, the selections of web_editor.converter.test were translated

closes odoo/odoo#36576

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-09 14:57:15 +00:00
RomainLibert 5d2021e79f [FIX] hr_holidays: fix time off copy
closes odoo/odoo#36822

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-13 08:00:42 +00:00
RomainLibert d37e03cc67 [FIX] l10n_hr: fix typo
closes odoo/odoo#36820

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-13 07:50:25 +00:00
qsm-odoo ee33597ec9 [IMP] website: vertically center the images in gallery slideshow
Note: the design of the whole snippet should be improved

Part of https://github.com/odoo/odoo/pull/36803
task-2070930

closes odoo/odoo#36803

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-12 16:31:57 +00:00
qsm-odoo 4c7c8e32b5 [FIX] web_editor: remove double highlight border on selected image
Probably due to some revert fail of the new/old editor.

Part of https://github.com/odoo/odoo/pull/36803
task-2070930
2019-09-12 16:22:56 +00:00
qsm-odoo d394b9f087 [REF] website: only show relevant option according to gallery mode
Refactor the whole _setActive method of the gallery snippet option and
make sure only relevant options are shown (for example, disable the
column option in slideshow mode or the interval delay for masonry mode).

Part of https://github.com/odoo/odoo/pull/36803
task-2070930
2019-09-12 16:22:56 +00:00
qsm-odoo 9bac0a917b [FIX] web_editor: fix overlay cover on infinitely animated elements
Before this commit, the overlay cover operation was deferred while an
animation was ongoing on the target element. The problem was that the
animation end event is not triggered if the related DOM is removed
before the animation ends... or simply if the animation is infinite.
When this occured, the overlay never appeared.

Note: this could probably be backported if the need rises.

Part of https://github.com/odoo/odoo/pull/36803
task-2070930
2019-09-12 16:22:56 +00:00
qsm-odoo de97b1ca42 [FIX] website_blog: do not preview "number of blog posts" options
Only re-render with the chosen number on click, not on hover.

Part of https://github.com/odoo/odoo/pull/36803
task-2070930
2019-09-12 16:22:56 +00:00
qsm-odoo 74c54405ef [FIX] website_blog: restore 'choose a blog' for latest posts snippets
The option was broken since its UI is generated in JS and was not
adapted to the new editor UI.

Part of https://github.com/odoo/odoo/pull/36803
task-2070930
2019-09-12 16:22:56 +00:00
RomainLibert 2b34d22b42 [IMP] hr: add note field on hr_plan_activity_type
We would like to have a custom note on plan activities

closes odoo/odoo#36796

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-12 14:31:16 +00:00
RomainLibert 9ef2157d17 [IMP] lunch: location multi company
closes odoo/odoo#36331

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-04 07:26:43 +00:00
RomainLibert ba8bdcfaf2 [IMP] lunch: improve lunch again 2019-09-04 07:26:43 +00:00
Pierre Masereel e09d7d1b25 [FIX] pos_discount: get price based on total without tax
When you are applying a discount, the base amount is the one tax
included which is wrong as we'll apply the tax of the discount product
on it. So we are basing the discount computation on the total without
taxes and then apply the tax configured on the product.

It doesn't work with multiple taxes, but will be handled in future
developement in odoo.

closes odoo/odoo#36798

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 14:17:50 +00:00
Raphael Collet 492e4cc5a1 [REF] fields: setup and use of depends_context
closes odoo/odoo#36795

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-12 14:24:58 +00:00
wan 956338f28a [FIX] account: manage multi-company for accrual wizard
Before, it was possible to select lines from different companies and create a line from a yet different company. This is now forbidden.
Also, add tests to ensure only the account is changed when creating an accrual entry.

closes odoo/odoo#36751

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-12 09:31:53 +00:00
Odoo's Mergebot 4926f03e6f [MERGE] mail: improve record creation with batch operations
PURPOSE

Optimize record creation in mail module by adding batch operations.

SPECIFICATIONS

Compute default followers once at creation for all created records. As the
same value is computed for each new record computing it once is sufficient.

Log default creation message in batch when having no specific subtype at
create. It allows to speedup record creation. For 1000 records, these specific
lines take
  * 2.1s before the commit
  * 1.2s after the commit

LINKS

PR #36654
Task 2070602

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-13 10:44:22 +02:00
Odoo's Mergebot 5dc97ee7da [MERGE] sms, mass_mailing{_sms}: implement YAB2B
PURPOSE

Once SMS Marketing has landed, a few comments/reviews to improve the interface,
clarify buttons and actions and ease the onboarding.

SPECIFICATIONS

[FIX] sms - mass_mailing: fix some bugs
- Cancel button in the sms form view not related to a action :
When we click on the cancel button of the sms form view, get traceback.
Fix the issue by adding the cancel action in sms model.
- Mass mailing contact - False as the display name :
The display name was the mail address but when the contact didn't have
mail address a ugly False was print to described the contact (form view).
Then change the _rec_name to print the name as the display name.
- Fix SMS composer for the res.partner tree
Only the first record was truly selected when open the sms composer
(mass) from the tree view of partner. Fix that by bind the actives_ids
in the context and also fix the names of related actions.

[IMP] sms: allow to preview a sms template
Add a way for the user to preview sms content from a sms
template depending of a record (targeted model) and the
installed languages (as for the mail template). Add button
to open this preview on the form of the sms template.

[IMP] sms: allow to create a sms context action from template
In the SMS template, we add the ability to create (and remove)
a contextual action on the targeted model from a sms template.
We change the sms composer to guess the composition mode,
and then to be usable by contextual action. The guess composition mode
works differently if there are multiple target
selected (mass) or a single target (comment).

[IMP] (sms_)mass_mailing: improve interface
- Change the name of "Mass SMS" by "SMS Marketing"
- Improve the Mass Mailing views (kanban, form)
- Improve the Mass SMS views (kanban, search, form)
- Hide the sanitized numbers from views (sometime replace by mobile)
- Fix demo data of sms
- Explain the language field of sms template
- Improve the render of the sms composer wizard

LINKS

TASK_ID : 2053631

closes odoo/odoo#36286

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-13 10:44:08 +02:00
ryv-odoo 8e2da3b4d6 [IMP] (sms_)mass_mailing: improve interface
- Change the name of "Mass SMS" by "SMS Marketing"
- Improve the Mass Mailing views (kanban, form)
- Improve the Mass SMS views (kanban, search, form)
- Hide the sanitized numbers from views (sometime replace by mobile)
- Fix demo data of sms
- Explain the language field of sms template
- Improve the render of the sms composer wizard

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo e4afa5d6d0 [IMP] sms: allow to create a sms context action
In the SMS template, we add the ability to create (and remove)
a contextual action on the targeted model from a sms template.
We change the sms composer to guess the composition mode,
and then to be usable by contextual action. The guess compostion mode
works differently if there are multiple target
selected (mass) or a single target (comment).

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo 076e71cb5b [IMP] sms: allow to preview a sms template
Add a way for the user to preview sms content from a sms
template depending of a record (targeted model) and the
installed languages (as for the mail template). Add button
to open this preview on the form of the sms template.

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo 8ef1543908 [FIX] sms - mass_mailing: fix some bugs
- Cancel button in the sms form view not related to a action :
When we click on the cancel button of the sms form view, get traceback.
Fix the issue by adding the cancel action in sms model.

- Mass mailing contact - False as the display name :
The display name was the mail address but when the contact didn't have
mail address a ugly False was print to described the contact (form view).
Then change the _rec_name to print the name as the display name.

- Fix SMS composer for the res.parnter tree
Only the first record was truely selected when open the sms composer
(mass) from the tree view of partner. Fix that by bind the actives_ids
in the context and also fix the names of related actions.

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
wan f97c902847 [FIX] account: multi-company CoA installation
With the changes in the ORM, the method _compute_has_chart_of_accounts is now also called after the create, erasing the value of chart_template_id.
We cannot set that field as related to the company because set_values checks if the value changes and it wouldnt be the case if we already changed it at the validation of the config form.

So this commit checks if there is already a value before setting the default.

closes odoo/odoo#36780

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-12 14:51:33 +00:00
sri-odoo 94b3e339ba [REF] web: extend ui colours
closes odoo/odoo#36781

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-09-12 12:45:53 +00:00
Raphael Collet 5450f03038 [FIX] product: cannot order by many2many field
closes odoo/odoo#36789

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-12 13:53:12 +00:00
Raphael Collet 2cfdb12cb0 [FIX] website_hr_recruitment: cannot order by non-stored field 2019-09-12 13:53:12 +00:00
Raphael Collet 2ac4f2ee0f [FIX] purchase_requisition: cannot order by non-stored field 2019-09-12 13:53:12 +00:00
Raphael Collet 8546d07d0f [FIX] mrp_subcontracting: cannot order by many2many field 2019-09-12 13:53:12 +00:00
Raphael Collet 558d675529 [FIX] crm: cannot order a model by a non-stored field 2019-09-12 13:53:12 +00:00