Purpose
=======
This commit allow the users to translate their Gmail Addon.
The language of the addon will be the language the user set on his
preference, on his Odoo database.
The translations will be downloaded from Odoo and stored in the cache,
so translator can use the existing system to translate the addon.
Task 2502261
See odoo/mail-client-extensions/pull/8
See odoo/odoo/pull/69288
See odoo/enterprise/pull/17711
closesodoo/odoo#69288
Related: odoo/enterprise#17711
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When an invoice is created from pos having a cash rounding method, the
value of the rounding can depend on the payment methods.
When no rounding has been applied because of the order has been
partially paid by cash and bank, the rounding line should be deleted
from the invoice. We should also adapt the terms lines.
closesodoo/odoo#71410
X-original-commit: 846c63b6e5414d2b4620f389817379506a419573
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
To reproduce:
1. Sell an anglo product (inventory valuation = automated) in the pos app.
2. Go back to the backend, find the pos.order and invoice it.
3. Close the session.
4. Open the journal items related to the session (click the Journal Items
button in the session form).
5. You will see COGS (Expenses) Account and Stock Interim (Delivered) are
debited in two journal entries - one from the invoice and one from the
created picking after the closing of session.
This is because we are not properly skipping the invoiced order when
generating the global picking for the session. This commit fixes the
described issue.
closesodoo/odoo#71404
X-original-commit: 4320794da1129c7fffdebd9d0469dd81dd1f212b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
By explaining why a payment was refused or had an error,
we can understand easily what has to be done to get the payment done,
instead of just knowing it was refused/had an error.
task-2501723
closesodoo/odoo#69929
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit simply makes the mail.template name field translatable.
It had not been done yet since the model is quite technical but it's still
displayed for the end users within the composer so it's better to have it
translated if need be.
Task-2543495
closesodoo/odoo#71408
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Some flows of the core `sale` code (sale_order & sale_order_line)
weren't covered at all by tests.
This commit adds some tests to cover those flows, reducing the risks of
broken features/flows with future sale tasks.
closesodoo/odoo#71402
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
stdout:
stderr:
17:49:30.703303 git.c:344 trace: built-in: git cherry-pick 3c8bdde81d508fdee301f13bcbc6e4eefc9fb02c
error: Cherry-picking is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: cherry-pick failed
----------
status:
closesodoo/odoo#71390
X-original-commit: 7033f4aa7d1c65ad13dcd19e66378b101b56238b
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Because the `receiptHtml` was taken from a component which was mounted outside of the DOM, it was hardly ever destroyed for some unknown reasons and the `el.outerHTML` could not be taken to create the receipt.
closesodoo/odoo#71399
X-original-commit: a54d54c9c479aaee3bafe6e241d89d557a1e0b56
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
When trying to filter links by a tracked URL code, the following warning
is shown:
WARNING dbname odoo.models: Cannot execute name_search, no _rec_name
defined on link.tracker.code
and the applied filter gives all records.
closesodoo/odoo#71398
X-original-commit: 3687dabbc373e57e24ca4596c18ef1dacfde8273
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
The default tree view action (debug mode) of account.move.line currently hides lines in the cancelled state. This commit modifies the default domain on the action.
Users can now filter and group all lines
part 3 of task (2486685)[https://www.odoo.com/web#id=2486685&model=project.task]
closesodoo/odoo#71392
Signed-off-by: William André (wan) <wan@odoo.com>
Purpose
=======
When you archive an employee, if he's the manager/coach of someone else, the link is not removed.
closesodoo/odoo#71368
Taskid: 2536219
Related: odoo/enterprise#18588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit: if many2one field has no_create=True and user write
something to many2one field which does not exist and focusout of many2one
field then the text remain there on many2one input field, it creates
consution, it looks new record is created and set, so to avoid this
many2one field should be cleared if there is unmatch string and it has
no_create=True.
After this commit: if many2one has no_create=True and user types string
which does not have any match then on focusout many2one input element
will be cleared.
task-2517593
closesodoo/odoo#70173
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As replace and delete are already in the right panel, this is kind of a
duplicate. Related to f3ccc91d42
Also, add border around selected image so the used knows what image is selected
task-2502679
Closes#69340
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose of this commit is to ensure side documents are redirected to the
master opportunity when merging leads. Those side documents include
* communication history (mail.message);
* attachments (ir.attachment);
* visitors (website.visitor);
However some documents are currently not specifically handled :
* meetings (calendar.event);
* activities (mail.activity);
* sale orders (sale.order);
* attendees (event.registration);
In this commit we ensure all are attached to the final master opportunity.
That way we prevent loosing access to those documents and ensure we keep
the complete history of all merged leads.
Also tests are added to ensure the merging of leads and its contents.
A new field is added to have the o2m field between leads and calendar events.
In order to clarify naming, ``meeting_count`` is renamed to
``calendar_event_count`` to match naming.
Task Id-2457941
COM PR odoo/odoo#68884
UPG PR odoo/odoo#2494
Related: odoo/upgrade#2494
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When sorting by confidence level, put lost (inactive) leads last. This should
not happen when using the merge tool that filter out inactive leads but may
happen in case of manual merge.
Task Id-2457941
COM PR odoo/odoo#68884
To reproduce the error:
Create a survey (title must contain ") and send it
Error:
The mail subject is incorrect: the character " is replaced with "
OPW-2536206
closesodoo/odoo#71388
X-original-commit: 37cea376cc2069388b07b91f50caa6044fa6c932
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Previous fix f056254d1c5153467b10d9581214ff6d1348be76 didn't take the
situation when production location has its own valuation accounts into
consideration. Fix it in this commit.
opw-2476417
closesodoo/odoo#71064
X-original-commit: 60e83f03b871605b7aa281503269f66ac3ea940b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
This merge commit adds some minor improvements to crm.iap.lead.mining.requests
to ease the usage of leads generation tools.
This is done by:
- Merging and removing some of the "industries", to present the user with the
most relevant ones ;
- Allowing to order the industries with a sequence, again in order to give
relevant industries as top choices ;
- Disabling "states" selection for various countries, based on the available
results in the reveal database.
More details about those changes can be found in underlying commits.
UPG PR odoo/upgrade#2288
Task-2471703
closesodoo/odoo#68128
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The style of website requires that the checkmarks of checklists be
offseted a little bit differently in website that in field html. This
acknowledges that difference so that they're properly centered in both
cases.
closesodoo/odoo#71348
X-original-commit: 91133da51697f77951d925141ae5cff012230b63
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Indenting a checklist item duplicated its checkbox. This properly copies
the css from the editor that was lost in translation.
X-original-commit: 14efea8ac944eba483f7300d6ba6e51592f26b80
Actually, salesmen have to add manually the acquirer_id to the link, and it isn't user-friendly. The dropdown will show the possibility to add the acquirer_id.
Task #2504225closesodoo/odoo#69334
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
States for some specific countries should not be offered as filtering options
for crm.iap.lead.mining.request because they drastically reduce the amount of
IAP reveal results.
For example, in Belgium, only 11% of companies have a defined state within the
reveal service while the rest of them have no state defined at all.
Meaning specifying states for that country will yield a lot less results than
what you could expect, which is not the desired behavior.
Obviously all companies are active within a state, it's just a lack of data in
the reveal service side.
To help users create meaningful iap searches, we only keep the states filtering
for several whitelisted countries (based on their country code).
The complete list and reasons for this change can be found on the task.
Task-2471703
This commit simply adds a sequence field to the crm.iap.lead.industry model and
re-orders the records imported in the CSV file.
This re-ordering is performed to show preferred records to the user, having
some diversified industry choices at the top that provide interesting results.
Nothing should change functionally.
UPG PR odoo/upgrade#2288
Task-2471703
Reveal industries were naively implemented to match a single ID on the reveal
service side.
While this is very convenient from a technical point of view, it does not
really work on the user end, since various industries are very similar and some
of them could be merged to ease usability.
This commit allows the crm.iap.lead.industry to have several reveal_ids.
Since we don't want to make this too complicated, we simply stored them as a
Char and separate them with a ",".
They are split right before being sent to IAP and all reveal ids are merged
back into a single list, making it work the same way as before on the IAP side.
We also took this opportunity to completely remove some of the listed
industries, since after some research they appear to give absolutely no result.
UPG PR odoo/upgrade#2288
Task-2471703
Preparation commit where we simply move the crm.iap.lead.industry model into
its own file.
As we are about to make some changes to the industry, we use that opportunity
to do a bit of cleaning.
Task-2471703
A fix was made in https://github.com/odoo/odoo/pull/66466 to consider
the situation where pin of employee is scanned using barcode. This
results to a change in behaviour in the NumberPopup where it no longer
accepts empty string as payload when it is confirmed. There are multiple
ways to solve this issue, and the simplest is just to adapt the test
following the behavior change. In this fix, we modify the starting
value of the popup so that when confirmed, the popup successfully
resolves.
closesodoo/odoo#70292
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Issue:
> Set bg color combination for a snippet... > Save
> Edit mode > Select the snippet
> Open color palette in bg option
> Hover a color option
> When a color button is left, the preview is cancelled
but the color combination class is not applied anymore.
In '_computeWidgetState' (for 'selectStyle' method), the right
value ('o_cci') is not returned because we get empty "colorNames"
(the "colorPalette" is not rendered on start).
The goal of this commit is to fix this behaviour by rendering the
colorPalette in start for snippet options, this way, the new code
won't affect the speed fix added in [1] for 'OPTIONS' tab.
[1]: https://github.com/odoo/odoo/pull/65223/commits/ce54c3f21293513673cb1fc6073ada5f0a2b5641
task-2538326
closesodoo/odoo#71365
X-original-commit: fd31c9a10f97c92a48d0589a8bbeaf13a641e891
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The `groupby` function is used to builds groups of(product, lot) keys
and their corresponding move lines / quants. `groupby` groups
*consecutive* keys, which is why the input is sorted by the keys.
`sorted` on recordsets keys will not sort as we would expect in this
particular situation, as the comparison operators on records act as
Set Comparison operators on the record ids, i.e. to compare the sets
superset/subset relationships:
```
>>> env["product.product"].browse(1) < env["product.product"].browse(2)
False
>>> env["product.product"].browse(1) < env["product.product"].browse([1, 2])
True
```
Example of sorted on stock.move.line records, where the product id 7313
is both in the slots 4 and 12 instead of being consecutive:
```
>>> [l.product_id.id for l in sorted(lines, key=itemgetter('product_id'))]
[7436, 7437, 7352, 7423, 7313, 7351, 7423, 7424, 7320, 7398, 7312, 7352, 7313, 7436, 7437, 7442, 7443, 7320, 7423, 7424, 7318, 7396, 7368, 7355, 7316]
```
Now when we group by id the 2 ids 7313 are correctly placed together in
slots 1 and 2:
```
>>> [l.product_id.id for l in sorted(lines, key=attrgetter('product_id.id'))]
[7312, 7313, 7313, 7316, 7318, 7320, 7320, 7351, 7352, 7352, 7355, 7368, 7396, 7398, 7423, 7423, 7423, 7424, 7424, 7436, 7436, 7437, 7437, 7442, 7443]
```
This commit aims to sort by "id" of the related records, to ensure the
same (product, lot) couples are consecutive.
closesodoo/odoo#71276
X-original-commit: d53d8bdf789e8f79ea4d531d944686abb59d6a26
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
In order to not show unnecessary tax groups when configuring a tax,
we'll now filter them to only shows the tax groups that are either
linked to no country, or that are linked to the same country as the tax.
Task id #2206280
Purpose of the commit is to hide the expense product from sale and
purchase menu.
So in this commit, make the expense product as sale_ok and purchase_ok
False to make them invisible in sale or product.
closesodoo/odoo#71222
Taskid: 2491238
Signed-off-by: Kevin Baptiste <kba@odoo.com>
- Create a product with Category configured with:
* Costing Method: First In First Out (FIFO)
* Inventory Valuation: Automated
- Create a PO to buy 2 units at $100 (PO1) and receive the products
- Create a SO to sell 2 units (SO1) and deliver the products
=> COGS of SO1 should be $200 ($100 * 2)
- Return 1 unit from previous delivery
=> COGS of SO1 should be $100
- Create a SO to sell 1 unit (SO2) and deliver product
=> COGS of SO2 is $100
- Create a PO to buy 1 unit at $200 (PO2) and receive the product
- Re-deliver the returned unit from SO1
=> COGS of SO1 should be $300 ($100 + $200)
- Create invoice for SO1 and post it
The journal items (account.move.line) corresponding to the COGS have an incorrect
value: $200 ($100 + $100), instead of $300 ($100 + $200)
The issue comes from the method computing the anglo saxon price unit.
It does not take into account quantities from stock moves that have been returned.
This commit computes the number of units that have been returned for each stock
moves used to compute the anglo saxon price unit and to take the result into account
during the computation (of the anglo saxon price unit).
opw-2501260
closesodoo/odoo#71346
X-original-commit: 83136c8e7569636d38e12fc45f297e4d6f22ad36
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
`./odoo-bin -h` prints unnecessary spaces between sentences.
---
task-2431630
Finetuning of #71130closesodoo/odoo#71364
X-original-commit: fcc60e219fd024394f8642509a20755f964546b6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
These changes have been made to be able to add some behaviors in some specific points of the flow when overridden.
X-original-commit: 455f49fe74611849ee1ff6addc875352d1b6c386
This legacy package was supposed to be an alias to `odoo.upgrade`.
However, depending on how your import its sub-packages (and in which
order), we were ending with the module being loaded multiple times,
breaking the expectation of a singleton.
```python
In [1]: from odoo.addons.base.maintenance.migrations import util as m1
In [2]: import odoo.addons.base.maintenance.migrations.util as m2
In [3]: m1
Out[3]: <module 'odoo.upgrade.util' from '/Users/chs/devel/odoo/odoo/stable/odoo/addons/base/maintenance/migrations/util.py'>
In [4]: m2
Out[4]: <module 'odoo.addons.base.maintenance.migrations.util' from '/Users/chs/devel/odoo/odoo/stable/odoo/addons/base/maintenance/migrations/util.py'>
In [5]: from odoo.addons.base.maintenance.migrations import util as m3
In [6]: m3
Out[6]: <module 'odoo.addons.base.maintenance.migrations.util' from '/Users/chs/devel/odoo/odoo/stable/odoo/addons/base/maintenance/migrations/util.py'>
In [7]: m2 == m3
Out[7]: True
In [8]: m1 == m3
Out[8]: False
In [9]:
```
Now, with this import hook, we ensure that the modules imported from
`odoo.addons.base.maintenance.migrations` are aliases to ones imported
from `odoo.upgrade`.
```python
In [1]: import odoo.addons.base.maintenance.migrations.util as m2
In [2]: m2.__name__
Out[2]: 'odoo.upgrade.util'
```
closesodoo/odoo#71351
X-original-commit: 0d0458a0f370f872caacac26361f2c4730c2cbba
Signed-off-by: Christophe Simonis <chs@odoo.com>
Co-authored-by: Christophe Simonis <chs@odoo.com>
Steps:
- Go to Website
- Click "Go to Website"
Bug:
The default phone number on the website is not fictional and may cause
unwanted spam.
Explanation:
In North America, only 555-0100 through 555-0199 are specifically
reserved for fictional use.
> The industry also reserved a block of 100 numbers as fictitious,
> non-working numbers (555-0100 through 0199) for use by the
> entertainment and advertising industries.
Source: https://www.nationalnanpa.com/pdf/NRUF/ATIS-0300115.pdf
opw:2530388
closesodoo/odoo#71341
X-original-commit: 37be09d7d73bd4942396f06f5b5cfa22cca78f56
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
When planning a Manufacturing Order, if an operation takes place in work
center with a different time zone, the computed date may be incorrect
(the start date may be outside the working hours)
To reproduce the error:
(Use demo data. Current timezone: Europe/Brussels)
1. In Settings, enable "Work Orders"
2. Open an existing Work Center
3. Click on "Standard 40 hours/week"
4. Set Timezone to "Asia/Bangkok"
- Note that all slots are between 8:00-12:00 and 13:00-17:00
5. Create two storable products P_compo and P_finished
6. Create a Bill of Materials BM:
- Product: P_finished
- BoM Type: Manufacture this product
- Components: 1 x P_compo
- Operations: 3 x Operation with existing work centers
7. Create a Manufacturing Order:
- Bill of Material: BM
- Quantity: 100
8. Save, Confirm, Plan
Error: (it depends on the time the test is done) The 'Scheduled Start
Date' of the second operation is incorrect. Adding the time zone
difference gives a time that is outside the work center's timetable
(i.e., outside 8:00-12:00 and 13:00-17:00).
The computations do not consider the time zone of the work center.
OPW-2393330
closesodoo/odoo#71332
X-original-commit: dab24e497f095d0c7857f07d037e9cb16749e2ea
Related: odoo/enterprise#18572
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Before this commit, when the use focused a many2one field and then
pressed tab, the first item of the autocomplete dropdown was selected.
This is not what we want if the user didn't write anything in the input,
and if he didn't use the up/down keys to highlight a specific item of
the dropdown.
This commit ensures that we only select the highlighted item when the
user presses tab if he previously wrote something in the input (which
hasn't been emptied meanwhile) or if he used the up/down keys to select
a specific item.
task-2455781
closesodoo/odoo#66443
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>