Skip to content
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
wants to merge 52 commits into
base: 18.0
Choose a base branch
from

Commits on Nov 4, 2024

  1. [ADD] contract_variable_quantity:

    =================================================
    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).
    pedrobaeza authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    5d4eafc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfd507b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    124f35a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f32ed19 View commit details
    Browse the repository at this point in the history
  5. [MIG] Make modules uninstallable

    pedrobaeza authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    d4b599f View commit details
    Browse the repository at this point in the history
  6. [MIG] Rename manifest files

    pedrobaeza authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    bf944b2 View commit details
    Browse the repository at this point in the history
  7. [MIG] contract_variable_quantity: Migrate to v10

    * Bump version
    * Change openerp references to odoo
    * Installable to True
    * Change permissions & views to accounting dependency
    lasley authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    0e8d2aa View commit details
    Browse the repository at this point in the history
  8. [IMP][10.0] contract: Add templating (OCA#42)

    Add template functionality for contracts
    lasley authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    1124a78 View commit details
    Browse the repository at this point in the history
  9. [10.0][IMP] Add variable qty to contract template view (OCA#66)

    * [IMP] Add variable qty to contract template view
    
    * Bump minor version
    lasley authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    5b9b11f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    77b2761 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9725bff View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7c9a86e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    01ed155 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5d8e6cb View commit details
    Browse the repository at this point in the history
  15. [IMP] contract_variable_quantity: Recompute price when changing qty

    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.
    pedrobaeza authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    caf5462 View commit details
    Browse the repository at this point in the history
  16. [FIX] analytic invoice/contract lines inheritance

    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)
    katyukha authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    1867c61 View commit details
    Browse the repository at this point in the history
  17. Update addon versions

    - contract
    - contract_variable_quantity
    katyukha authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    b47adf9 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2c979ff View commit details
    Browse the repository at this point in the history
  19. [IMP] Adapt unit test

    sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    1162ca1 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    78fa398 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    dfd0f6a View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    ecd1b14 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    bd7c005 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    8a743a8 View commit details
    Browse the repository at this point in the history
  25. [FIX] - Fix unit tests

    sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    ef2ec92 View commit details
    Browse the repository at this point in the history
  26. [FIX] fix unit tests

    sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    88afb37 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    dae7580 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    21874fc View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    303b9df View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    fe1053e View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    46875c8 View commit details
    Browse the repository at this point in the history
  32. [FIX] contract_variable_quantity: Allow to propagate variable qty fie…

    …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.
    pedrobaeza authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    4ac0fa5 View commit details
    Browse the repository at this point in the history
  33. [IMP] contract: remove redundant method

    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.
    pedrobaeza authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    012b89c View commit details
    Browse the repository at this point in the history
  34. [IMP] contract: add section and notes in contract line

    Ernesto Tejeda authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    c48bbf4 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    7bc085f View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    00dc105 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    5d60e2d View commit details
    Browse the repository at this point in the history
  38. FIX variable quantity view

    angelmoya authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    eb0fb33 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    13504cf View commit details
    Browse the repository at this point in the history
  40. [MIG] contract_variable_quantity: Migration to 14.0

    [UPD] Update contract_variable_quantity.pot
    
    [UPD] README.rst
    victoralmau authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    dd75a0d View commit details
    Browse the repository at this point in the history
  41. [MIG] contract_variable_quantity: Migration to 15.0

    TT40289
    victoralmau authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    73e844b View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    b37a84e View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    fcbe538 View commit details
    Browse the repository at this point in the history
  44. Translated using Weblate (Italian)

    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/
    mymage authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    18d40c4 View commit details
    Browse the repository at this point in the history
  45. Translated using Weblate (Croatian)

    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/
    badbole authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    3bacfc5 View commit details
    Browse the repository at this point in the history
  46. Translated using Weblate (Swedish)

    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/
    jakobkrabbe authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    9a5f101 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    3fdfbc0 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    838261d View commit details
    Browse the repository at this point in the history
  49. [UPD] Update contract_variable_quantity.pot

    oca-ci authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    0fa5a5e View commit details
    Browse the repository at this point in the history
  50. [BOT] post-merge updates

    OCA-git-bot authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    d76449e View commit details
    Browse the repository at this point in the history
  51. Update translation files

    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/
    weblate authored and sbejaoui committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    0ff31e9 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2024

  1. Configuration menu
    Copy the full SHA
    b2868a2 View commit details
    Browse the repository at this point in the history