[15.0] contract no longer works with contract_sale_generation
Closed this issue · 2 comments
In V14 versions, contract_sale_generation worked alongside main contract module to add the ability to change recurring document type from invoice to sale order. It appears some major refactoring was done in contract and it no longer contains any reference to the field generation_type which is required for this, on both the model and view.
Would be keen to know why this was done as it seems deliberate.
Module
contract and contract_sale_generation
Describe the bug
contract_sale_generation cannot be installed alongside contract since V15
To Reproduce
Affected versions: 15.0
Steps to reproduce the behavior:
- Install contract
- Install contract_sale_generation
Expected behavior
Both modules should work together to add recurring sale order generation functionality.
As a workaround I have taken the V14 versions of contract and contract_sale_generation and migrated them to V15 in the most basic way possible. Both are working with very minor changes.
Having done a comparison it looks like what's missing is the following from abstract_contract.py:
generation_type = fields.Selection(
string="Generation Type",
selection=lambda self: self._selection_generation_type(),
default=lambda self: self._default_generation_type(),
help="Choose the document that will be automatically generated by cron.",
)
@api.model
def _selection_generation_type(self):
return [("invoice", "Invoice")]
@api.model
def _default_generation_type(self):
return "invoice"
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.