When validate an invoice, if you are timesheet
user and billing user, it is forbidden for you
to create an analytic line without a project set.
This commit allow billing user to create AAL.
opw-776391
With Odoo v11 running on Python3:
1. Go to Settings -> Translation -> Import Translation
2. Choose a valid .po file (e.g. generated with the menu Export Translation)
3. Click Import
There is a server error.
There are two bugs behind this error:
1. we open a temporary file that cannot insert bytes ('w+')
2. the name of the temporary file is an integer (its file descriptor)
Python2 processed some implicit conversion between str and bytes, so that the 1st error doesn't occur. The name of a temporary file in Python2 is '<fopen>'.
We made the following corrections to the code:
1. open the temporary file with w+b access (write bytes)
2. enhanced a conditional statement so that we skip instructions in case where the field name of the tempfile is a string
Related Ticket:
opw-775445
This commits fixes a traceback that appears when ticking a checkbox in
an x2many which triggers an onchange. The root cause of the issue is
twofold:
- confirmUpdate requires currentFieldIndex to be defined, but might be
needed when setting currentFieldIndex;
- confirmUpdate attempts to restore the selection range even if we are
not dealing with a char field (e.g. checkbox).
We solve the issue by ensuring that _selectCell gives a temporary value
to currentFieldIndex. This value is chosen so that confirmUpdate calls
_selectCell with the right parameters. Moreover, we only restore the
selection range when the range is defined.
This commit ensures that tab navigation works properly when editing a
form view that contains input fields with phone widgets. Previously,
pressing TAB would skip those fields.
It is possible that the price unit the move was created with is no
longer valid (for instance, one could change the price unit on the
purchase before validating the receipt, or the currency rate has changed
in the meantime).
Fixes#20035
The name field is a stored related on the resource.resource record.
The name on the resource is required.
If no name (and no resource_id), the creation fails as trying to create a
resource without name (non-null constrain)
Force in the view to indicate to the user that a name is required but without
adding the constrain at the database level.
required=True on the fields adds a non-null constrain on the SQL column but the
related values are populated *after* the INSERT so it would fail depending on
the given values (e.g. a resource_id value but no name)
Fixes#20126Closes#20128
The automated tests of rpm,deb and src packages are using docker
images and containers. Those tests were not working as expected due
to various small glitches:
* some debian python- packages were missing in the Debian image
* pip was called instead of pip3 for the src test
* a wrong addons path was given for the tests
* the containers id's were wrong due to a bytes implicitly converted
to str
When you open a move of a component in a manufacturing order, we cannot
see the move lines and so add a new on if there are no move lines in it
with finished lot. We now always display the list of move lines if
product is tracked by lot/serial or has finished lots.
The idea is to warn user if he created a special file (website.page with
supported extension) and he wants to change the file's name, which will at the
end also change the key).
If this special file has been t-called elsewhere, they t-call wont work anymore
This is why warning user is needed.
Note that this is different than the already existing page_search_dependencies
that is just checking if the URL is present in menus, templates, blog or pages.
This is about checking if the key is present somewhere. (we assume that if the
key is present, it is surely about a t-call.
Technically, the flow is:
1. Get supported extension
2. Get key dependencies
3. Check if user modify name
4. If name changed and it is/was a supported extension (special file) and it
has dependencies (surely t-call) then warn user these call wont work anymore
--
search_page_dependencies is also improved by returning links to be clickable
(on delete dialog eg) and splitting template/page results.
it also refactor dependencies warning that was creating HTML in javascript into
using XML template
Before this commit, if you created a page with the same name as another one
(which is allowed) it would set the same key for that second page.
Indeed, the code was setting correctly the path uniqueness but it was then
setting the key based on the name and not on the unique url we found free.
Now, the key is correctly uniquely set and even better, it is now completely
independant from the url and has its own 'find unique' method to be sure it is
correctly working.
It was not clever to have key & url being linked.
To be more clear:
1. Create page 'aboutus'
key is 'website.aboutus'
name is 'aboutus'
url is '/aboutus'
2. Create page 'aboutus' ->
key is 'website.aboutus'
name is 'aboutus'
url is '/aboutus-1'
Problem: key should be unique (for t-call for specific files & website_version)
Cause: key is set based on name which is not checking for uniqueness like url.
Two possible solutions:
1. Set key based on url (which is being checked for uniqueness)
2. Create & Use a specific method to get unique key
Fixed with solution 2 which is more clean.
--
It also fix an invisible 'bug':
Saving a page being in menu would cause the menu's URL to get it's trailing '/'
to be removed. It was only a problem when you were getting the warning about
dependencies (the menu wouldn't be recognized as dependencies because of the
removed '/')
Before this commit, if you created 2 pages with the same name/url it could
create both the pages with the same url.
Now, like before, it is correctly adding a suffix (eg '-1') when you create a
page with an URL already taken
Before this commit:
When you were on the page manager and you were editing a website.page's
content, it would redirect you to the website.page's ir.ui.view's form view in
the backend.
From there, you would'nt have an easy way to get back to the page manager:
your only option was to go to the website module and click on 'go to website'
and then click on menu/manage pages.
It was not convenient when you were editing multiple page quickly or just
taking a look into some pages.
Now, you have a button on the ir.ui.view's form view to get directly on the page
manager.
Note: this back button is obviously invisible for ir.ui.view not related to a
website.page
Before this commit, we were using data[] array from json call to write on
website model accordingly of is_homepage value.
Now, we use the newly created inverse function of the computed field to handle
that to make it more clear
Before this commit, clicking on add to cart as a public user* would throw an
error because it would access uom.name on which public user has no right.
*From the product page (/shop/product/xxx) having an optional product, the
access error is really on the optional product.
Now, we allow user to read name with sudo().
Before this commit, multiple tabs/session adding items to cart could lead to
negative stock displayed in the quantity field.
In some case, it could throw a traceback because the wanted product had
became unavailable in the meantime, causing the cart to be updated and the
line to be deleted from the cart. But then, this line was being accessed again.
Now, negative values are prevented at the screen. And there is a check on the
line record to be sure it exists before accessing it.
Before this commit, the widget many2many_tags only loaded the first 40
records. This was difficult to see, because there were not so many views
with a lot of tags.
Before this commit, there was a bug when creating a new record which
contains a one2many with an onchange. The commands sent to the onchange
did not contain the full information.
Here is how you could reproduce the issue: install expense, go to the
expense list view, select the 2 lines, then, in the 'action' menu in the
control panel, choose 'Expense: submit to manager'. In the new expense
sheet, you could see that there were two lines in the one2many
expense_line_ids. However, these lines are empty. The reason is that
the commands sent in the onchange were 2 commands 0, with {} as data.
So, in short, the BasicModel did generate the proper commands, but with
empty data, in the specific case when we have a non empty one2many in a
default_get, then an onchange.
To solve this issue, I had to fix 2 things: the internal data struture
was wrongly updated, and the commands should be generated with all the
data, and not only the changes.
* fix Sphinx 1.6 compatibility leading to the "tiles" on the home page
not working anymore: 1.6 replaces BuildEnvironment.reolve_toctree by
TocTree().resolve(), while the method still exists it's not actually
called anymore
* rejigger some CSS as the second section went from one big tile to 3
smaller tiles, and got laid out as a row rather than a second 2x2
block. Recode the entire mess with flexbox, remove some stuff which
conflicted with boostrap (this screen should probably be
de-boostrapped and completely converted to flexbox or grid)
* add building CSS from LESS to the makefile, all Odoo devs should
have less installed locally (for assets)