[IMP] mail: turn 'FollowerSubtypeView/subtype' into field
Task-2793280 closes odoo/odoo#87013 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -17,13 +17,6 @@ export class FollowerSubtype extends Component {
|
||||
return this.messaging && this.messaging.models['Follower'].get(this.props.followerLocalId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {FollowerSubtype}
|
||||
*/
|
||||
get followerSubtype() {
|
||||
return this.messaging && this.messaging.models['FollowerSubtype'].get(this.props.followerSubtypeLocalId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {FollowerSubtypeView}
|
||||
*/
|
||||
@@ -43,9 +36,9 @@ export class FollowerSubtype extends Component {
|
||||
*/
|
||||
_onChangeCheckbox(ev) {
|
||||
if (ev.target.checked) {
|
||||
this.follower.selectSubtype(this.followerSubtype);
|
||||
this.follower.selectSubtype(this.followerSubtypeView.subtype);
|
||||
} else {
|
||||
this.follower.unselectSubtype(this.followerSubtype);
|
||||
this.follower.unselectSubtype(this.followerSubtypeView.subtype);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +47,6 @@ export class FollowerSubtype extends Component {
|
||||
Object.assign(FollowerSubtype, {
|
||||
props: {
|
||||
followerLocalId: String,
|
||||
followerSubtypeLocalId: String,
|
||||
localId: String,
|
||||
},
|
||||
template: 'mail.FollowerSubtype',
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<t t-if="followerSubtypeView">
|
||||
<div class="o_FollowerSubtype" t-attf-class="{{ className }}" t-att-data-local-id="followerSubtypeView.localId" t-ref="root">
|
||||
<label class="o_FollowerSubtype_label">
|
||||
<input class="o_FollowerSubtype_checkbox" type="checkbox" t-att-checked="follower.selectedSubtypes.includes(followerSubtype) ? 'checked': ''" t-on-change="_onChangeCheckbox"/>
|
||||
<t t-esc="followerSubtype.name"/>
|
||||
<input class="o_FollowerSubtype_checkbox" type="checkbox" t-att-checked="follower.selectedSubtypes.includes(followerSubtypeView.subtype) ? 'checked': ''" t-on-change="_onChangeCheckbox"/>
|
||||
<t t-esc="followerSubtypeView.subtype.name"/>
|
||||
</label>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
className="'o_FollowerSubtypeList_subtype'"
|
||||
localId="followerSubtypeView.localId"
|
||||
followerLocalId="followerSubtypeList.follower.localId"
|
||||
followerSubtypeLocalId="followerSubtypeView.subtype.localId"
|
||||
/>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user