Checking access rules only makes sence if we have some records,
_filter_access_rules will always return a subset or current
recordset, and a subset or a empty recordset is an empty recordset.
closesodoo/odoo#32313
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
purpose is allow to assign picking to users
- add field responsible on the picking that allows to select a user
- Now we assign responsible to several picking at once
- add default filter 'My Transfers' and 'Unassigned Transfers'
Related task : 1938107closesodoo/odoo#31138
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
After 5df4746c9a the error handling has
been changed inaccurately. This fix sets the error handling correctly.
closesodoo/odoo#32247
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This branch brings several improvements related to the list view:
- grouped list views are now editable
- 'expand' attribute can be used to open by default the first level groups
- if there are a lot of groups, a pager is displayed (instead of having all
groups in the same page)
- when grouped on a many2one field, custom buttons (on the many2one
comodel) can be inserted in each group's header
- we can edit several records in a row in editable list views
- editable lists do not flicker anymore when switching a row to edit mode
- we can navigate through the cells in list views with the arrows (in
readonly)
Co-authored-by: Aaron Bohy aab@odoo.com
Co-authored-by: David Monjoie dmo@odoo.com
Co-authored-by: Martin Geubelle mge@odoo.com
Co-authored-by: Ravi Gadhia rga@odoo.com
Task 1915702
closesodoo/odoo#31756
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
With this rev., it is now possible to navigate with arrows in list
views (except when editing, as in this case hitting the arrows moves
the cursor in the input/textarea), and to expand/collapse groups
with keyboard navigation.
Part of task 1915702
This rev. adds params to the 'web_read_group' method, allowing to
search_read records inside each groups in a single RPC, instead of
doing a 'web_read_group' RPC followed by n 'search_read' RPCs,
where n is the number of opened groups.
Part of task 1915702
Before this rev., widgets were absolutely positioned in table
cells. This cause an undesired effect with text fields, as their
textarea overflowed and overlapped the next lines.
With this rev., wigdets are now statically positioned, and the cells
height and width don't change when switching a row to edit mode.
Part of task 1915702
This rev. changes the layout of *editable* list views to a fixed
layout. This means that we are now responsible of the width of
each column. To do that, we associate with each field type a
factor, and the higher the factor is, the larger the column will
be (w.r.t. the others). This default value can be overriden in the
arch.
The fixed layout allows to remove the absolute positionning of
widgets inside editable lists (done in the next commit).
Part of task 1915702
Co-authored-by: Martin Geubelle <mge@odoo.com>
From an editable list view, if you select several lines then change
a field, you are now asked if you want to apply the same change on
all selected lines. If you accept, a write is directly performed
(without applying onchange, as the records are reloaded and the view
re-rendered). If you decline, the classic behavior still occurs.
Part of task 1915702
It is now possible to put buttons in the list view group headers.
When the view is grouped by a many2one field, those buttons
appear next to the header title when the group is opened.
The buttons are specified in the views in a <groupby> tag in the
list arch, with the following structure:
<groupby name="groupedField"> <!-- must be a many2one -->
<button type="object" name="my_method" string="Button1"/>
</groupby>
It is also possible to add `field`, inside the `groupby` which can
be used for modifiers. These fields thus belong on the many2one
comodel, like:
<groupby name="partner_id">
<field name="name"/> <!-- name of partner_id -->
<button type="object" name="my_method" string="Button1"
attrs="{'invisible': [('name', '=', 'Georges')]}"/>
</groupby>
These extra fields are fetched in batch when grouping on the field.
Part of task 1915702
With this rev., when there are a lot of groups in a grouped list
view, groups are displayed under several pages, whereas they were
all displayed in the same page before.
This is especially interesting with the new 'expand' attribute, to
ensure that we don't read records for a large number of groups.
By default, the groups limit is set to 80 (like records), and to 10
is the 'expand' attribute is set to true. This limit can be
overriden with the 'groups_limit' attribute.
Part of task 1915702
This rev. enables the editable feature in grouped list views.
Part of task 1915702
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
The 'import' attrs is valid according to the rng definition of the
list view. It is used in a few views in Odoo. However, it didn't
actually work (in most cases, it worked by chance because it is
set to "0" in addition to create="0", and create="0" already
disables the import feature).
With this ref, the 'import' attrs is taken into account and we
can now disable the import feature even if the create one is
enabled. Moreover, it is now documented.
The 'toolbar' attribute is not referenced in the documentation, and
it has no effect since at least v10.
The 'on_write' attribute was referenced in the documentation, but
is no longer used in Odoo and has no effect since at least v11.
The 'colors' and 'fonts' attributes are deprecated since v9, and
have no effect since v10.
The 'string' attribute is deprecated since v8 and has no effect
since v9. However, it is widely used in Odoo, so we must remove
all occurrences before removing it from the rng.
Purpose :
========
Maintain the uniformity between the sales and purchase menus
closesodoo/odoo#31482
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The purpose of this commit is, remove "our order reference" because it is already in the title, replace purchase order confirmation by purchase order and add the purchase representative.
Task Id #1902886closesodoo/odoo#31099
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
-Add a field note to allow users to record detailed information about a lot/serial number.
Related Task Id : 1938650
closesodoo/odoo#31089
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Task 1920906
remove the l10n_be_structured_comm field
random/date references will not be longer used
adapt for the last changes in account
closesodoo/odoo#29858
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Task 1920906
Rework of the invoice references. We can now select references based on partner or on invoice number, and the Odoo way, or the (newly implemented) european way (SEPA RF references)
The reference type informations are no longer stored on the company but on the sales journals
Since recent changes product configurator is now located in its own module.
Some code remaining in website_sale_stock should be located in its own
bridge module.
closesodoo/odoo#32336
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
post_inventory method does not return anything (in stock), and True (in
mrp). Anyway the returned result is not used anywhere and does not have
any meaning.
In stock_account call to super is done on some sub record sets and result
of super is returned. However due to code architecture it is unsure whether
super is actually called. Let us avoid any issue with res being undefined if
there is no call to super done.
Steps to reproduce:
- Create a channels C with user A linked to an employee E
- Create project P with privacy_visibility='followers' meaning only visible for employees that follow P
- Add the channel C as a follower of P
- Log as user A go to Project app
Bug:
The project P is not readable for A
opw:1958386
closesodoo/odoo#32324
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Clicking on 'install more providers' should only show module of external
carrier. In the previous domain, we get delivery_barcode and
website_delivery_ups in the domain which is not intended.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
If a manufacturing order doens't have any raw move, it now triggers a user error in case of action_confirm and simply change it's state in case of cancel.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
On the stock picking form view, we would like the cancel button is at the far right of the button bar.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
This commit change the word 'state' by 'status' in the picking pdf reports.
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
Use the priority widget (the yellow stars) to represent the priority field on stock.picking
Task: 1942231
Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>
Before this commit:
Instead of using the `to_html` method from `ir.qweb.field.monetary`, we would
use `_format_amount` that would mimick `to_html` but without the HTML part,
keeping only the integer amount.
That was making the python, JS and XML code unnecessarily complexe.
Python: code duplicated between `to_html` and `_format_amount`
XML: double badge in DOM, one to show text and one to show t-field/monetary DOM
structure ($ <span class='oe_currency_value'>50.5</span>)
JS: handle both badges depending if need to show text or price, complexe
selector to target t-field integer DOM, and also handle d-none to show only
one at a time.
Now:
We removed the `_format_amount` method and use the standard one.
That way, XML, JS and python could be clean from unnecessary complexity.
Coming from #31857 (task-1867265)
closesodoo/odoo#32327
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
odoo/odoo#31857 retrieve asynchronously the delivery carrier price instead of having to
click on every one of them.
If the delivery is free thanks to coupon, the delivery price should be free and
no need to compute it.
Closes#31857
task-1867265
Before this commit:
User landing on checkout payment step had to select a carrier.
These carriers only showed 'Select to compute price'. This was done to
prevent the page to take seconds to load, since it would compute all the
carrier price by querying these carrier API then display the page.
The users would still click on every carrier anyway to check all the prices and
select the cheapest one.
Now:
Once the page is loaded, we will asynchronously retrieve every carrier prices.
That way, the page rendering page will not be affected and the user will be
able to see the price of every carrier after a few seconds without having to do
anything.
Closes#31857
task-1867265
This commit does nothing except encapsulating code from
_handleCarrierUpdateResult related to badges.
This is needed for the new feature to allow carrier prices to be loaded
asynchronously, see #31857
task-1867265
This commit introduce a new module which is a bridge between
`website_sale_coupon` and `website_sale_delivery`.
Before that, commit odoo/enterprise@a0a8118 and odoo/odoo@1ab53c2 introduced coupon
code into delivery module, and coupon+delivery code into `website_sale`
module.
That was the only way in stable but was nasty as it is not only code from one
module in another module but also code from enterprise module in community
module..
This is done to prepare the new feature to load carrier asynchronously on cart,
see #31857
(Note that `sale_coupon_delivery` already exists)
task-1867265
Coming from #31857
As coupon does, show 'Free' instead of '$0' when a delivery is free
(`free_over` field).
That is more coherent and also prevent flicker when coupon and delivery are
both installed.
Step to reproduce:
- Have a free promotion from `sale_coupon` giving free delivery
- Have a delivery carrier free over x$
- Go to /shop/payment with over x$ in cart
- Select the delivery carrier, it will show 'Free' then will be replaced a
few seconds later by '$0'
Coming from #31857 (task-1867265)
When a delivery carrier can't compute the delivery price, it returns an error
that is shown instead of the price (eg 'bpost Domestic is used only to ship
inside Belgium..').
But since 1ab53c27f everytime the user compute a carrier price and there is a
coupon allowing free delivery, every listed delivery carrier would have their
badges set to 'Free', including also carrier in error state.
This commit will not replace the error message by 'Free'.
Coming from #31857 (task-1867265)
This commit remove part of the condition as an empty jQuery element is always
truthy.
This commit is cleaning code to prepare the new feature to allow carrier prices
to be loaded asynchronously on cart.
See #31857 (task-1867265).
When displaying the followers of a document, followers who are set as inactive will be displayed in a different layout than the active ones. The purpose is to mark a clear difference between active and inactive followers.
Task #1957849closesodoo/odoo#32084
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
The present work is part of an ongoing plan aiming to refactor/improve the reporting views (in particular the graph view).
The most notable changes are
- better support of comparison mode (comparison of different time periods)
- better tooltips and legend (content/style)
It has also been decided to use Chart.js instead of nvd3 to draw charts.
The main reasons are that Chart.js is better maintained/designed and offers many interesting features.
Thus we have rewritten all the code depending on nvd3, adapt it to the new library, and remove completely the nvd3 library and the references to it.
Task Ids: 1911201, 1946138
closesodoo/odoo#31766
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
This commit is one part of the task 'removing nvd3'.
We use now Chart.js to draw charts. This makes old CSS rules
related to nvd3 useless.
Task ID: 1946138