The ready code warning timeout of 2 seconds can be confusing since
it is triggered just after the 2 seconds. We can log this message
at the end in order to give the real timeout.
In JS tests, when the ready code takes too much time, a warning is
logged. As a consequence, the runbot updates the github status as a
failure, causing real pain to people who simply wants to merge their
features.
With this commit the warning is changed into an info and the runbot will
be happy.
closesodoo/odoo#34865
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Steps to reproduce the bug:
- Select template type boxed in general settings
- Select show serial/lot number in Delivery slip (in inventory - settings)
- Print the delivery slip with a non tacked product
Bug:
The delivery slip report displayed wrong columns.
opw:2031985
closesodoo/odoo#34852
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Usecase to reproduce:
- Create a MO for 5 final units
- Reserve all the components
- Produce 3 units
- Post Inventory (debug mode)
- Edit/Unlock
- Edit a line to consume to an arbitrary amount of quantity
- Change the product qty and set it to 3.
At this point, the reserved quantity and the quantity to consume
still the same than intialy even if the final quantity was updated.
- Mark as done
Then a move is marked as done withtout quantity done and still have
reserved quantity.
It happens because the _update_raw_move function do nothing if the
new quantity to consume is equals to 0.
The arguments returns in _update_raw_move still exists for override
but are not used by the chang_prod_qty method. It's not possible to
cancel the move and then find its parents in order to log the activity.
opw-2023653
closesodoo/odoo#34471
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Previous versions of this action had a domain. It was removed at 2d3e6d7383
Set explicitly an empty domain to force the removal when upgrading the module
Similar to 2d03ed43a5closesodoo/odoo#34581
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
In PostgreSQL, we can't CREATE OR REPLACE VIEW if there is the type of the column change.
To fix it, just drop the view before creating it
closesodoo/odoo#34851
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This is an api.multi method, which should therefore not call self.field.
Fortunately there's a loop just below.
opw 2035374
closesodoo/odoo#34832
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
before this commit the date of the IoT Box did not update.
With this commit we restart the service timesyncd on the IoT box
Task: 2034930
closesodoo/odoo#34789
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Steps to reproduce the bug:
- Install point_of_sale and account_accountant
- Create a company C in USD
- Create a cash journal CJ with no currency set
- Activate Multicurrency
- Create a pricelist P in EUR
- Create a sales journal SJ with currency = EUR
- Create pos.config in company C
- Assign SJ in the Sales Journal field
- Set P as default pricelist
- Set the cash journal CJ as payment method and save
Bug:
As CJ is implicitly in USD, it was wrong to set CJ as payment method in a pos.config
in EUR.
With courtesy of <jcb@odoo.com>
opw:2031883
closesodoo/odoo#34790
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
When reading the non stored computed field property_product_pricelist,
the force_company set in the context is taken into account. But when
writing on property_product_pricelist, the force_company was not taken
into account. So it was inconsistent as you could read a record with a
force_company in the context and wrote on an other record as the inverse
function didn't take the force_company into account.
closes#31561
opw:2032024
closesodoo/odoo#34757
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Let's assume a one2many field (editable list) in a form view with
a many2many (e.g. many2many_tags), and an onchange on the one2many
such that, when a row is added to the relation, the server returns
update commands for (a subset of) the records being already in the
relation. For thoses updated records, the many2many field needs to
be read (the onchange only returns the ids in the relation).
Before this rev., the many2many field was read independently for
each record in the one2many. This could cause a performance issue
on large relations. For instance, this was the case on
account.invoice records with a lot of lines.
This commit must be forwardported up to 12.2, not further.
Issue 2027356
closesodoo/odoo#34771
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Add the support to be able to specify exlicitely module, class and method name in test_tags
Before this commit, there is no distinction between module tag and test tag. Meaning
that --test-tag module_name will replace the default +standard tag and execute all test
of the module.
This commit tries to keep the initial behaviour, while addind new features, like explicit
modules tag with /module_name, as well as class (:class) and method (.method)
Some usage examples:
--test_tags /module will execute all standard test of module
--test_tags :class will execute all standard test with class name 'class'
--test_tags .method will execute all standard test with method name 'method'
--test_tags external/module will execute all external test of module
--test_tags */module will execute all tests of module,
--test_tags */module,-standard will execute all non standard tests of module,
--test_tags -/website:TestUiTranslate.test_admin_tour_rte_translator will disable only rte translator test
closesodoo/odoo#34756
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Before this commit, when a transaction has as status 'authorized', the
transactions' confirm page gives an error : 'Oops! There was a problem
with your payment.'
Now, the page gives the same message as when the transaction has the
status 'done' : 'Your payment was successful! It may take some time to
be validated on our end.'
opw-1984325
closesodoo/odoo#34652
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Before this commit, on a device with a "pen" (e.g. Surface Pro, ...),
it was not possible to sign a document on some browsers recently
updated (e.g. Chrome, Firefox, ...) only Internet Explorer was working.
Instead of drawing continuous lines only few dots appeared.
For Chrome and Firefox we have to catch events with "addEventListener".
For Edge we add touch-action property to convert touch events into click.
Steps to reproduce:
1) Go to sales app
2) Then go to quotations (menu Sales)
3) Create a new quotation
4) Click on preview
5) Click on the "Accept" button at the end of the preview
6) Use the "pen" to draw the signature (BUG)
We use a custom version of the jSignature lib (c.f. odoo/odoo@eddcb46),
so we have to patch the file in the Odoo repo with a mix of some
pull request found in the official repo and forks.
Link:
https://github.com/brinley/jSignature/pull/109https://github.com/brinley/jSignature/pull/159https://github.com/willowsystems/jSignature/pull/96
opw-2029684
Create a quotation and send an email to the customer, let the customer
reply by email, as a portal user go on the portal view of that
quotation, he does not see the emails.
opw-2008653
closesodoo/odoo#34611
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
On the webiste, add the Latest Posts widget. Create a new blog post,
publish it on website but set its "Publishing Date" `post_date` to a
future date. The blog post is not publicly available but is listed on
the latest blog posts.
opw-2027368
closesodoo/odoo#34760
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
[FIX] hr_timesheet_attendance: disable link from timesheet attendance report
---------
Before this commit, linking was enable for pivot view of hr.timesheet.attendance.report
Opening the record is useless since all information is in
the pivot view.
Also, no list view is defined, therefore an empty list view is opened.
This commit disable linking.
[FIX] hr_timesheet_attendance: Fix report date type
---------
The field `date` of `hr.timesheet.attendance.report` if of type Date.
However, in the SQL view, the value is wrongly set
to a datetime in the database.
Therefore, the value is a datetime in database, but it's considered
as a date by the ORM. This can lead to a traceback.
The postgreql function `date_trunc` is misused because it returns
a datetime.
Fix:
1. The date value from hr_attendance.checkin is a datetime
=> cast to date
2. The date value from account_analytic_line.date is already a date
=> don't do anything
closes#34046#34612
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#34741
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The field `date` of `hr.timesheet.attendance.report` if of type Date.
However, in the SQL view, the value is wrongly set
to a datetime in the database.
Therefore, the value is a datetime in database, but it's considered
as a date by the ORM. This can lead to a traceback.
The postgreql function `date_trunc` is misused because it returns
a datetime.
Fix:
1. The date value from hr_attendance.checkin is a datetime
=> cast to date
2. The date value from account_analytic_line.date is already a date
=> don't do anything
Before this commit, linking was enable for pivot view of hr.timesheet.attendance.report
Opening the record is useless since all information is in
the pivot view.
Also, no list view is defined, therefore an empty list view is opened.
This commit disable linking.
Before this commit, `language_ids` field would be required through python code.
It is the only website res settings field that is required=True.
That's an issue since the website settings can be empty if there is no readable
website. In that case, the settings won't save.
Website res settings should be set as required XML side, in the view,
conditionned on the fact there is a website selected or not.
For the reason why there is not always a website selected, see bb473003d7.
closesodoo/odoo#34706
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The balance start should only be set with the ending balance of the
previous session when journal type is 'cash'. When the journal type
is 'bank', it must be 0.
Fine tuning of this commit: 46d0b461cd
opw:1981984
closesodoo/odoo#34735
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Same reason as: 4ba4d61903
Some messages from payment are displayed on the frontend (eg. when the
transaction is being done on the ecommerce), but only translations of
module matching a given domain (computed with the method of ir.http
model: _get_translation_frontend_modules_domain) are made available on
the frontend.
With this changeset, payment is added in the domain (which can be done
since payment depends on account, account on portal, and portal in
http_routing that declares the method).
opw-2033528
closes#34712
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Setup a multi-company account and multiple website (one for each
company), create a mail campaign from a different company than the
superuser, send the emails and unsubscribe, the company logo is the logo
of the company the superuser is in instead of the logo of the company
sending the email.
opw-2026528
closesodoo/odoo#34701
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Steps to reproduce the bug:
- Create two companies C1 and C2 where C2 is the child of C1
- Create two purchase taxes T1 and T2 where T1 is in C1 and C2 is in T2
- Create a prodcuct P with T1 and T2 as supplier taxes
- Be in C1 as current company
- Create a RFQ and add P
Bug:
T1 and T2 were set on the order line of P instead of T1
PS: This fix is insired from product_id_change in model sale.order.line
opw:2032113
closesodoo/odoo#34658
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Have a user U that is Project User, Timesheets User, Employeed Officer.
Give him access to a private task T (by adding U as a follower of T)
on private project P.
Because of Employeed Officer rights, view_task_form2_inherited is rendered.
This shows field is_project_map_empty, which computation depends on project_id.
If U does not have access to P, then this triggers an access error, so the Task
cannot be displayed.
It is in general a legitimate configuration to allow U to interact with T
without being given full access to P, since it works in all cases but the rights
described above.
Since the computation of is_project_map_empty is the only blocking point,
we put it in sudo.
opw 2031124
closesodoo/odoo#34676
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In multicompany mode,
/!\ Adress book sharing should be deactivated
User A in company A creates a vendor bill without a partner
User B in company observes the list. The new bill is present
User A changes companies and goes to company B
User B doesn't have access to company B
User B reloads the list
Before this commit, there was an access right error on User B side because the partner associated
with User A changed company, and is now unreadable from User B perspective
After this commit, there is no crash and we have the string: Created By User A in the list
in place of the vendor display name
OPW 2028451
closesodoo/odoo#34668
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this patch, this method was altering the signature of its parent method, moving the position of `failure_type` to 1 and making the other 2 arguments kw-only.
It seems this accidentally didn't break anything because all calls happened to be done in kwarg mode. However, it's very possible that a downstream module that is not based on `mass_mailing` and makes positional calls gets broken when `mass_mailing` is installed.
The fix is to respect original method signature.
closesodoo/odoo#34648
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
The callback will usually check the transaction's state during
its execution, hence it should be executed after the state change
closesodoo/odoo#34666
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Move inside a node so the term can be exported (t-esc value are not
translatable)
opw-2031550
closesodoo/odoo#34663
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
[FIX] mrp: Manufacturing cost analysis report
Steps to reproduce the bug:
- Create a finished product P with a manufacturing BOM B
- Set two components on B C1 and C2
- Create a MO with P and process it(plan and produce it)
- Unlock the MO and set the consumed qty of C1 to 0
- Lock and click on Mark as Done
- Click on Cost Analysis
Bug:
C1 was displayed in the report with a qty = 1.0
Fine tuning of this commit: cb4afb263b
opw:2010912
closesodoo/odoo#34642
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Set an automatic reconciliation model with a tax
Create a bank statement on which one line will be caught by that model
Click on reconcile to get to the reconciliation widget
Observe the account move lines creates
Before this commit, the move line representing the tax amount
(and in the account for taxes) did not have a tax_line_id, which is
a reference to the tax that made the line exist
This messed up tax reports
After this commit, the move line of the tax has a reference
to the tax it originated from
The tax reports are correct
OPW 2006826
closesodoo/odoo#34627
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
On a small display, go to accounting > journal entries > create
In the (now kanban) list of account move lines, click ADD
Then, try to choose an account
Before this commit:
The list of accounts was empty.
This was because the form view spawned was the automatic generic one
The generated view did not have thr necessary structure to get fields' value
from the parent form view.
In this case, the domain of the name_search for account.account was wrong
After this commit:
The flow works on mobile as on desktop. The form view's arch is a 1 to 1
copy of the list view in terms of fields and their definition
OPW 2030837
closesodoo/odoo#34601
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Backport somewhat improved version of this fix (we don't need to check
for the existing extension since we're not doing anything if there is
an extension at all) merged into later branches, to avoid forward-port
conflicts.
closesodoo/odoo#34509
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Before 8557bcf the URLs were never rewritten for multilang, which was an
error and could duplicated the number of requests on frontend.
Since 8557bcf the URLs are rewritten. In Odoo the werkzeug library is
used to parse the URLs (this is similar to python parsing URL but works
in python2 and python3 the same), and in this particular instance it
chooses that tel:800800 is website http://tel:800800 and not a telephone
number.
The problem is when the url uses the uri 'tel:' and only numbers as a
phone number, if the user uses the global format for telephone number
(with the +) or using a separator for the numbers (e.g. '-' , '/'), in
these cases there are no problems parsing the url (phone number RFC:
https://tools.ietf.org/html/rfc3966).
This commit changes the uri 'tel:' to 'tel://' this one is correctly
parsed by the werkzeug library.
opw-2029844
closes#34306closesodoo/odoo#34586
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit fixes multiple issues regarding the /shop/address and /my/account
forms where both are displaying `vat` and `company_name` fields.
1. For a company's child partner, the `company_name` was empty instead of
showing its company name (the name of its parent_id which is the commercial
entity).
2. It was possible for a child partner to edit its `vat` (which is a field
synced from parent to children, but only parent should be able to edit it as
it is the commercial entity, see 4a1bc45934 and 98b1fffd4e).
3. Company name now share the exact same condition than the vat field in order
to be editable (as it should have been). It was possible to edit vat but not
company name on /my/account.
Steps to reproduce the bug:
- Create a company contact CO with a VAT number
- Create a contact C in CO with portal access
- Log with C and go to the shop
- In the checkout, try to edit the address details
opw-2007368
closesodoo/odoo#34564
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>