The field job_id is displayed in the tree view but it was not available in the form view
like in 12.0. So it was not possible to change it.
opw:2006084
closesodoo/odoo#33933
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
We now force tax repartition lines to use the same percentages for invoices and credit notes. Thanks to that, we are able to simplify the way manual modifications made on vendor bills' account.invoice.tax entries must affect the ones of the refunds created for them. This also prepares the code for the incoming big accounting revamping.
closesodoo/odoo#33577
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
For each asset depreciation lines we verify that there are not linked
to a move. This verification was done for each line separately.
Moreover, during the creation of the journal entries, we were writing
on the 'line_ids'. In this case, accessing the move of a line
was invalidating the cache. This fix ensure that this operation is
done out of the loop and the cache is then not invalidated at each
step.
See opw-2000305
closesodoo/odoo#33908
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Currently, `generate_work_entry` has a different behavior
if the type of parameters is `date` or `datetime`:
If the type is `date`, it implicitely set hours and minutes
to 00:00.
It is particularly confusing when `date_stop` is a `date`:
work entries are not generated for this day because it's
actually outside of the range.
This commit makes it consistent in all cases:
-hours and minutes are set to 00:00 for start date
-hours and minutes are set to 23:59 for end date
closesodoo/odoo#33906
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
If you are logged into a company that differs from the company of your
employee, you won't be able to read the informations on that employee,
and you will have a crash.
Instead of taking the employee linked to the current user, we use search
in order to first apply the ir.rules hence we ensure that we will be
able to read the needed informations.
Since test_pylint was moved into the test_lint module in commit
b27077bb, this could break Odoo instances where a module has test_pylint in its dependency.
With this commit, the test_pylint module is coming back as an empty
module.
closesodoo/odoo#33871
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
In case the partner has no language (not a required field), the fallback on the
payment transaction was 'en_US'
en_US may however be an invalid choice for partner_lang field as it is
a selection field that only has the activated languages (result of the call to
self.env['res.lang'].get_installed())
A database created in a different language does not have en_US activated
Fallback on user language instead of False as the partner_lang is expected by
some payment providers and may produce an error is empty
Fixesodoo/odoo#33750closesodoo/odoo#33870
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Changing the 'public' attribute of a mailing list to "Public" (e.g. to publish
it on /groups page), was triggering the _onchange_public which changed the
visibility of the mail.alias to public.
This was incorrect as a channel may be public but it does not means everybody
should be able to post in it. It is still possible to restrict the access to
specific members only (and it is probably a good reason to avoid spam).
The intention of 66bd7707f5 was to protect the private channels
by default but had the opposite effect if the visibility was changed.
Changed the onchange evaluation to only restrict the access when unpublishing
a channel but do not force it at public.
Context: unpublishing and republishing a mailing list had the effect to change
the alias privacy to 'everyone' and we received spam
closesodoo/odoo#34105
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Create an invoice, validate it, print the invoice from the print menu,
as of the paperclip value in the chatter, an attachment has been added.
But if you click on the paperclip, there are no attachments. You need to
reload the page in order to access the attachments.
The problem is the internal flag indicating that all attachments are
fetched is wrong. This fix resets the flag when the paper clip value
changes.
opw-2008344
closesodoo/odoo#34171
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When creating a manufacturing route in 2 companies in a multi-company environment,
only the routing 's reference of 'My company' got a sequence but the routing 's reference
of the other company stayed 'New'. Now the default sequences for mrp.routing are shared
between companies like SO and PO.
opw:2008570
closesodoo/odoo#34169
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Select 2 hr.expense then go to action > submit report
Before this commit, the company currency amount of the first expense line of the report
was equal to zero, always
This is because, when evaluating onchanges, a tree is constructed in the order of the model._fields
which is an orderedDict, filled up when the class is the read
So in python and in the Odoo ORM, the order of field declaration does matter
i.e. a @api.depend fields must come *after* the fields it depends on
After this commit, everything computes as expected
OPW 2008868
closesodoo/odoo#34110
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The regexp used to get the youtube video id from its url is broken in
multiple ways.
If the video ID starts with the letter 'v' in the short (youtu.be) url
then the url is considered invalid. i.e. https://youtu.be/vmhB-pt7EfA
If the query option `v=<video id>` is not the first option of the query
in the regular url (youtube.com/watch) then the url is also considered
invalid. i.e. https://www.youtube.com/watch?feature=youtu.be&v=vmhB-pt7EfA
The problem has been solved by replacing the over-engineered regexp by
the dedicated parsing tools of `urllib.parse`.
opw-2006330
closesodoo/odoo#34036
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
For a not yet known reason, a race condition appeared during HttpCase
tests that use ChromeBrowser. When the test is finished, failed or not,
the Chrome broser instance is terminated and the temporary profile
directory is removed. Sometimes, a file is still written in the profile
dir during the shutil.rmtree processing, when it tries to remove
directories that should be empty, causing a traceback.
With this commit, the error is simply ignored.
As on the runbot, tests are run in Docker containers, it's not harmful
to keep a directory.
closesodoo/odoo#34168
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Method _get_locations_values is called outside loop which generates 'Expected singleton' when write on Warehouse is called in batch.
closesodoo/odoo#34164
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Send an invoice by email but configure the sender email on the email
template. The `mail_template.email_from` field is ignored by the wizard
and the email is sent using the default `mail_message.email_from` field.
opw-2003562
closesodoo/odoo#34123
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Steps to reproduce:
- Go into accounting> journal entries and
- Choose a posted entry
- Press the duplicate button
Bug:
No button Edit, Save or Discard for the duplicated record.
Fine tuning of this commit: d79007c
opw:2009050
closesodoo/odoo#34096
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The input/output stock interim account in anglo-saxon localizations
should be reconciliable.
Related task id: 1970471
closesodoo/odoo#32824
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, it was not possible to have the field message_attachment_count
explicitly defined in the form view. It crashed inelegantly if it were the case
After this commit, it is possible to have that field in the form view
OPW 1998503
closesodoo/odoo#34143
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Before this commit, when user duplicates the journal entry, the action panel and breadcrumbs are lost
due to 'inline' action given in it for opening form view in edit mode directly.
After this commit, when user duplicates the journal entry the action panel and breadcrumbs will be appear
and also the form view opens directly in the edit mode.
task-1999208
closesodoo/odoo#34127
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
The BS3 'show' class cannot be supported as BS4 still defines a 'show'
class for other purposes which conflict with its former use (tab-pane,
fade effects, ...). Adding more complex rules won't solve the problem as
they would change css rules priorities.
closesodoo/odoo#34139
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Commit https://github.com/odoo/odoo/commit/4f9a0cb4fcdfa9fee66c042593f4d411dd0e192f
introduced a way for users to enable a compatibility template to provide
support for some old BS3 classes.
Some of these classes are the bg-gray-* classes. The problem is that
enabling the compatibility file forces them to the new BS4 gray values
while the user may have done a custo to generate them automatically
from other gray values. This commit allows to keep the compatibility
file enabled, without overriding compatibility grays the user may have
provided on its own.
closesodoo/odoo#34134
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- Activate multi-company
- In a SO, remove the company (the field is not mandatory)
The currency rate computation crashes.
The computation expects a company in order to compute the rate.
If there is no company set, we set the rate to 1.0. It is worth
stressing that if both multi-company and multi-currency are activated, a
company is necessary for reporting consistency.
Fixes#34066
opw-2009044
closesodoo/odoo#34120
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Create a lead, assign it to a partner who has portal access. Go to that
opportunity on the portal, edit any date to set 3-digit year (0-999) and
submit the form. Go to the opportunity using the web app, traceback.
Dates are only supported starting to 1900 thus many parsing function
assume the year to be a 4-digits year. The html form has been changed to
use an input type date with a minimum value instead of a plain text
input. This ensure a better support by browser (they use their built-in
calendar) and allow basic html5 form validation.
opw-2033276
closesodoo/odoo#34796
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Future runbot improvement may share sources between build,
meaning that sources will be readonly to avoid any interaction.
_touch() was supposed to handle ro filesystem but
f7130556 introduced a new test that was not working
in this case.
Instead of trying to touch file and pseudomocking the result
if the filesystem is readonly, this commit add a real patch
on getmtime.
cherry pick of b295723c99closesodoo/odoo#34822
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
When uploading a file to a binary file, then clicking on the
"clear" button, then reuploading the same file...
Before this commit:
The actual input of the field was only changed on user input.
This means that the "clear" action didn't reset the actual value
of the input, and the browser's default behaviour when getting
the same path twice is not to change anything. In the use case,
you couldn't upload the same file until you uploaded another one.
After this commit:
The "clear" action now also clears the value, allowing reuploading
the same file over again.
closesodoo/odoo#33843
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
when we select places warehouses where route can be applied, then unselect that warehouses, warehouses values on m2m tag are not deleted.
because of wrong value empty list on onchange. so remove all records of warehouses if warehouse option was not selected.
closesodoo/odoo#33883
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, user would be redirect to / instead of /my after signup.
That error was detected with task-1829827 which has a tour ensuring user is
correctly redirected to /my after signup on the checkout summary after payment.
Since 0229ef4c4a, the `web_login()` super call order has been changed when
called from the `/web/signup` route.
See the commit for more details but basically, before the fix, it went only
through:
1. web.web_login
2. portal._login_redirect
Where now, it goes through:
1. website.web_login
2. auth_signup.web_login
3. web.web_login
4.portal._login_redirect
Thus, portal._login_redirect is not returning `/my` as redirect anymore.
Indeed, website.web_login will ignore its super() and force redirect to `/`
With this commit, website's user are redirected to /my as expected.
Side effect: website's user will also be redirected to /my on login instead of
`/`, which is also prefered.
closesodoo/odoo#33865
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When we add a document with the "Select a Media" modal, if we reopen the
modal then click on "Save" without modfiying anything, the element is
broken since we do not have the data saying it is a document and the
code try to display it as image.
With this changeset, we keep the information that the attachment is a
document and when saving it works as expected.
opw-2004064
closes#33844
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Add two PO with references 'XY' and 'Z' to a vendor bill.
The reference is computed as 'XY, Z' (with ', ' as separator).
Add a PO with reference 'X', the reference becomes 'X' instead of 'XY, Z, X'.
There are two variables that may not be defined (vendor_ref and self.reference),
and specifically the case where a reference is the prefix of another one is not
correctly dealt with.
opw 2005825
closesodoo/odoo#33841
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
For recurrent events, many fields are set to define the recurrency;
these fields are invisible unless (recurrency', '=', True).
However there are fields that depend on fields to define the recurrency,
which are required in some cases.
However in case where recurrency is later set to False, no onchange cleans up
the intermediary values (this is taken care of in the create),
but the 'required' on the non-relevant fields might prevent from saving.
We fix these cases by adding the recurrency in the list of requirements.
opw 2002181
closesodoo/odoo#32698
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
fields account_id and refund_account_id on account_tax_template have been moved on the repartition line of the same model.
closesodoo/odoo#33829
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
When talking via the Live Chat to a known partner, should be able to see
his name in the chat window title, from the commit: c04b9c019e
the partner name wasn't showing in the title as sudo is being used.
After this commit, known partner name will be shown in the
Live Chat window title.
And improving a test case, in which we're checking for the known partner's
name in the chat window title.
task-1940407
closesodoo/odoo#33831
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Creating a new database with only website_sale_coupon installed will
make some (website_)sale_coupon tests fail. This is due to a race condition
messing with the value of the pricelist product.list0 currency.
The tests are failing due to amounts being compared after the USD
currency rate of 1.2834 has been applied.
Example on a 10% discount:
expected:
>>> 320 * 0.9
288.0
actual:
>>> 320 * 1.2834 * 0.9
369.62
This is due to
https://github.com/odoo/odoo/blob/3cf9cfc985950c30c6b76480f77f5ffe53650b24/addons/website_sale/data/demo.xml#L228
overriding the value to USD. The tests should not rely on this.
This commit aims to ensure the currency is enforced before each test run.
closes#4371
Signed-off-by: Christophe Simonis <chs@odoo.com>
X-port/Cherry-pick of odoo/enterprise@c1cc464c44
Now in 12.3, when the a editable list view is grouped, the "Create"
button is no longer shown as was the case before (when it would open the
form view when clicked).
In 12.3 when lines are resequenced, the position of the current line
does not take into account that it could have been changed (because of
drag and dropping a line before or after).
opw-1966589
closes#33878