-
-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[18.0][MIG] contract_variable_quantity #1139
Draft
sbejaoui
wants to merge
52
commits into
OCA:18.0
Choose a base branch
from
acsone:18.0-mig_contract_variable_quantity-sbj
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[18.0][MIG] contract_variable_quantity #1139
sbejaoui
wants to merge
52
commits into
OCA:18.0
from
acsone:18.0-mig_contract_variable_quantity-sbj
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================================================= Variable quantity in contract recurrent invoicing ================================================= With this module, you will be able to define in recurring contracts some lines with variable quantity according a provided formula. Configuration ============= * Go to Sales > Configuration > Contracts > Formulas (quantity). * Define any formula based on Python code that stores at some moment a float/integer value of the quantity to invoice in the variable 'result'. You can use these variables to compute your formula: * *env*: Environment variable for getting other models. * *context*: Current context dictionary. * *user*: Current user. * *line*: Contract recurring invoice line that triggers this formula. * *contract*: Contract whose line belongs to. * *invoice*: Invoice (header) being created. Usage ===== To use this module, you need to: * Go to Sales -> Contracts and select or create a new contract. * Check *Generate recurring invoices automatically*. * Add a new recurring invoicing line. * Select "Variable quantity" in column "Qty. type". * Select one of the possible formulas to use (previously created).
* Bump version * Change openerp references to odoo * Installable to True * Change permissions & views to accounting dependency
Add template functionality for contracts
* [IMP] Add variable qty to contract template view * Bump minor version
If you have contract lines with automatic price and your pricelist contains different prices per quantity, the price is not changed when computing quantity. This PR fixes this.
Bug description --------------- `account.analytic.contract.line` inherits `account.analytic.invoice.line` `account.analytic.invoice.line` defines field `analytic_account_id`: - comodel='account.analytic.account' `account.analytic.contract.line` redefines field `analytic_account_id`: - comodel='account.analytic.contract' On attempt to extend `account.analytic.invoice.line` model adding field that depends on `analytic_account_id.date_start` Odoo fails to update, because it adds this field to `account.analytic.contract.line` through inheritance, and `account.analytic.contract` model have no this field. What is done ------------ Change inheritance order: - `account.analytic.invoice.line` inherits `account.analytic.contract.line` - no file renames at this stage (this wil be done in next commit)
- contract - contract_variable_quantity
…lds from template **Steps to reproduce the problem** - Define a contract template with one line with variable quantity and formula. - Use that template in a new contract. - Variable quantity type and formula are not transferred from template to contract. This is due to the lack of that fields in the tree view that prevents web client to fetch and store them. We solve it adding those fields to the contract line tree view, also providing some visibility logic for not showing the corresponding fields according the type. No regression tests is provided, as this is only reproducible with web client, not through code.
I have detected a method that was created as redundant and with the same technique used when preparing the line values, so better to have everything together in the same method instead of having it spread.
[UPD] Update contract_variable_quantity.pot [UPD] README.rst
Currently translated at 100.0% (35 of 35 strings) Translation: contract-16.0/contract-16.0-contract_variable_quantity Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_variable_quantity/it/
Currently translated at 68.5% (24 of 35 strings) Translation: contract-16.0/contract-16.0-contract_variable_quantity Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_variable_quantity/hr/
Currently translated at 100.0% (35 of 35 strings) Translation: contract-16.0/contract-16.0-contract_variable_quantity Translate-URL: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract_variable_quantity/sv/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: contract-17.0/contract-17.0-contract_variable_quantity Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract_variable_quantity/
sbejaoui
force-pushed
the
18.0-mig_contract_variable_quantity-sbj
branch
from
November 4, 2024 14:23
81b40fd
to
1d51f37
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.