You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
706 B
25 lines
706 B
/** @odoo-module **/
|
|
import { WebsiteSale } from 'website_sale.website_sale';
|
|
WebsiteSale.include({
|
|
/**
|
|
* Assign the recurrence period to the rootProduct for subscription products.
|
|
*
|
|
* @override
|
|
*/
|
|
_updateRootProduct($form, productId) {
|
|
this._super(...arguments);
|
|
Object.assign(this.rootProduct, this._getRecurrencePeriod());
|
|
},
|
|
/**
|
|
* Get selected recurrence period for subscription product from website.
|
|
*/
|
|
_getRecurrencePeriod($product) {
|
|
const period = this.$el.find('select[id=recurrence_period]').val();
|
|
if (period) { {
|
|
return {
|
|
period: period,
|
|
};
|
|
}
|
|
}
|
|
},
|
|
});
|
|
|