with the new views, we removed the many2many_kanban widget on many2manys, since it is the default behaviour anyway, but we also removed it for a few one2manys. And this is a mistake, some one2manys have to behave like many2manys.
(PR #17190)
Since the new views merge, a lot of design elements were broken. This
was particularly impacting the fields in the editable list view; indeed
the editable list view is not using an inline form view anymore so the
fields in the list were not properly styled as the LESS was still
defined assuming the form view environment (for example the invalid
fields were red for o2m fields in form view but not in editable list
view even though they got the right CSS class).
This commit refactor the LESS following these rules:
- No more division of non-layout and layout rules. Dividing LESS rules
in x_layout.less and x.less was a mistake. Many rules can be
considered to be layout and not layout at the same time, developers
always have to switch from one file part to the other, many CSS
selectors (and rules!) are duplicated for nothing, ...
- Field style is extracted from x_view.less and put in the new
fields.less file. As before, the fields_extra.less will contain the
rules specific to community so that the enterprise repo can override
those by replacing the whole file.
- Many classes have been renamed so that o_form_x_y becomes o_x_y as
many classes can now be applied outside of form view. These classes
should not be used in templates anyway.
The commit also changes the DOM of fields so that it is more minimalist
(no useless parent div, etc).
Input elements are not automatically styled anymore, they have to get
the o_input class explicitely. This allows to fix lots of small style
bugs of previous versions (required monetary field had not the proper
style, readonly m2m tags appeared as editable, ...). This also improves
the LESS code.
The editable list view should also completely stop flickering on chrome
and firefox.
The commit also removes the orange outline on list view dirty cells.
The commit also removes deprecated static xml, LESS and other code.
Notice there are still styles to restore/fix and LESS to improve.
The third argument of kanban_image should be the id of the record and not the
image `raw_value`.
In this case, we want to display the image field of the current model.
This commit introduce a full redesign of all JS views. We started
basically from scratch. The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.
Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented
We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.
Work done by the framework team: mostly aab, ged, chm, dmo, qsm
* base_action_rule, gamification, mass_mailing
1) Create the independant DomainSelector widget
- Allow to build a prefix char domain
2) Replace old FieldCharDomain with a new FieldDomain which uses the
new DomainSelector widget
3) Create the independant ModelFieldSelector widget
- Allow to build a valid field chain for a specific model
(e.g 'partner_id.name' for a 'res.users')
- Used by DomainSelector widget
---
The DomainSelector widget uses a tree-like representation with
user-friendly buttons (ALL/ANY/+/-/...). Any domain can be built,
except those containing the "!" (not) operator or some operators
like "like", "child_of" (@see DomainSelector). However, if the
user enters these in the debug input, the widget can handle them.
Note: these widgets had to do unusual stuff the widget API does not
allow to handle efficiently right now but it will be adapted to the
new widget/field API in a further update.
Note2: the widgets also have possibility of other improvements like
supporting m2o input instantiation in DomainLeaf, etc.
---
This work is an adaptation of the original code made by @pga-odoo.
1/ ISSUES WITH BADGES:
Go to menu Employees > Badges > Select any Badge from kanban View.
Click on "GRANT THIS BADGE" button.
- When you grant a badge, the description field is not at the right place.
It should be below the employee field
- Badges Form View: "Granted Employees" should be a stat button with a counter
- Badges form view is broken, field label/values are not at right place
2/ ISSUES WITH CHALLENGES:
Go to menu Employees > Challenges
Challenges Kanban View
- Image Avatars are too big, make it smaller.
- Challenges Form View > Advanced Options : fields Report frequency, Report Template
and Send a Copy to are ugly
When attempting to define a goal
using a model that does not have any `inherits`
- which happens most the time-,
it was not possible to choose the
`Field to Sum` and the `Date Field`,
due to the domain set in the view
which is no longer working in 9.0.
The domain is no longer working because:
- The onchange result for a one2many for which
the value is set to `[(6, 0, [])]` is now `[]`,
while, in 8.0, the tuple with the command `6` and the empty
list was preserved
- the empty list `model_inherited_model_ids` is considered as `True` by py.js,
and therefore it fallbacks to `model_inherited_model_ids[0]`, but
as this is an empty list, it crashes.
The solution proposed in this revision solves the issue, while
making the domain applied on these fields less fragile.
opw-658892
LESS rules (enterprise compatibility) :
* .oe_avatar is float:left by default
* .oe_title is placed between oe_avatar/oe_button_box if any
without the need to make it float
* Remove use of flex for kanban record layout (text overflow ellipsis
could not work in row wrap flex layout as flex would prefer to wrap its
elements than add an ellipsis inside its content)
* Fix xml templates (double use of o_kanban_image + non-existing class)
model has been renamed to mail.channel to prepare the slack modeling.
In future commits the mail.group model will be merged with the channel
model from im_chat. The first move is to rename mail.group into
mail.channel to have a model that will unite both features.
Now there should be only one button box per page, and the name should be
"button_box".
Conflicts:
addons/crm/crm_tip_data.xml
addons/event/event_tip_data.xml
addons/fleet/fleet_view.xml
addons/hr/hr_view.xml
addons/hr_recruitment/hr_recruitment_view.xml
addons/project/project_tip_data.xml
addons/purchase/purchase_tip_data.xml
addons/sale_crm/sale_crm_view.xml
addons/website_quote/views/website_quotation_backend.xml
openerp/addons/base/res/res_partner_view.xml
Conflicts:
addons/account_reports/views/partner_view.xml
Conflicts:
addons/claim_from_delivery/claim_delivery_view.xml
addons/stock/stock_view.xml
Challenge
- 'Reward as soon as every goal is reached' box checked by default (most of the time people want this behaviour, few special cases were do not)
- Click on challenge kanban opens goal list instead of challenge form
- Add button 'Start Challenge' clicking on statusbar is not intuitive
Badge
- When creates a challenge from badge view, set by default badge to 'For Every Succeding User' field
- replace filter 'Current' vs 'Passed' by 'Running' (in progress and done with not reached end date) vs 'Done' (done & failed without end date or end date passed)
Goal
- list of badge on employee form not the first tab
[MERGP] Inline Searchview
This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place. It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)
Because of this, other large changes have been made:
the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)
It is likely that some stupid bugs have been introduced. Please don't hurt me.
Removing the inheritance to mail.thread will avoid posting message at creation and other tracking mechanism at each write. Updating a challenge with a large number of users will be significantly faster.
bzr revid: mat@openerp.com-20140506093716-xvpe1n2ase2zix0v