diff options
| author | Robot Odoo <xmo+roboto@odoo.com> | 2019-07-12 14:48:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-12 14:48:23 +0200 |
| commit | 7824b1f07e4d87ae122c978195ff8e94818eafb4 (patch) | |
| tree | de255a74cdd8d8505aee3adbd229f0bfdbcc353e /addons/base_geolocalize/models/base_geocoder.py | |
| parent | a9587d0bdbb50df90128c33a76bdf017116c507a (diff) | |
| parent | 71d4116ea379f204d5773d829dce624fbcf67ec5 (diff) | |
[MERGE] web: Remove 'toggle_active' stat buttons + introduce ribbons
Purpose
=======
While cleaning the stat buttons across all modules, we decided
to move the (un)archiving from stat button to actions in the
'Action' dropdown.
The goal was to lighten the content of oe_button_boxes by clearing
out stat buttons.
The general idea is that stat buttons should be a redirection,
either to a set of records or to an alternate view of the current
one (there are some exceptions though).
The toggle_active stat button is an action, quite similar to a
deletion in most cases.
There are two main ways of using the 'active' field:
- archiving a record (often because it cannot be deleted since it
is linked to another record, like a res.partner used in validated
account.invoices)
- activating a record (with configuration objects like currencies,
languages, or taxes)
In the first case, the option is advanced, akin to deletion. Just
like deletion, its place is in the action dropdown, not the
formview itself.
It is nevertheless important to inform the user whether the record
is archived, but it is not necessary to inform him when it isn't.
In the second case (much less common), the 'activation' of a record
can simply be made available by adding the active field directly in
the formview.
Specification
=============
1/ web: Always display (un)archive buttons in Action on form views
Purpose
-------
While cleaning the stat buttons across all modules, we decided to move
the (un)archiving from stat button to actions in the 'Action' dropdown.
Specification
-------------
If the record has an 'active' field, display an action 'Archive' in the
2/ all: Remove active stat button on all views
Purpose
-------
While cleaning the stat buttons across all modules, we
decided to move the (un)archiving from stat button to
actions in the 'Action' dropdown.
Specification
-------------
Remove the 'active' stat buttons in all views
3/ web: Call 'toggle_active' instead of 'write'
Purpose
-------
Currently when clicking on 'Archive' or 'Unarchive' on the list view,
we write directly on the record {'active': False}, instead of calling
toggle_active. Missing that way implementation of numerous business cases.
Example
- Archive a record --> archive its next activities
- (Un)Archive a user --> (Un)Archive its partner
- (Un)Archive a product variant --> (Un)Archive its template if
there is only one variant
- Archive an employee --> Open a wizard to choose an exit plan + describe
the departure reason
- Archive a route --> Archive its procurement rules
- ...
Specification
-------------
- Call toggle_active instead of write when calling toggleActive in the web
client.
- On the other hand, use actionArchive and actionUnarchive to apply the
toggle action on the related records only.
4/ web: Remove toggle_button widget
This widget is not used anymore, as all the stat buttons have been removed
from the views.
5/ base,mail,...: Redisplay active field in some views
Purpose
-------
In the following views, add the 'active' field in the formview
as specified in the screenshots:
account.view_tax_form (account.tax) https://nimb.ws/08WqXP
crm_iap_lead_website.crm_reveal_rule_form (crm.reveal.rule) https://nimb.ws/xPHSiT
delivery.view_delivery_carrier_form (delivery.carrier) https://nimb.ws/yq3eDS
base.view_rule_form (ir.rule) https://nimb.ws/MBi2Ix
lunch.lunch_alert_view_form (lunch.alert) https://nimb.ws/DRdK4Z
mail.mail_blacklist_view_form (mail.blacklist) https://nimb.ws/xBq9ut
base.view_currency_form (res.currency) https://nimb.ws/FXG9oA
base.res_lang_form (res.lang) https://nimb.ws/eSr0dM
6/ web: add a new ribbon widget (POC)
Purpose
-------
The ribbon widget adds a ribbon on the top right of a form
to make some status more visible.
You have to specify the text attribute to show the text on
the ribbon. You can also specify a bg_color attribute to
color the background with a bootstrap background color class.
Note: This is an ugly draft of the final widget, that is supposed
to land in master in a few days. As this PR brings a lot of
functional changes in several files, it has become quite difficult
to maintain it over the days.
The final responsive version will come with:
https://www.odoo.com/web#id=2032621&action=333&active_id=965&model=project.task&view_type=form&menu_id=4720
7/ base,mail,...: Add ribbon widget everywhere on archived records
Purpose
-------
In the following views, add a bg-danger ribbon with label 'Archived'
only visible when active=False:
account.account_tag_view_form (account.account.tag)
analytic.view_account_analytic_account_form (account.analytic.account)
analytic.account_analytic_tag_form_view (account.analytic.tag)
account_asset.view_account_asset_form (account.asset)
account.view_account_position_form (account.fiscal.position)
account.account_incoterms_form (account.incoterms)
account.view_account_journal_form (account.journal)
account.view_payment_term_form (account.payment.term)
website_blog.view_blog_blog_form (blog.blog)
website_blog.view_blog_post_form (blog.post)
calendar.view_calendar_event_form (calendar.event)
crm.crm_case_form_view_leads (crm.lead)
crm.crm_case_form_view_oppor (crm.lead)
crm.crm_lost_reason_view_form (crm.lost.reason)
sales_team.crm_team_view_form (crm.team)
documents.document_view_form (documents.document)
event.view_event_form (event.event)
website_event_track.view_event_track_form (event.track)
fleet.fleet_vehicle_view_form (fleet.vehicle)
fleet.fleet_vehicle_log_contract_view_form (fleet.vehicle.log.contract)
website_forum.view_forum_forum_form (forum.forum)
website_forum.view_forum_post_form (forum.post)
gamification.badge_form_view (gamification.badge)
helpdesk.helpdesk_sla_view_form (helpdesk.sla)
helpdesk.helpdesk_team_view_form (helpdesk.team)
helpdesk.helpdesk_ticket_view_form (helpdesk.ticket)
hr_recruitment.hr_applicant_view_form (hr.applicant)
hr_appraisal.view_hr_appraisal_form (hr.appraisal)
hr_contract.hr_contract_view_form (hr.contract)
hr.view_department_form (hr.department)
hr.view_employee_form (hr.employee)
hr.hr_employee_public_view_form (hr.employee.public)
hr_holidays.edit_holiday_status_form (hr.leave.type)
hr.hr_plan_view_form (hr.plan)
hr_payroll.hr_salary_rule_form (hr.salary.rule)
hr_work_entry.hr_work_entry_type_view_form (hr.work.entry.type)
lunch.lunch_product_view_form (lunch.product)
lunch.lunch_supplier_view_form (lunch.supplier)
mail.mail_activity_type_view_form (mail.activity.type)
mass_mailing.view_mail_mass_mailing_form (mail.mass_mailing)
mass_mailing.view_mail_mass_mailing_list_form (mail.mass_mailing.list)
maintenance.hr_equipment_view_form (maintenance.equipment)
maintenance.maintenance_team_view_form (maintenance.team)
marketing_automation.marketing_campaign_view_form (marketing.campaign)
mrp.mrp_bom_form_view (mrp.bom)
mrp_plm.mrp_eco_view_form (mrp.eco)
mrp.mrp_routing_form_view (mrp.routing)
mrp.mrp_workcenter_view (mrp.workcenter)
point_of_sale.pos_config_view_form (pos.config)
product.product_pricelist_view (product.pricelist)
hr_expense.product_product_expense_form_view (product.product)
product.product_variant_easy_edit_view (product.product)
stock_landed_costs.view_stock_landed_cost_type_form (product.product)
product.product_template_form_view (product.template)
project_forecast.project_forecast_view_form (project.forecast)
project.edit_project (project.project)
project.view_task_form2 (project.task)
industry_fsm_report.project_worksheet_template_view_form (project.worksheet.template)
quality.quality_point_view_form (quality.point)
base.view_res_bank_form (res.bank)
base.view_partner_form (res.partner)
base.view_users_form (res.users)
sale_coupon.sale_coupon_program_view_form_common (sale.coupon.program)
sale_management.sale_order_template_view_form (sale.order.template)
sale_subscription.sale_subscription_alert_view_form (sale.subscription.alert)
sale_subscription.sale_subscription_template_view_form (sale.subscription.template)
sign.sign_request_view_form (sign.request)
sign.sign_template_view_form (sign.template)
website_slides.view_slide_channel_form (slide.channel)
website_slides.view_slide_slide_form (slide.slide)
stock.view_location_form (stock.location)
stock.stock_location_route_form_view (stock.location.route)
stock.view_picking_type_form (stock.picking.type)
stock.view_stock_rule_form (stock.rule)
stock.view_warehouse (stock.warehouse)
stock.view_warehouse_orderpoint_form (stock.warehouse.orderpoint)
survey.survey_form (survey.survey)
website_crm_score.view_crm_score_form (website.crm.score)
website_twitter_wall.website_twitter_wall_view_form (website.twitter.wall)
8/ hr: Fix departure wizard activity generation
Purpose
-------
If the fired employee has no access to the hr.employee model,
the departure wizard will lead to a traceback, as we try to
create an activity on a model for which the user won't be able
to resolve it.
Create an activity on the related partner instead.
9/ web: Make archive:unarchive buttons manage returned actions
Purpose
-------
When calling toggle_active, you may sometimes retrieve an action to
execute. For example, when archiving an employee, it opens a wizard
to provide information about the departure, and choose an offboarding
plan.
This commit modifies the way toggleActive, actionArchive and
actionUnarchive works to manage this behavior.
TaskID: 2030440
closes odoo/odoo#34496
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/base_geolocalize/models/base_geocoder.py')
0 files changed, 0 insertions, 0 deletions
