Commit Graph
143374 Commits
Author SHA1 Message Date
Jérôme Vanhaudenard 162eb35de8 [FIX] point_of_sale: Warning on posted cash register
To reproduce the problem :

1. Install POS and accounting
2. Open a POS session and make a cash payment
3. Go on accounting -> statement of CASH -> click on the POS statement
4. Try to post the statement -> It works
5. Try to close the session -> Only new statements can be posted.

Now, a check is performed at the beginning of the closing process
and display a useful message to the user if a statement is already posted.

OPW-2494806
OPW-2377190
OPW-2448362
OPW-2485830
OPW-2487628

closes odoo/odoo#72806

X-original-commit: 6c0646aa48900933474ee237ab143967e15f4086
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-25 14:57:10 +00:00
Noe Antoine 94e4756343 [IMP] website_event: rename extra register button.
BEFORE THIS COMMIT

The option adding an extra register button in top right
(at submenu height) of an event website page was presented as a
checkbox 'Register Button' on event form and 'Add Register Button'
on event type form.This was easily mistaken as the option of
allowing / preventing user registrations, which is not the case at all.

AFTER THIS COMMIT

In both event.event and event.type, this option is renamed
'Extra Register Button' to clarify its purpose and prevent such
a confusion.

--- Links ---
Task Id - 2578891
COM PR - odoo/odoo#72686

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 10:59:28 +00:00
stefanorigano (SRI) a61d06217d [FIX] mass_mailing: cleanup 'assets_mail_themes_edition' sub-bundle
Solve SCSS compilation issues due to 'webclient.scss' that was initially
added in b3e7fd040b.
The fine is now unnecessary and it's actually causing the editor to
behave incorrectly.

closes odoo/odoo#72678

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 09:24:14 +00:00
William Braeckman bfa0a66e52 [IMP] hr: move personal documents to hr
Previously personal documents on employees were added with the belgian
contract salary module. This changes moves part of those fields to the
base hr module

Task ID: 2578139

closes odoo/odoo#72673

Related: odoo/enterprise#19219
Related: odoo/upgrade#2587
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-24 07:53:49 +00:00
yhu-odoo f3307e201c [FIX] mrp: skip service when compute kit quantities
Since we can't transfer service product, when compute delivered or
received kit quantities, we should skip the service components.

Task-2566373
PR #72306

closes odoo/odoo#72575

X-original-commit: f86c7c0dfa09a2136ed1789a905eae9205de0c03
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-28 07:16:55 +00:00
nounoubensebia c56ba2949e [IMP] website_event_[exhibitor|meet|track]: add link for no content submenu buttons
This commit modifies texts proposing to the users to create new
exhibitor/meeting_room/tracks by adding links redirecting the user to the
backend allowing them to easily create new records without having to go to
the backend again.

It also prevents the user from being redirected to the main event page when
toggling the allow room creation submenu, instead it will only reload the
current page, thus preventing the user from losing the community page.

Task-2531104

closes odoo/odoo#71825

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-22 09:37:35 +00:00
Prakash Prajapati 9b53115345 [IMP] hr_timesheet: refactor _apply_time_label method
The purpose of the commit is in order to avoid code duplication and ease maintenance,
the _apply_time_label method has been centralized in hr.timesheet
which makes more sense since the relation to the timesheet encoding unit.
It can now be used in other models by providing the right model name.

closes odoo/odoo#72679

Taskid: 2451722
Related: odoo/upgrade#2499
Related: odoo/enterprise#18621
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-25 10:54:59 +00:00
Lucas Perais (lpe) 574739e125 [FIX] web: legacy: CustomFilterMenu is focusable
Before this commit, when browsing a filterMenu with the keyboard, the CustomFilterMenu
was not focusable. This is because its root node changed from `button` to `span` which is not
focusable by default.

After this commit, the CustomFilterMenu is focusable and the root node has been replaced back by a button

closes odoo/odoo#72738

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-25 15:25:50 +00:00
Anh Thao Pham (pta) 7b1acdf41a [FIX] sale_mrp: fix COGS aml for products with kit BOM
- Install stock, account_accountant, sale_management & mrp
- Create a storable product (i.e. Kit A)
- Configure its Product Category as followed:
  * Costing Method: Standard Price
  * Inventory Valuation: Automated
- Create a consumable product (i.e. Kit B)
- Create a consumable product with cost $3 (i.e. Component A)
- Create a consumable product with cost $4 (i.e. Component B)
- Create a consumable product with cost $5 (i.e. Component BB)
- Create BOM for Kit B:
  * BOM Type: Kit
  * Quantity: 10
  * Components:
      2 x Component B
      3 x Component BB
- Create BOM for Kit A:
  * BOM Type: Kit
  * Quantity: 3
  * Components:
      2 x Kit B
      1 x Component A
- Create a SO with 1 Kit A and confirm it
- Create an invoice and confirm it
Values of the COGS aml created for Kit A ($26) do not match its BOM cost ($2.53).

The method computing the price unit does not take into account BOM quantity:
10 for Kit B and 3 for Kit A.
It only sums the cost of the components of BOM.

Quantities of the components used by sub-kits should be related to the quantities
defined in the BOM.
Also, the average price unit computed for the BOM should be divided by the BOM
quantity to get the true average price for one unit (BOM cost).

opw-2557198

closes odoo/odoo#72812

X-original-commit: 36974be7cb46712f80d137b0a35646e77db910d8
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-06-25 17:17:11 +00:00
Adrien Widart 865aa6c762 [FIX] point_of_sale: set opening amount with several POS
When having several POS with cash control, if at least one POS already
has a closed session with cash in box, the first session of the other
POS may have an incorrect opening amount

To reproduce the error:
(Let POS01 be the existing point of sale)
1. Edit POS01's settings:
    - Enable "Advanced Cash Control"
2. Duplicate POS01 (-> POS02)
3. Start a session with POS01
4. Sell one product, payment in cash (Let P be the product's price)
5. Close POS01's session (correctly set the closing cash)
6. Start a session with POS02

Error: On opening cash control, the opening amount is P, it should be 0

OPW-2574096

closes odoo/odoo#72803

X-original-commit: ba86192043ad014a0e13867a66816acede64c897
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-06-25 14:41:23 +00:00
Didier (did) 6240617358 [IMP] mail, *: use explicit export instead of default
* = hr, hr_holidays, im_livechat, sms, snailmail, website_livechat,
    website_slides

Exporting directly on the line of the class or variable definition is less lines
of code and less repetition (and risk or mistake).

Exporting with a name instead of default allows to catch typos more easily when
importing and ensures the same name is used for consistency (and ease of grep).

closes odoo/odoo#72597

Related: odoo/enterprise#19224
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-25 14:56:52 +00:00
Yograj Tandel d7b2457331 [IMP] web: color picker adjustment
Before this commit: on smaller screens, in color field, colors are not display
in one line, few colors are coming on second line.

After this commit: colors are now displaying in one line by reducing margin
between color squares.

task-2454346

closes odoo/odoo#66915

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-06-25 13:23:41 +00:00
Nicolas (vin) 90dc650ce8 [FIX] account: Fix a traceback in account_payment
When changing the journal of a payment that has already been saved by
one of another company, a traceback will occur because of writeoff lines.
This ensures that it will not happen.

closes odoo/odoo#72800

X-original-commit: b44a70284c52623061623d4793ffce29ea25487a
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2021-06-25 13:46:45 +00:00
Florent de Labarre d580c93aa3 [FIX] website_sale: remove always falsy condition
This code can't be reached, the condition can't be true anymore, as
`partner_shipping_id` is a required field.

closes odoo/odoo#72794

X-original-commit: 3857d27d54b3dc839376abf08de535626e3af850
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-06-25 13:14:27 +00:00
Denis Mudarisov 8100980773 [FIX] crm: make help note translatable
closes odoo/odoo#72789

X-original-commit: f21392f5290d298f43b4a64f4e4cdbbc992df627
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-25 12:43:12 +00:00
William Braeckman 824af72a9b [IMP] hr_skills: remove optional dropdown
When studio is installed, the List view renderer will always render a
threedot menu to promote studio, but since resume and skill widget
extend that view it also gets rendered on top of the add button.

This change completely removes the optional dropdown menu from those two
widgets.

Task ID: 2578126

closes odoo/odoo#72654

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-23 15:46:18 +00:00
Lucas Perais (lpe) 0ffc12c0a4 [REF] web_editor: loader split the loading and the creation of wysiwyg
Before this commit, the wysiwyg loader had only one method to both load and create it.

After this commit, it has two separate methods to do it. This is practical if one wants to load
in some other context, like studio

closes odoo/odoo#72454

Related: odoo/enterprise#19139
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-06-24 15:05:23 +00:00
Tiffany Chang (tic) 03aede0a2c [FIX] mrp: allow validation when no components
Conflicting fixes for unusual cases of MO validation when no components
assigned and when components assigned all with 0 consumed made it so we
cannot validate an MO with no components despite there being a
confirmation popup that makes it seem like you can. This fix makes it
so we can validate a MO when no components are assigned (ideally we
would allow validating both cases, but fix for 0 consumed is much more
difficult + an extremely unlikely use case).

closes odoo/odoo#72343

Task: 2422698
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-18 07:37:19 +00:00
Kevin Baptiste 405cdd6388 [IMP] hr_recruitment: improve hr.job kanban view
- Display the total number of applications (including refused)
- Show the number of new applications on the button instead of total

closes odoo/odoo#72277

Taskid: 2574370
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-17 11:13:27 +00:00
Leonardo Pavan Rocha bc40795c56 [IMP] base: base layout designer improvements
This commit implements improvements in the layout designer, such as addition of a new custom background, adds custom report footer and company details.

task-2355704

closes odoo/odoo#66860

Related: odoo/upgrade#2275
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-06-25 10:33:31 +00:00
Mohammed Shekha ae4cb866de [FIX] web: do not display notebook ul element if all pages hidden
before this commit: if all pages are hidden then notebook ul was still visible
due to which border for notebook ul element was displayed.

after this commit: if all pages are hidden then we hides notebook ul element
as well, so that we don't have empty border line of empty notebook.

task-2411651

closes odoo/odoo#63420

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-06-25 07:28:47 +00:00
Katherine Zaoral 216b07eb46 [ADD] l10n_ar: AFIP RG 5003
Be able to create letter A documents to monotributista AFIP
responsibility types.

closes odoo/odoo#72667

X-original-commit: b204f7d1b0bcaf3984600d94395377c97facf168
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-25 11:50:32 +00:00
Laurent Smet a455483c2a [FIX] account: Fix missing dependency of '_compute_is_reconciled' in statement lines
closes odoo/odoo#72764

X-original-commit: 3ca7f28de24f3d64d67d9d358bf6ad93d36479c0
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-25 08:43:06 +00:00
Adrien Widart 50e81b110f [FIX] point_of_sale: set end balance of cash register
This commits is about two problems. The first one is a undesirable
warning message displayed when closing the POS session

To reproduce the error:
1. In POS settings, enable "Advanced Cash Control"
2. Start a POS session
3. Make an order of 70$, payment in cash
4. Close the POS session (correctly set the closing cash)

Error: When clicking on "Close Session & Post Entries", a warning is
displayed: "There is a difference between the expected and actual
closing in cash. Are you sure [...] ?" However the actual cash is equal
to expected cash so the message does not make sense

The error has been introduced with commit 7252350d35c6e8e7f47458c3aedcf05d92e71afa,
so the current commit reverts it.

However, the reverted commit was a solution to a second problem: When
cash control is disabled, if the user opens and closes a POS session
(without any order), the ending balance of the associated cash register
will always be 0. Here are the explanations: if cash control is enabled,
when the user sets the closing cash, it creates a record:
https://github.com/odoo/odoo/blob/80c28189ae6b10ad17c4de2a781233a8ffe663a6/addons/account/models/account_bank_statement.py#L82-L98
and therefore, thanks to `_validate_cashbox`, `balance_end_real` will be
defined with its correct value. However, there isn't anything to define
the ending balance when there isn't any order and when cash control is
disabled.

OPW-2580699

closes odoo/odoo#72763

X-original-commit: 550e7280212b740bfce72331f6d0aef99b7aadb6
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-06-25 09:41:23 +00:00
Xavier Morel ded278b9c2 [FIX] core: have HttpCase automatically set the base url
While HttpCase did set `web.base.url` before starting a browser, in
the non-browser test cases (or cases which would mix browser and
non-browser) it would not do so.

This is an issue when installing the database with one http-port and
running tests with an other e.g. after duplicating the database (or
even not duplicating it) in order to run multiple test instances
concurrently, which requires using different http ports.

Tests would then see the base url generated during installation,
embedding the port used at installation, and would break weirdly (at
best exploding due to not finding any server to bind to, and at worst
making request on the wrong instance entirely). Simply updating the
base url during setup seems to fix most of the tests.

Notes:

* Some tests (e.g. survey) don't flush() their create/update before
  calling `start_tour` or `browser_js`, the implicit flush because of
  the ICP handled the issue. Perform an explicit flush of base
  (similar to `url_open`) to ensure they keep working correctly.
* `url_join` should handle absolute URIs correctly, it does imply
  slightly different semantics in case the `base_url` has a non-empty
  path, but that seems like a very limited risk (and possibly
  convenient to boot).
* `payment` needed a fix because the vagaries of the MRO led to the
  extra parameter internally used by the thing to be passed to
  `HttpCase`'s `setUpClass`, which would not expect it.

closes odoo/odoo#72645

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-06-25 09:13:49 +00:00
Younn Olivier 58503a248e [IMP] website: disable some options for inline snippets
When a snippet is displayed inside another snippet, some options that
were not useful in that case are removed from the editor:
- ContainerWidth
- minHeight
- ScrollButton
- Background

Part of https://github.com/odoo/odoo/pull/72180
task-2566338

closes odoo/odoo#72180

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-25 07:39:54 +00:00
Younn Olivier 3426283c22 [IMP] web_editor: display toolbar only when needed
For now, the toolbar was hidden from the snippets menu only if:
- it was an image
- it had no editable parent or was outside the wrapwrap
- for model fields that were not html nor views

We also want to hide it for every selected element that is not editable,
as the options will have no effect on such element.
When an element is not editable, it is useless to display the toolbar.

For example, for the website form fields, or the newsletter
subscription, the toolbar was displayed even if it had no effect on the
snippet.

To hide it, we test on the last element at the wysiwyg level.

Part of https://github.com/odoo/odoo/pull/72180
task-2566338
2021-06-25 07:39:54 +00:00
Younn Olivier fac52593fe [IMP] website_form: make adding a field to the form clearer
This commit adds a label next to the + icon and uses a primary button to
make adding a field clearer.

Part of https://github.com/odoo/odoo/pull/72180
task-2566338
2021-06-25 07:39:53 +00:00
Cedric Prieels (cpr) 3bcb88f410 [IMP] {hr_,sale_}timesheet,{sale_}project: improve the tasks portal
Generic UX improvements for the task portal.
Added new sort by, group by and searches options in the tasks portal.
Some options have been renamed as well, while the style has been slightly revised.
The timesheet details of each sub-task from the parent form view has also been removed.

task-2508883

closes odoo/odoo#70305

Related: odoo/upgrade#2580
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 15:39:40 +00:00
prro-odoo 2956233255 [FIX] web: expand import-compatible fields
- Install the eCommerce (for the ribbon, in 14.0) and the Sales app
- Go to the Sales app -> Products -> Products
- (View List ->) select (a) Product(s) -> Action -> Export
- check "I want to update data (import-compatible export)" -> click on the "Ribbon" field (in 14.0, or another many2x field for wich the model has no _rec_name defined) to expand

Cause: the export page controller tries to access an undefined field (_rec_name)

Solution: the controller now uses a fallback method to retrieve the wanted field

opw-2566403

closes odoo/odoo#72748

X-original-commit: e31cb5be22de7db223318b4876bf725e15654fea
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
2021-06-24 17:30:20 +00:00
Valentin Chevalier 24fa119533 [FIX] payment: restore the delay before post-processing a transaction
Since the payment post-processing cron runs every ten minutes, it is
important that it ignores the transactions that were updated in the same
last ten minutes. This is necessary because customers can only see the
payment confirmation message for transactions that were not already
post-processed.

Commit 573ed74 mistakenly changed the post-processing delay from ten
minutes to one minute. This commit changes it back to 10 minutes.

task-2494916

closes odoo/odoo#72742

X-original-commit: 502a13b87971b0bf36493770dd3bcb4f9d9b7c2a
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Signed-off-by: Valentin Chevalier <chevalierv@users.noreply.github.com>
2021-06-24 16:14:10 +00:00
Younn Olivier 5d7f883a2c [FIX] website: fix scrollButton option on events
On events, or in every part of the website that was built without
sections, the scroll button of a dropped snippet was not effective.

This was because we were targeting the next section, which was not there
in the previous case. Yet, we want it to scroll to the next element,
even if it is not a section.

task-2566338

closes odoo/odoo#72733

X-original-commit: 439381aa98c3b1e03513edb45cda284f4627d2a8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-24 15:14:23 +00:00
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
root 9796d58271 [FIX] hr_timesheet: never update timesheet rounding params
Before this fix if a user updated the module hr_timesheet the ir.config_parameters would be reset.
By wrapping them in a no-update they're no longer updated with a module update and thus kept as set by the user.

closes odoo/odoo#72732

X-original-commit: 369529cb15ec01cde1538c189535ce6d41685268
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-24 15:02:56 +00:00
Touati Djamel (otd) 2f098b2583 [FIX] stock_landed_cost: added a missing return on the overridden write function
commit where the bug was introduced : https://github.com/odoo/odoo/pull/71810/commits/7b87ab31ee64d56c6e7f9eab7a51d81cf4e66747

opw-2572132

closes odoo/odoo#72751

X-original-commit: 94d1e807379ca7d92d5a4df267857cb00f979710
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-06-24 18:19:31 +00:00
alt-odooandJulien Castiaux 603e13fa00 [FIX] lunch: access rights error on ir.cron for lunch manager
When a lunch manager tries to archive a vendor, we automatically update its
related cron. This is triggering an access rights error if the user does not
have access to ir.cron model. We should allow him to archive the vendor
without error.

closes odoo/odoo#72750

X-original-commit: 5b8eff9d771a9071327473d2185624f69e1057c1
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2021-06-24 18:07:25 +00:00
Didier (did) e30e315ece [IMP] mail: replace hard-coded values by SCSS variables
Clean up pass towards using bootstrap in template, not all hard-coded values are
converted yet but those have been done:

 - `width/height: 100%` by `map-get($sizes, 100)`
 - `margin/padding` with hard coded value with `map-get($spacers, X)`
 - `border: 1px` by `$border-width`
 - hard-coded black and white by `$black`/`$white`
 - hard-coded `border-radius: 50%` by `@extend .rounded-circle;`

task-2223232

closes odoo/odoo#72321

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-24 17:19:59 +00:00
Anh Thao Pham (pta) fed1acee10 [FIX] web: fix error when getting image URL with default id
Linked to commit: https://github.com/odoo/odoo/commit/7eac23573c77415c84cb9c234c8063d4c68be425

Using false as default value instead of null will lead to the following
error if we try to get image URL of a record that is not the current one
and if no placeholder is available:
ValueError: invalid literal for int() with base 10: 'false'

opw-2516188

closes odoo/odoo#72729

X-original-commit: d32c0ddbcb99385407a5030e8d3ea4df44509377
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-06-24 15:01:47 +00:00
Goffin Simon 34e66bd2c4 [FIX] mrp: Delivered quantity with kit
Steps to reproduce the bug:
Create 2 product (Finish product , RM product)
Create 1 Kit BOM for Finish product with 1 Component(RM Product) and quantity : 0.0860
Create SO for 10 Finish product and confirm SO
Deliver RM product : Quantity : 0.86 ( as per define ratio in BOM) -> validate

Bug:

Delivery quantity on SO line shows : 9 instead of 10

opw:2540671

closes odoo/odoo#72724

X-original-commit: 89aa85f32e0a87d537f4d9ed9c22955d3269ddd1
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-06-24 14:06:08 +00:00
Thibault Libioulle caa58cdc46 [FIX] sale_timesheet: fix wrong join condition
Prior to this commit, the account move line was not correctly joined,
and put in relation with SOL. Furthermore, this table isn't use.

In this commit we correctly join the subquery, in this subquery,
we just try to avoid to take into account amounts that are related
to invoiced sale order lines.

closes odoo/odoo#72710

X-original-commit: b04465d3514fe5cd52b7994962fe4069933ae6fd
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 13:05:41 +00:00
Jacky (trj) bdd0491fb2 [REF] l10n_de: move l10n_de_stnr and l10n_de_widnr from l10n_de_pos_cert module
These fields are more relevant in the German localization rather than the German POS localization

closes odoo/odoo#72590

Related: odoo/enterprise#19183
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-24 07:46:54 +00:00
Arnold Moyaux 6ef20b309f [FIX] stock: take ongoing move line for putaway
Usecase to reproduce:
- Setup a maximal of 100units in a storage category
- Set the storage category on shelf1 and shelf2
- Create two putaway rule from wh/stock to wh/stock/shelf1 and
wh/stock/shelf2
- Create an immediate receipt
- Set 100 units of product on stock move line (should suggest shelf1)
- Put in pack
- Create a new stock.move.line in the receipt.

It will suggest the same location than in the first line despite the
location is the same. It happens because the check look only at quantity
reserved in the location but the user could have create new line without
quantity reserved.

This commit, take the maximum between the quantity reserved and the
quantity done to give an estimation of what could happens.

closes odoo/odoo#72689

X-original-commit: d9d98d4264295532f2248c6072aabbd72f32f054
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-24 11:11:27 +00:00
Sébastien Mottet (oms) ccbab34878 [FIX] website: handle disabled and preselected modules
- The selection of cards corresponding to already installed modules
is disabled. A disabled style has been applied to these cards and an
info icon added. On hover on this icon the user is informed that the
module is already installed on its DB.

- Modules that were preselected based on website type can now be
unselected by the user.

- Correct typo in description of feature_module_career.

task-2518565

closes odoo/odoo#72688

X-original-commit: ab364b06dbb20cce90c7caa8ca15d034e2dcb25e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-06-24 11:09:13 +00:00
Lucas Perais (lpe) ac0224319e [FIX] web: utils/strings: sprintf support lazy translated strings
Have something like:
```js

sprintf("my string %s", _lt("lazy translated"));

```
Before this commit, the lazy translated term was not formatted into the string.
This was because _lt returns an object containing a custom toString function, which was not handled by sprintf

After this commit, sprintf is able to handle lazy translated strings

closes odoo/odoo#72598

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-24 09:59:05 +00:00
Géry Debongnie d4bbadd699 [REF] web: slightly improve translation system
Before this commit, "lazy translated" strings were implemented as
objects with a toString function. This is simple, but does not emulate
very well the real behaviour of a string.

In this commit, we create a LazyTranslatedSTring class which subclass
the String class, so all string methods will work as expected.

We also expose the _t function here, to make it more convenient for some
code to access the translations instead of depending on the presence of
an environment.
2021-06-24 09:40:10 +00:00
Barad Mahendra 27538bca03 [IMP] project,hr(_timesheet)_holidays: usability improvement for project
Purpose of the commit is to improve the usability and onboarding
of the project app.

So in this commit, done the below changes:
 - Rename column "Kanban state" in list view screens
 - Hide column "analytic account" when not needed
 - Do not show "Internal" project

PS: Moved leave_timesheet_project_id into hr_timesheet and rename
it as internal_project_id and we used it in the domain in the
kanban/action to the kanban in order not to have it in the result.

closes odoo/odoo#68857

Taskid: 2451722
Related: odoo/upgrade#2479
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 05:18:14 +00:00
f6ab481ad9 [FIX] project: improve performance of burndown chart report
Before this commit, for the db with old active tasks and many
projects and tasks. The report takes several hours to execute the sql view.
Because we take the create date of the oldest task as the begin date
of each generate_series to calculate the different group bys (day, week,
month, quarter and year) until CURRENT_DATE.

This commit hugely improves the performance of the sql view execution
for the burndown chart report.

closes odoo/odoo#72664

X-original-commit: 89726a22862cf14f7b88e130fb79ddc74bffff5e
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Nicolas Seinlet (NSE) <nse@openerp.com>
Co-authored-by: Thibault Libioulle (TLE) <tle@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
2021-06-24 07:22:52 +00:00
Mohammed Shekha 49d311e725 [IMP] stock: add is_signed boolean computed field
signaature field was used in listview and it was displaying size of the
signature file, it has been done in commit: 4bdbb9b761
but as discussed on PR: https://github.com/odoo/odoo/pull/72276\#issuecomment-863262072
we added is_signed computed boolean field to display it like boolean as boolean
widget is supported only on boolean type field.

task-2580117

closes odoo/odoo#72592

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-23 08:15:14 +00:00
Adrien Widart 45441f6fbb [FIX] point_of_sale: always post bank statement of cash
The amount of cash present in the POS may be incorrect

To reproduce the error:
1. In POS settings, enable "Advanced Cash Control"
2. Start a POS session
3. Make an order of 70$, payment in cash
4. Close the POS session (correctly set the closing cash)
5. Start a POS session, close it (correctly set the closing cash)

Error: Back to kanban view, the information about the POS are incorrect:
the cash balance is equal to zero, it should be $70

The value of the cash balance is computed in `_compute_last_session`:
https://github.com/odoo/odoo/blob/5ea1d31df9041ca7b25fbea6178e798e62bebca0/addons/point_of_sale/models/pos_config.py#L276-L291
This method gets the last session and extracts the information. However,
in the above case, there were no sales during the last session (step 5).
In such situation, the bank statement of cash is deleted. As a result,
in `_compute_last_session`, `last_session_closing_cashbox` will be
defined to `False`. This is the reason why the cash balance will be
equal to 0

The deletion of `cash_register` has been introduced in case the user
closes a session that does not contain any SO. This fix suggests keeping
such a bank statement and automatically posting it.

Linked to OPW-2507394

closes odoo/odoo#72663

X-original-commit: dae9ba62d98d4238600ccd637dd5e879f1cac903
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-06-23 17:48:19 +00:00
Bruno BoiandStefano Rigano 5c5924af88 [FIX] web: change pivot dropdown submenu
Since odoo/odoo@1971bf3 the customised dropdown in the pivot view (the one that opens its submenus horizontally) cannot open at all its submenus.

As the correct behaviour cannot be restored without reintroducing the +300 scss lines that has been removed, this commit applies a temporary fix that *changes* the design of this dropdown. Now, its submenus will open vertically, like for the groupby menu near the search bar.

The final dropdowns design is currently ongoing within the taskid: 2578926

closes odoo/odoo#72640

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2021-06-24 07:14:49 +00:00