-
-
Notifications
You must be signed in to change notification settings - Fork 115
[18.0][MIG] hr_expense_invoice: Migration to 18.0 #282
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
base: 18.0
Are you sure you want to change the base?
Conversation
cc93616
to
a75fcb3
Compare
/ocabot migration hr_expense_invoice |
Sorry @cav-adhoc you are not allowed to mark the addon tobe migrated. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
@melanievvl @xmglord @luisg123v @pedrobaeza Hello! Can you guys review this? Thanks in advance! |
Hi @melanievvl, @xmglord, @luisg123v! Sorry to ask again, but could you please review the migration code? Thank you! |
/ocabot migration hr_expense_invoice |
a75fcb3
to
64470f8
Compare
This PR has the |
@pedrobaeza Hi! Would you be able to help us with the merge of this PR? Thanks in advance! Regards |
I don't think so. The vendor bill is already provided, so you should create an extra journal entry cancelling that debt and assigning it to the employee, as it was in previous versions. |
@pedrobaeza Hi! That is a change in the Odoo code (here is the commit where this functionality change was added: (https://github.com/odoo-dev/odoo/blob/17e7e853eaf0c2b726007e0b4eee1a8a190e3613/addons/hr_expense/models/hr_expense_sheet.py#L698)). If we override that behavior, it would differ from Odoo's approach |
This module is for changing that behavior indeed, and make it comfortable to match existing vendor bills. If not, the module is not doing anything. Please check how it's done in previous versions. |
7beac2c
to
1d99272
Compare
…tly in the linked accounting entries of expenses with invoices. TT32050
…accounting account according to the defined accounting plan. TT32050 [UPD] Update hr_expense_invoice.pot [UPD] README.rst
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.
…quence of invoices [UPD] Update hr_expense_invoice.pot [UPD] README.rst
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
… 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
hr_expense_invoice 15.0.1.1.2
TT41948 hr_expense_invoice 15.0.1.1.3
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/
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/
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/
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/
- 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
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/
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/
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
If an expense report includes invoices from different providers, when posting move the report moves to "paid" and invoices are not reconciled as paid, as it fails to reconcile the lines with the transfer moves. Use the correct partner, from current expense line from the report, not always the same partner from first expense line. Fixes OCA#273
904056d
to
b779f5b
Compare
Key changes: