mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] product_contract: Make configurator contract context heredable
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
Recurring - Product Contract
|
Recurring - Product Contract
|
||||||
============================
|
============================
|
||||||
|
|
||||||
..
|
..
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
@@ -65,8 +65,8 @@ To use this module, you need to:
|
|||||||
Known issues / Roadmap
|
Known issues / Roadmap
|
||||||
======================
|
======================
|
||||||
|
|
||||||
- There's no support right now for computing the start date for the
|
- There's no support right now for computing the start date for the
|
||||||
following recurrent types: daily, weekly and monthlylastday.
|
following recurrent types: daily, weekly and monthlylastday.
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
@@ -90,16 +90,16 @@ Authors
|
|||||||
Contributors
|
Contributors
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Ted Salmon <tsalmon@laslabs.com>
|
- Ted Salmon <tsalmon@laslabs.com>
|
||||||
- Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
- Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
||||||
- `Tecnativa <https://www.tecnativa.com>`__:
|
- `Tecnativa <https://www.tecnativa.com>`__:
|
||||||
|
|
||||||
- Ernesto Tejeda
|
- Ernesto Tejeda
|
||||||
- Pedro M. Baeza
|
- Pedro M. Baeza
|
||||||
- Carlos Roca
|
- Carlos Roca
|
||||||
- Sergio Teruel
|
- Sergio Teruel
|
||||||
|
|
||||||
- David Jaen <david.jaen.revert@gmail.com>
|
- David Jaen <david.jaen.revert@gmail.com>
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
-----------
|
-----------
|
||||||
@@ -120,7 +120,7 @@ promote its widespread use.
|
|||||||
|
|
||||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||||
|
|
||||||
|maintainer-sbejaoui|
|
|maintainer-sbejaoui|
|
||||||
|
|
||||||
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/17.0/product_contract>`_ project on GitHub.
|
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/17.0/product_contract>`_ project on GitHub.
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ patch(SaleOrderLineProductField.prototype, {
|
|||||||
return super.isConfigurableLine || this.props.record.data.is_contract;
|
return super.isConfigurableLine || this.props.record.data.is_contract;
|
||||||
},
|
},
|
||||||
|
|
||||||
async _openContractConfigurator(isNew = false) {
|
get contractContext() {
|
||||||
const actionContext = {
|
return {
|
||||||
default_product_id: this.props.record.data.product_id[0],
|
default_product_id: this.props.record.data.product_id[0],
|
||||||
default_partner_id: this.props.record.model.root.data.partner_id[0],
|
default_partner_id: this.props.record.model.root.data.partner_id[0],
|
||||||
default_company_id: this.props.record.model.root.data.company_id[0],
|
default_company_id: this.props.record.model.root.data.company_id[0],
|
||||||
@@ -51,6 +51,10 @@ patch(SaleOrderLineProductField.prototype, {
|
|||||||
default_auto_renew_interval: this.props.record.data.auto_renew_interval,
|
default_auto_renew_interval: this.props.record.data.auto_renew_interval,
|
||||||
default_auto_renew_rule_type: this.props.record.data.auto_renew_rule_type,
|
default_auto_renew_rule_type: this.props.record.data.auto_renew_rule_type,
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
async _openContractConfigurator(isNew = false) {
|
||||||
|
const actionContext = this.contractContext;
|
||||||
this.action.doAction("product_contract.product_contract_configurator_action", {
|
this.action.doAction("product_contract.product_contract_configurator_action", {
|
||||||
additionalContext: actionContext,
|
additionalContext: actionContext,
|
||||||
onClose: async (closeInfo) => {
|
onClose: async (closeInfo) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user