Complete cd4080839f
<span class="fa fa-globe" title="Title stuff"/>
is not correctly extracted but
<span class="fa fa-globe" title=""/>
was also extracted while there is no content
Check the size of the content too
Similar content is present on odoo.com website and should not be translatable
on Transifex
closesodoo/odoo#32018
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit adapts the leave request form on mobile.
Dates fields didn't take all device width.
As it's not a critical issue, it's up to the customer
to update this mobule to apply this fix.
Task ID: 1944884
closesodoo/odoo#32020
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
In the `getMatchedCSSRule`, the transcoder try to find the real value of
a `text-align: inherit` css rule by ascending the html tree until it
finds a `text-align` with a meaningful value. By default is exits if it
reachs the `<html>` top node but doesn't exit if a call to `.parent()`
exits the dom (the behavior of jquery is to return a dummy element when
calling `.parent()` on an element that has no parent). This lead to an
infinite loop for badly formatted html content.
opw-1951095
closesodoo/odoo#32014
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Create a vendor bill from documents, change the partner, the default
terms and conditions are automatically set on the bill.
The problem is due to a wrong default value, the onchange only uses
the invoice type from the environment but never from the invoice itself.
opw-1936083
closesodoo/odoo#31905
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This patch changes the create of `account.invoice.line` to use
`model_create_multi`, which allows the batch creation of multiple
invoice lines while only triggering the recompute of all related fields
once.
It also changes the generation of invoices from a SO to take advantage
of the create multi of `account.invoice.line`.
For a SO of 2000 lines:
Pre-patch:
~417s to generate an Invoice
Post-patch:
~30s to generate an Invoice
closesodoo/odoo#31975
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Go to Accounting > Reports > Invoices
- Go to the pivot view
- Enable 'Total' and 'Untaxed Total' in the measures
The Total is wrong.
`amount_total` is retrieved on the invoice, unlike the subtotal which is
retreved on the invoice line. We apply the same logic than
`residual_company_signed`.
opw-1950663
closesodoo/odoo#31991
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When used with a mutable default value, `dict.fromkeys()` builds a dict
where each key references the same value:
>>> r = {}.fromkeys(['foo', 'bar'], {})
>>> r
{'foo': {}, 'bar': {}}
>>> r['foo']['val'] = 1
>>> r
{'foo': {'val': 1}, 'bar': {'val': 1}}
Updating one key's value will change the value for all keys.
closesodoo/odoo#31659
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Import a list of partners with their addresses.
The state_id field is usually filled with the state codes.
E.g. 'CA' is used for California, but also for Cádiz (Spain), etc.
The import function (db_id_for) uses a name_search on the res.country.state,
and takes the first matching result.
It follows that the state does not necessarily match the country.
Therefore we add a _check_import_consistency in the create.
Here we check that the country matches the state's country,
try to find a correct match, and if we can't we put the state to False.
Note that if the country is not set both fields will end up set to False:
this is because only a state would mean using a code could give an abitrary
country.
opw 1943904
closesodoo/odoo#31599
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
make sidebar filter generic
Adding `res_model` and `res_fields` attributes on a field of
a calendar view adds a filter in the sidebar.
It saves the result as the defined model and should save it
in the defined field.
However `partner_id` has been hardcoded in the rpc call that creates
the record. This breaks genericity, it cannot be used with another
field than `partner_id`.
This commit makes this generic by correctly setting the field name
in the rpc call.
closesodoo/odoo#31858
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Ildar Nasyrov <iledarn@gmail.com>
In a report a lot could be opened with an action that was a number
instead of expected string or falsy value.
In web and web_studio, we sometime expect the action name to be a string
or falsy (calls to `bc.title.trim()` in breadcrumbs code).
opw-1951174
closes#31816
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When creating a new PO from a purchase requisition, the order date of
the PO is the last date of the contract. There is no reason for this,
and althoguh the date can be manually changed, it is error-prone.
opw-1937141
closesodoo/odoo#31969
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
A recent fix c41d1d2 was made to select the related pricelist
to show the correct price of an event product.
This fix creates another bug in case of Ecommerce app
not installed, because the method get_current_pricelist
is defined in website_sale module.
We need to move the fix from website_event to website_event_sale module.
closesodoo/odoo#31953
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Install accounting in a multi company environment.
Configure email server.
Configure an alias for the vendor bill journal per company.
Before this commit, all the invoices were created in the same company,
regardless of the alias used.
Now, the invoice is created in the company of the used alias.
opw-1939909
closesodoo/odoo#31948
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create a SO with a dropship product, set a qty of 1.0
- Validate the SO
- Validate the corresponding PO
- Change the qty to the SO to 2.0
2 PO are created: the first one with a qty of 1.0, another with a qty of
3.0.
There is an overlap of functionality between:
- `_purchase_increase_ordered_qty` from `sale_purchase` (first PO)
- `_action_launch_stock_rule` from `sale_stock` (second PO)
The quantity is incorrectly computed since the quantity on the PO is
taken into account only if the no stock move exist.
We remove the latter condition, so the procurement quantity is computed
correctly.
opw-1950076
closesodoo/odoo#31963
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Step to reproduce:
- Install sale (sale_management) and studio (web_studio)
- Change the document template (settings > configuration > general
settings) to select the second one
- Go to an order form
- Enable studio, select "Reports" in the right tab
- Edit the "Quotation/Order" report, add a new colomn
- Back to the order form, enable dev mode and add a section to the order
lines.
- Print the report => the section is not using all the available place.
The section/subtotal are using a colspan to use all the place in the
table, this colspan is hardcoded to 5, the number of columns without
customization. Adding a new column doesn't change that value.
The fix has been to force the colspan at 99, the maximum value for
colspans. Using that value will always render the row to fill the table.
opw-1936088
closesodoo/odoo#31951
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
The activities "Document Name" (res_name) are computed and stored by
getting them on original document, so if we change name of original
model => the activity names are not updated.
Thus the document name we see we showing the "Activity" view is the one
that was used when activities were created with an odd heuristic (by
inverse order of activity type and max alphabetical value) and not
translated.
With this changeset we ignore "Document Name" and directly get names of
records when display "Activity" view.
note: the changeset also filter out activities on document we can reads:
this was done when a domain was set but not otherwise so access error
could be easily gotten.
opw-1949437
closes#31850
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The name_search of account.analytic.account do not find records that
have no partner set.
This is because some ORM search may breaks when it contains a
auto_join relational field. We will try to fix this (at least in master
version).
In this changeset, we avoid the issue by combining 2 searches instead.
opw-1941547
opw-1950010
closes#31881
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Some valid facebook pages appear as broken by the preview although
they load perfectly fine afterward.
At facebook, an id is required to perform requests to their graphql
endpoints. The ID is part of the URL of the page, sometime (like Odoo)
the ID is the name of the page and sometime (like LACME France) it is
a generated 9-digits id shown in the URL after the name of the page.
Example of two valid page URL and their page ID:
https://www.facebook.com/Odoo
^^^^
----
https://www.facebook.com/LACME-France-910072559192969
^^^^^^^^^^^^^^^
----------------------------
`^` denotes the page id and what odoo uses as page id after the commit
`-` denotes what odoo used as page id before the commit
opw-19494444
closesodoo/odoo#31922
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Field `auth_msg` never existed, this is an uncaught mistake. This commit
removes its usage and displays the fallback message to avoid runtime
error.
Closes#31903
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Co-authored-by: Marius Stedjan <marius@stedjan.com>
- The attachments in the tasks page on the portal can be accessed by
clicking on them.
They are delivered by the controllers at URL `/web/content/XXXXX`.
By default when enabling the Content Delivery Network feature on the
website module, the content delivered by the controller
`/web/content/` is done through the CDN which has no user account,
thus may not have access to the attachment.
To fix the issue, we disable the CDN feature for the attachments in
the tasks portal page.
OPW-194571
closesodoo/odoo#31924
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
If res_id is not defined, this method used to crash.
Made obvious by commit a26496b6e7,
which added a call to that function in the main controller of web.
opw 1950403
closesodoo/odoo#31923
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, users wasn't able to input values in some
input elements like password, email and phone in mobile.
Steps to reproduce:
- Go to user
- Select Preferences
- Select Change password
- Try to input something
=> The focus was lost and the keyboard disappeared
In fact, a hidden input always have the focus when no other fields
need it. This input is used to intercept a value from a barcode
scanner.
So now, we added some input types to avoid to set the focus on the
barcode input.
The barcode input is now always defined (even if not used in desktop)
to be able to mock a Chrome mobile environment in a test.
opw-1936712
opw-1948266
closesodoo/odoo#31841
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
PR #31086 converted the not-downstream traceability domain to use a
filter instead as =/!= False on an o2m can lead to memory issues due
to the way they're currently implemented / transformed. This also
converts the downstream versiom just in case and to limit deviations
between the branches.
Co-Authored-By: Daniel Reis <dgreis@sapo.pt>
closesodoo/odoo#31901
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
We set the default rate to be 1.0 instead of 0.0, since a rate of 0.0
doesn't make sense.
Partial backport of 298491597c
opw-1949866
closesodoo/odoo#31866
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, it may happen that the the grouped account move lines
sum will be business-wise "zero" but that its representation in SQL will not be
rather, it will be equal to "10^[-high number]"
After this commit, we round the sum to the number of digits of the company's currency
to see if it is equal to zero, or not.
We also need to filter out the specific case of unaffected earnings
OPW 1942177
closesodoo/odoo#31755
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Have a partner (vendor) with a bank account.
Create a Vendor Bills. Change the form view of the vendors bills to
display the field partner_bank_id ('Bank account').
The field shows correctly the bank account of the vendor.
Before this commit, when creating a Credit Note, the field
partner_bank_id is empty.
Now, the field parnet_bank_id is the one of the Company.
opw-1903143
closesodoo/odoo#31554
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Activate Lots and S/N
- Track a product A by unique S/N
- Receive one unit of A
- Sell the unit of A through the POS
- Go to Invnetory > Products > Lots/Serial Numbers, and open the
Upstream Traceability report
The line corresponding to the outgoing move line is not linked to the
corresponding picking.
The field `picking_id` is empty on the `stock.move.line`, so the link is
not directly retrieved.
Related to #31879 which fixes the issue for existing `stock.move.line`.
opw-1939413
closesodoo/odoo#31880
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Activate Lots and S/N
- Track a product A by unique S/N
- Receive one unit of A
- Sell the unit of A through the POS
- Go to Inventory > Products > Lots/Serial Numbers, and open the
Upstream Traceability report
The line corresponding to the outgoing move line is not linked to the
corresponding picking.
The field `picking_id` is empty on the `stock.move.line`, so the link is
not directly retrieved.
Even if the POS should set the `picking_id` field, the traceability
report should fallback on the picking of the move.
opw-1939413
closesodoo/odoo#31879
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
In reconciliation widget, when clicking reconcile with some existing line. if by any chance the transaction gets rolled back because of a concurrent update, the next replay attempt will use the modified parameters, and we will get a KeyError. Retrying the operation will succeed as soon as no other transaction conflicts again.
Altering mutable RPC parameters is a bit risky in a public RPC method, particularly when those altered parameters will modify the effect of the method. Making a deepcopy of the parameters before using them is an easy workaround. The framework does not do it by default because of the hard-to-foresee memory overhead it would have.
fixes#25403closesodoo/odoo#31882
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>