[FIX] *: cancel settings

To reproduce:
- Go Website Admin > Configuration > Settings
- Change the Website Name
- Click on 'Cancel'

The name is saved.

When the "Cancel" button is clicked, we automatically save the record
(which is a transient model). Since the field is a related to the
company, the name is changed even if we canceled.

opw-760749
This commit is contained in:
Nicolas Martinelli
2017-08-04 08:25:33 +02:00
parent 54e4e3156f
commit 7cd2f63705
16 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
<form string="Configure Accounting" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<field name="has_default_company" invisible="1" />
<field name="has_chart_of_accounts" invisible="1"/>
+1 -1
View File
@@ -7,7 +7,7 @@
<form string="General Settings" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<separator string="General Settings"/>
<div>
@@ -9,7 +9,7 @@
<form class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Events">
<field name="module_event_sale" widget="radio"/>
@@ -8,7 +8,7 @@
<form string="Configuration" class= "oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Settings">
<field name="group_attendance_use_pin" widget="radio"/>
@@ -27,4 +27,4 @@
<menuitem id="hr_attendance.menu_hr_attendance_settings" name="Configuration" parent="menu_hr_attendance_root"
sequence="99" action="action_hr_attendance_settings" groups="hr_attendance.group_hr_attendance_manager"/>
</odoo>
</odoo>
+1 -1
View File
@@ -9,7 +9,7 @@
<form class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Expenses" name="config_alias">
<label for="id" string="Expense Email Alias"/>
+1 -1
View File
@@ -15,7 +15,7 @@
<form string="Configure Payroll" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Payroll">
<label for="id" string="Settings"/>
@@ -8,7 +8,7 @@
<form string="Configure HR Recruitment" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Recruitment">
<field name="module_hr_recruitment_survey" widget="radio"/>
@@ -7,7 +7,7 @@
<form string="Configure Mass Mailing" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Mass Mailing" name="mass_mailing_group">
<field name="group_mass_mailing_campaign" widget="radio"/>
@@ -8,7 +8,7 @@
<form string="Configure Manufacturing" class= "oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Logistics" name="logistics">
<field name="company_id" invisible="1"/>
@@ -7,7 +7,7 @@
<form class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Importable Point of Sale Data">
<label for="div" string="Beverages"/>
+1 -1
View File
@@ -8,7 +8,7 @@
<form class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Project Management" name="project_management">
<field name="company_id" invisible="1"/>
+1 -1
View File
@@ -7,7 +7,7 @@
<form string="Configure Purchases" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Logistics">
<group>
+2 -2
View File
@@ -8,7 +8,7 @@
<form string="Configure Sales" class="oe_form_configuration" name="sale_config_form">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<div id="main"/>
</form>
@@ -23,4 +23,4 @@
<field name="view_mode">form</field>
<field name="target">inline</field>
</record>
</odoo>
</odoo>
@@ -8,7 +8,7 @@
<form string="Configure Warehouse" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<group string="Traceability" name="traceability">
<field name="group_stock_production_lot" widget="radio"/>
+1 -1
View File
@@ -942,7 +942,7 @@ var FormView = View.extend(common.FieldManagerMixin, {
var self = this;
return this.reload_mutex.exec(function() {
if (self.dataset.index === null || self.dataset.index === undefined) {
self.trigger("previous_view");
self.do_action('reload');
return $.Deferred().reject().promise();
}
if (self.dataset.index < 0) {
+1 -1
View File
@@ -9,7 +9,7 @@
<form string="Configure Website" class="oe_form_configuration">
<header>
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
<button string="Cancel" type="object" name="cancel" class="oe_link" special="cancel"/>
</header>
<div>
<field name="website_id" invisible="1"/>