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

[17.0][MIG] hr_expense_invoice: Migration to 17.0 #256

Merged
merged 53 commits into from
Sep 10, 2024

Commits on Jul 15, 2024

  1. [ADD] hr_expense_invoice

    Set supplier invoices on HR expenses
    ====================================
    
    This module should be used when a supplier invoice is paid by an employee. It
    allows to set  a supplier invoice for each expense line, adding the
    corresponding journal items to transfer the debt to the employee.
    
    Installation
    ============
    
    Install the module the regular way.
    
    Configuration
    =============
    
    You don't need to configure anything more to use this module.
    
    Usage
    =====
    
    Instead of coding a full expense line, select an existing supplier invoice,
    and then the rest of the fields will be auto-filled and grayed.
    
    When you generate the expenses account entries, lines with invoices filled
    will be generated as opposite of the payable move line of the invoice, and
    both will be reconciled, letting the employee payable account as the only
    open balance.
    
    Known issues / Roadmap
    ======================
    
    * Multiple payment terms for a supplier invoice are not handled correctly.
    * Partial reconcile supplier invoices are also not correctly handled.
    
    OCA Transbot updated translations from Transifex
    pedrobaeza authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    02c8af3 View commit details
    Browse the repository at this point in the history
  2. [IMP] hr_expense_invoice: Allow to create supplier invoice from expen…

    …se view
    
    OCA Transbot updated translations from Transifex
    pedrobaeza authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    a4928b8 View commit details
    Browse the repository at this point in the history
  3. [FIX] Fix issue with 2 invoices on the same partner and the same tota…

    …l amount (OCA#237)
    
    On the same expense, when we have 2 or more lines with different invoices, and each invoices have the same total amount, reconcile is not possible.
    
    The fix is to exclude reconcile account.move.line, and the first time if we have more than one line to reconcile on the same amount, we keep the first.
    
    OCA Transbot updated translations from Transifex
    kryskool authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    df7888a View commit details
    Browse the repository at this point in the history
  4. [MIG] hr_expense_invoice: Migration to 10.0

    OCA Transbot updated translations from Transifex
    cubells authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    20a1eec View commit details
    Browse the repository at this point in the history
  5. [MIG] hr_expense_invoice: Migration to 11.0

    [UPD] Update hr_expense_invoice.pot
    cubells authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    63c8ca1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    30757d5 View commit details
    Browse the repository at this point in the history
  7. Translated using Weblate (German)

    Currently translated at 100.0% (4 of 4 strings)
    
    Translation: hr-11.0/hr-11.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_expense_invoice/de/
    
    Update translation files
    
    Updated by Update PO files to match POT (msgmerge) hook in Weblate.
    marylla authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    9a8bccb View commit details
    Browse the repository at this point in the history
  8. [12.0][MIG] hr_expense_invoice

    [UPD] Update hr_expense_invoice.pot
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-12.0/hr-12.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/
    kittiu authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    2727f45 View commit details
    Browse the repository at this point in the history
  9. [12.0][IMP] hr_expense_invoice

    Add expense info to invoice info or create/edit
    kittiu authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    d5cb0b3 View commit details
    Browse the repository at this point in the history
  10. [12.0][IMP] hr_expense_invoice

    From expense sheet, add action "Create Invoice" from multiple expenses
    Change the way reference invoice_id is checked.
    - No more onchange invoice_id that set values to expense
    - Instead, check amount on expense and invoice during post entry
    - Change the way to allow reconcile with > 2 account move lines
    kittiu authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    f2bddd0 View commit details
    Browse the repository at this point in the history
  11. Translated using Weblate (German)

    Currently translated at 100.0% (4 of 4 strings)
    
    Translation: hr-12.0/hr-12.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/de/
    marylla authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    7e03408 View commit details
    Browse the repository at this point in the history
  12. Translated using Weblate (Spanish)

    Currently translated at 100.0% (4 of 4 strings)
    
    Translation: hr-12.0/hr-12.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/es/
    
    [UPD] README.rst
    
    [UPD] Update hr_expense_invoice.pot
    
    [UPD] README.rst
    
    hr_expense_invoice 12.0.1.3.0
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-12.0/hr-12.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_invoice/
    Jaime Arroyo authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    04d438b View commit details
    Browse the repository at this point in the history
  13. [FIX] Avoid not intended warnings

    hr_expense_invoice 12.0.1.3.1
    MiquelRForgeFlow authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    fdadb12 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b1eeb75 View commit details
    Browse the repository at this point in the history
  15. [13.0][MIG] : hr_expense_invoice

    [UPD] Update hr_expense_invoice.pot
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-expense-13.0/hr-expense-13.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-13-0/hr-expense-13-0-hr_expense_invoice/
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-expense-13.0/hr-expense-13.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-13-0/hr-expense-13-0-hr_expense_invoice/
    Saran440 authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    761cf01 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    9487be1 View commit details
    Browse the repository at this point in the history
  17. [FIX] hr_expense_invoice: Reset taxes on invoice change

    If not, the total amount of the expense won't match to invoices
    with taxes.
    
    [UPD] README.rst
    pedrobaeza authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    666b31f View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    c145886 View commit details
    Browse the repository at this point in the history
  19. [FIX] hr_expense_invoice: Set groups to invoice_id field in expense view

    [UPD] README.rst
    
    hr_expense_invoice 13.0.1.1.0
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    af43368 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    438b388 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    09da673 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4e6113c View commit details
    Browse the repository at this point in the history
  23. - Do reconciliations per line, so don't group invoices from different…

    … partners.
    
    - Intercept properly the sheet paid action for not marking it as paid when
      reconciling the expense lines that belongs to invoices.
    - Prevent set invoices paid when sheet paid by company.
    - Some docstring.
    
    Co-authored-by: Pedro M. Baeza <pedro.baeza@tecnativa.com>
    Co-authored-by: Víctor Martínez <victor.martinez@tecnativa.com>
    
    hr_expense_invoice 13.0.1.1.2
    
    [UPD] Update hr_expense_invoice.pot
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-expense-13.0/hr-expense-13.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-13-0/hr-expense-13-0-hr_expense_invoice/
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    ec17307 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    d841b93 View commit details
    Browse the repository at this point in the history
  25. [IMP] hr_expense_invoice: Remove expense_create_invoice wizard accord…

    …ing to sheet
    
    hr_expense_invoice 13.0.1.2.0
    
    [UPD] Update hr_expense_invoice.pot
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-expense-13.0/hr-expense-13.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-13-0/hr-expense-13-0-hr_expense_invoice/
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    eb709dc View commit details
    Browse the repository at this point in the history
  26. [IMP] : Add migration to prevent error related to many2many in Transi…

    …ent models (hr.expense.create.invoice)
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    6ec13fb View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    08ed873 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    5b74c5b View commit details
    Browse the repository at this point in the history
  29. [IMP] hr_expense_invoice: Prevent change invoice total when it's rela…

    …ted with expense and improve domain to prevent set same invoice in different expenses.
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    d52ce72 View commit details
    Browse the repository at this point in the history
  30. [FIX] hr_expense_invoice: Force save unit_amount expense (when invoic…

    …e is set)
    
    hr_expense_invoice 13.0.1.3.0
    
    [UPD] Update hr_expense_invoice.pot
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-expense-13.0/hr-expense-13.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-13-0/hr-expense-13-0-hr_expense_invoice/
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    7f033d8 View commit details
    Browse the repository at this point in the history
  31. [14.0][MIG] hr_expense_invoice

    Saran440 authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    29dcb22 View commit details
    Browse the repository at this point in the history
  32. [FIX] hr_expense_invoice: Assign the partner_id and account_id correc…

    …tly in the linked accounting entries of expenses with invoices.
    
    TT32050
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    6fdecb7 View commit details
    Browse the repository at this point in the history
  33. [FIX] hr_expense_invoice: Changes in the test to avoid errors in the …

    …accounting account according to the defined accounting plan.
    
    TT32050
    
    [UPD] Update hr_expense_invoice.pot
    
    [UPD] README.rst
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b203ceb View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    75d411d View commit details
    Browse the repository at this point in the history
  35. [FIX] hr_expense_invoice: Resilient tests on multi-company

    Doing a bulk search on accounts without company filter can lead to
    selecting an account of other company, and thus, making the test to
    fail.
    
    We restrict the account search to the current company.
    pedrobaeza authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    e8b2a50 View commit details
    Browse the repository at this point in the history
  36. setting the name of a new invoice to / in order to maintain proper se…

    …quence of invoices
    
    [UPD] Update hr_expense_invoice.pot
    
    [UPD] README.rst
    MosabWadea authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    cc84e55 View commit details
    Browse the repository at this point in the history
  37. [FIX] hr_expense_invoice: do not display UoM and quantity label

    Hide quantity label and UoM field when selecting an invoice, as
    it is done with quantity field.
    
    hr_expense_invoice 15.0.1.1.0
    LoisRForgeFlow authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    4a358bf View commit details
    Browse the repository at this point in the history
  38. [IMP] hr_expense_invoice: Change _validate_expense_invoice() function…

    … to use amount_total from invoices.
    
    If residual amount from invoice is not the same, it should not show an error.
    
    TT40175
    
    hr_expense_invoice 15.0.1.1.1
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    90110dc View commit details
    Browse the repository at this point in the history
  39. [FIX] hr_expense_invoice: Change SavepointCase to TransactionCase

    hr_expense_invoice 15.0.1.1.2
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b9fd501 View commit details
    Browse the repository at this point in the history
  40. [IMP] hr_expense_invoice: Copy attachments from expense to invoice

    TT41948
    
    hr_expense_invoice 15.0.1.1.3
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    b4a0420 View commit details
    Browse the repository at this point in the history
  41. Added translation using Weblate (Italian)

    Translated using Weblate (Italian)
    
    Currently translated at 100.0% (15 of 15 strings)
    
    Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_invoice/it/
    
    [UPD] README.rst
    
    Update translation files
    
    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_invoice/
    mymage authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    7cd6a84 View commit details
    Browse the repository at this point in the history
  42. Translated using Weblate (Italian)

    Currently translated at 100.0% (15 of 15 strings)
    
    Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_invoice/it/
    francesco-ooops authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    db961dd View commit details
    Browse the repository at this point in the history
  43. Translated using Weblate (Spanish)

    Currently translated at 100.0% (15 of 15 strings)
    
    Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_invoice/es/
    Ivorra78 authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    f0f3645 View commit details
    Browse the repository at this point in the history
  44. [MIG] hr_expense_invoice: Migration to 16.0

    TT45635
    victoralmau authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    864ac29 View commit details
    Browse the repository at this point in the history
  45. [UPD] Update hr_expense_invoice.pot

    oca-ci authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    d3f8af6 View commit details
    Browse the repository at this point in the history
  46. Translated using Weblate (Italian)

    Currently translated at 100.0% (15 of 15 strings)
    
    Translation: hr-expense-16.0/hr-expense-16.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_invoice/it/
    mymage authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    0b0cf29 View commit details
    Browse the repository at this point in the history
  47. [FIX+IMP] hr_expense_invoice: Proper accounting + UX

    - The resulting entries after posting were not correct. Now, this is
      handled this way:
    
      * Paid by the company: no entry is created, as the invoice represents
        the AP balance. The expense sheet payment state is controlled
        through the linked invoices payment states.
      * Paid by employee: the vendor bill that core creates is voided, and
        instead, a journal entry transferring the AP balance to the employee
        is created against the original vendor balance, that is reconciled
        and given as paid.
    
    - When an invoice is selected in the expense, the interface was not
      properly adapted, avoiding to change certain data, and the
      corresponding were not filled as well. Now both things are performed.
    - Removed the non-sense register payment constraint.
    - Added smart-button to navigate from invoice to expense, as there's
      no visible link in that direction.
    - Avoid the need of the field `with_invoice_id`, as it was simply a
      question of putting properly the other field as invisible and without
      groups (apart from the already existing one with groups).
    - Payment state and residual amount controlled correctly for these new
      cases.
    - Tests cleanup, adapted (they were manipulated in some cases to match
      the weird previous result, like in payment states) and redundancies
      were removed.
    
    TT49143
    pedrobaeza authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    ace9a35 View commit details
    Browse the repository at this point in the history
  48. [UPD] Update hr_expense_invoice.pot

    oca-ci authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    216e677 View commit details
    Browse the repository at this point in the history
  49. [BOT] post-merge updates

    OCA-git-bot authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    ba705f1 View commit details
    Browse the repository at this point in the history
  50. Update translation files

    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
    
    Translation: hr-expense-16.0/hr-expense-16.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_invoice/
    weblate authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    9dd1da6 View commit details
    Browse the repository at this point in the history
  51. Translated using Weblate (Italian)

    Currently translated at 100.0% (17 of 17 strings)
    
    Translation: hr-expense-16.0/hr-expense-16.0-hr_expense_invoice
    Translate-URL: https://translation.odoo-community.org/projects/hr-expense-16-0/hr-expense-16-0-hr_expense_invoice/it/
    mymage authored and desdelinux committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    ba233b2 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    e658292 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. [MIG] hr_expense_invoice: Migration to 17.0

    Actions performed:
    - Deprecated `hr.expense.reference` field as part of [1].
    - Merged the `hr.expense.is_editable` and `hr.expense.sheet_is_editable`
      fields as part of [1].
    - Renamed `hr.expense.unit_amount` to `hr.expense.price_unit`.
    - Renamed `hr.expense.attachment_number` to `hr.expense.nb_attachment`.
    - Renamed `hr.expense.approve_expense_sheets()` to
      `hr.expense.action_approve_expense_sheets()`.
    - Renamed `hr.expense.account_move_id` to `hr.expense.account_move_ids`.
    - Renamed `hr.expense.total_amount` to
      `hr.expense.total_amount_currency`.
    - Inherit compute of `hr.expense.sheet.state` to consider expenses with
      linked invoices.
    - Switched from old %-based string formatting to f-strings.
    - Replaced the use of `attrs` in views with their equivalent Python
      expressions as part of [2].
    - Adapted the `hr.expense.sheet` records creation in tests.
    - Updated to use the employee partner from `hr.employee.work_contact_id`
      instead of `hr.employee.address_home_id` since it has been split into
      multiple fields.
    - Added the `hr.expense.amount_residual` field to maintain the one
      invoice per expense functionality.
    - Adapted test assertions for `hr.expense.sheet.state` since it is now
      a computed field.
    
    Co-authored-by: desdelinux <luigys@vauxoo.com>
    
    [1]: odoo/odoo#130244
    [2]: odoo/odoo#104741
    xmglord committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    bef9479 View commit details
    Browse the repository at this point in the history