oca / hr-expense Goto Github PK
View Code? Open in Web Editor NEWHuman Resources Expenses OCA modules for Odoo
License: GNU Affero General Public License v3.0
Human Resources Expenses OCA modules for Odoo
License: GNU Affero General Public License v3.0
Employee Advance and Clearing
When I want to Post Journal of Employee Expense when I Click "Post Journal Entries" I got Error
`Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 360, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 913, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 532, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1396, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1384, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/mnt/extra-addons/tongthai/hr_expense_advance_clearing/models/hr_expense_sheet.py", line 94, in action_sheet_move_create
res = super().action_sheet_move_create()
File "/usr/lib/python3/dist-packages/odoo/addons/hr_expense/models/hr_expense.py", line 906, in action_sheet_move_create
res = expense_line_ids.action_move_create()
File "/usr/lib/python3/dist-packages/odoo/addons/sale_expense/models/hr_expense.py", line 46, in action_move_create
return super(Expense, self).action_move_create()
File "/usr/lib/python3/dist-packages/odoo/addons/hr_expense/models/hr_expense.py", line 510, in action_move_create
move_line_values_by_expense = self._get_account_move_line_values()
File "/mnt/extra-addons/tongthai/l10n_th_account_tax_expense/models/hr_expense.py", line 34, in _get_account_move_line_values
move_line_values_by_expense = super()._get_account_move_line_values()
File "/mnt/extra-addons/tongthai/hr_expense_advance_clearing/models/hr_expense.py", line 65, in _get_account_move_line_values
emp_advance = self.env.ref("hr_expense_advance_clearing.product_emp_advance")
File "/usr/lib/python3/dist-packages/odoo/api.py", line 514, in ref
return self['ir.model.data'].xmlid_to_object(xml_id, raise_if_not_found=raise_if_not_found)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 1952, in xmlid_to_object
raise ValueError('No record found for unique ID %s. It may have been deleted.' % (xmlid))
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 316, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: No record found for unique ID hr_expense_advance_clearing.product_emp_advance. It may have been deleted.`
Affected versions: 14
Expected behavior
I want to Post Journal Entries.
I want to create the two lines into a vendor bill (i see no buttons for this, in the form or in the action menu)
There is a button "create vendor bill" on each line when the button is clicked on each line, 2 separate draft vendor bills are created without a vendor (so it can't be posted), try a vendor in the bill --> the bill line is gone
The expense report can't be posted as well.
Affected versions: Tried in V14 on runboat
Expected behavior
Additional context
Is there any config that i miss?
I have encountered an issue with the hr_expense_invoice module in Odoo, specifically when trying to create a vendor bill from multiple expenses. When the total expense amount is €115 and the "Create Vendor Bill" button is used to generate the invoice, the resulting vendor bill cannot be edited to properly account for the expenses.
Steps to Reproduce:
Go to an expense report with multiple expenses totaling €115. Don't add any tax manually! 😄
Click the "Create Vendor Bill" button.
Observe that the created vendor bill cannot be edited propertly -> video 2 minutes 1x, 1 minutes 2x
https://www.loom.com/share/dd5827e3969c4fefbfa127008f48dea7?sid=5026f96a-5ca8-41ce-bed0-b91a0aeb6258
Expected Behavior:
The vendor bill created from multiple expenses should be editable, allowing for proper accounting and adjustments as needed.
Actual Behavior:
The created vendor bill is not editable, preventing necessary adjustments and correct accounting of the expenses.
Thank you very much for you attention
Best regards,
Rafael
@moduon MT-5202
Please could you give an opinion @SoniaViciana @victoralmau @kwoychesko @JordiBForgeFlow @alexey-pelykh @dreispt @tafaRU @gurneyalex ?
Thank you!!!! 😄 ❤️
Best regards!
Rafael
References:
Dear @Saran440 ,
I hope you are well.
I am using your module with success.
Question about "When creating the Expense Report, the selected Payment Type is used to populate the "Bank Journal" field, in the "Other Setting" tab." ?
If I have created a new Journal "AMEX1" and force "Payment Journal" = "AMEX1", why this journal is not populated ?
Best Regards
Youssef
Hi Team! Quick question, I have translated the hr_expense_advance_clearing to Portuguese (Brazilian) and I would like to ask where should I post the .PO file?
Thanks,
for sheet in self.filtered(lambda rec: rec.id in res):
Hello all,
In OCA has module hr_expense_cancel
and it add new field expense_sheet_id
in account payment.
I think this field should split out to new module hr_expense_payment because some module need to do something on payment and link to expense sheet.
Concept:
hr_expense_payment
will link expense sheet id at view payment.hr_expense_cancel
depend on hr_expense_payment
What do you think?
hr_expense_invoice
#234
If i have this expense report:
Journal entries details will be:
So, untaxed amount does not match:
Affected versions: 16
Steps to reproduce the behavior:
hr_expense_petty_cash
incorrect posting when the expense have VAT, instead of holding VAT account, it will hold the pettycash holder account
13:
Steps to reproduce the behavior:
1.
2.
3.
Expected behavior
-I expected to post the vat amount to the vat receivable account at debit side instead of the pettycash holder account.
-I expected the total amount of the expense to be posted on the credit side of the pettycash holder account instead of the trade creditor account
-I expected the deducted amount(Total amount-vat amount) to be posted to the debit side of the expense account(product account)
this is the actual expectation
Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)
To check the issue:
Go to the analytic entries after posting an expense sheet.
you will find double entries (positive and negative) for each distribution line so the total =0.
I try in runbot to put the 2 lines of Employee Advance. Sometimes, there will be use case where the employee have to take employee Advance using different AA in one go.
After the manager approved, then the Accounting will Post the Journal
But after the Accounting post the journal, the document directly goes to Paid Status, where it suppposed to Register Payment first.
Is it in purpose ?
@kittiu, i think you will use the analytic account in Employee Advance in the Budget Module, and there is a possibility to have 2 AA as budget source for 1 Employee Advance Report, right ?
Thanks
I have a scenario in which the company contracts a volume of X credits to be used to pay for meals made on trips. This credit is distributed monthly to a specific employee and if any of these credits are left over, the company only supplements the balance in the following month
Example:
*$300 in food credit was transferred to the employee
*$150 was consumed
Total $150
New balance $300
Now, talking about the possibility of registering other products that can be used as an advance, it is because this process mentioned above seems to suit the purpose of the hr_expense_advance_clearing module well, but it would be important to be able to separate what is a merely financial advance from an advance of credits (including also the separation of the G/L account used). Therefore, one possibility would be to refactor this module to take into account a Boolean that determines if that product is of the advance type or not.
Makes sense ?
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-14.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
Dear
In odoo8, i had the possibilité to assign invoice already created in my accounting.
In odoo14CE, i can't find the way to get access to the invoices.
Best regards
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
There is an error in the expense sheet when we have set the taxes. Also if we try to create the expense sheet without taxes and then correct it in the invoice we will get the error that the total of the invoice does not match the total of the expense.
At the moment we create an invoice from the expense sheet the information of the tax fields is deleted, leaving the records incoherent.
In the following PR I propose a solution: #244
Here is a video explaining the issue: https://www.loom.com/share/a6c6049e0fbf431180a6b904e5694b13
hr_expense_invoice
Affected versions: 16.0 but probably more.
Steps to reproduce the behavior:
You will see how the expense total changed and the invoice as well.
Expected behavior
The total invoiced and the total expense should be the same.
module: hr_expense_petty_cash
version: 14.0
Steps to reproduce
Current behavior
Expected behavior
Is your feature request related to a problem?
On Expense Report view.
cancel
button on Expense Report will unlink document
paid
: document on payment and JE will disappearposted
: document on JE will disappearAfter you click cancel
state will change to submit
Describe the solution you'd like
I propose this module can configuration 2 things for solved issue above
unlink
or reverse
documentsubmit
or approve
, when you click cancel
Process expense report
paid
can't see cancel button, you must have unreconciled
document payment first and expense report automated change state paid
to posted
posted
. it will (config 1.1) and state change to (config 1.2)WDYT?
Let's say the company has an outstanding debit amount to an employee, the employee then creates an expense and expense report (without a previous advance report).
When the expense report is reaching the state of "report to pay", it is expected the outstanding debit amount to the employee to show up and can be used to pay the expense report with the add button (like it is in the normal vendor bill), is it possible with current state? am I missing something because I do not have the information on outstanding debit in the expense report?
Hi!
I've made a translation for hr_expense_advance_clearing module to Portuguese (Brazil) and I would like to share it, where's the most appropriate place to do it?
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
Dear @raditv , @ovnicraft , @pniederlag , @cmayo , @christophlsa
Best Regards
As I'm still learning Python, I could use some guidance. It appears like I'm correctly overwriting _prepare_bill_vals but the moves are created incorrectly anyway.
The core hr.expense.sheet now contains a _do_create_moves method, which contains the following line:
moves = self.env['account.move'].create([sheet._prepare_bill_vals() for sheet in own_account_sheets])
_prepare_bill_vals() sets several values for the move to be created, including partner_id and account_id. We need to overwrite these for hr_expense_invoice, so I have the following method:
def _prepare_bill_vals(self):
prepared_bill_vals = super()._prepare_bill_vals()
new_line_ids = []
for line in prepared_bill_vals['line_ids']:
if 'expense_id' in line[2]:
expense = self.env['hr.expense'].browse(line[2]['expense_id'])
if not expense.invoice_id:
new_line_ids.append(line)
continue
new_line = (line[0], line[1], line[2].copy())
new_line[2]['partner_id'] = expense.invoice_id.partner_id.commercial_partner_id.id
new_line[2]['account_id'] = expense.invoice_id.line_ids.filtered(lambda l: l.account_type == "liability_payable").account_id.id
new_line_ids.append(new_line)
prepared_bill_vals['line_ids'] = new_line_ids
return prepared_bill_vals
I can see in my debugger that prepared_bill_vals has updated the partner_id and account_id as required, but for some reason the moves are still being created with the Employee that created the expense as the partner_id and the expense category's account as the account_id.
Any guidance would be greatly appreciated! TIA!
Hi Team! I was testing this module alongside my team and we've noticed a lot of new weird behaviors that makes this module unusable. I've tried in V14 and V15 both local and using runboat and they all behave the same.
hr_expense_advance_clearing
When creating an advance, Odoo displays the error "Employee advance product has no payable account" because for some reason, the system is only looking if the product has an account set in the field Expense Account (property_account_expense_id) instead of looking to the account set at the Product Category (property_account_expense_categ_id) as well (which is odoo's default behavior for any product).
In V15, expense products have their own menu at the Expense module (hr.expense), however the product used for advances doesn't show up there (It is my understanding that to be shown up there it needs to be marked as can_be_expensed = TRUE) which is no longer possible for users, as this checkbox is now invisible in the Product's menu.
When creating expense reports and selecting the advance, users can't add expenses lines. The system makes the user to add the expense lines first and then the advance which doesn't make any sense as the advance is in the form header.
Even after going through all of that, once you've submitted your expense, it doesn't clear the amount you've expended. Instead, it posts the full advance value in the journal as if you would have expended it all. Meaning, If I advance $100 and expended only $50, the journal entry from my expense report with an advanced would show $100. Which also causes issues with reports and accounting as the values doesn't match and no report displays remaining values as they're all zeroed.
Affected versions: V14, V15
Steps to reproduce the behavior:
2)Product not shown in the Expense Menu:
2.1) Go to Expenses > Configuration > Expenses Product
2.2) The product "Employee Advance" is not shown.
3)Expense Report with advance issue:
3.1) Go to Invoicing > Customers > Products
3.2) Remove any filter
3.3) Search for "Employee Advance"
3.4) In the Accounting tab, set the Expense account "600000 Expenses" and save it.
3.5) Go to Expenses > My Expenses > Advances > Click on "Create"
3.6) Give it a name
3.7) Click "add a line"
3.8) Click on "Create"
3.9)Type $100 in the "Total" field
3.10) Click on "Save & Close"
3.11) Click on "Submitt to Manager"
3.12) Cick on "Approve"
3.13) Click on "Post Journal Entries"
3.14) Click on "Register Payment" and create a payment.
3.15) Click on Expenses > My Expenses > Expenses
3.16) Click on "Create"
3.17) Select the advance you've created in steps 3.6-3.10
3.18) The "add a line" option is no longer available.
4)Remaining Value issue:
4.1) Go to Invoicing > Customers > Products
4.2) Remove any filter
4.3) Search for "Employee Advance"
4.4) In the Accounting tab, set the Expense account "600000 Expenses" and save it.
4.5) Go to Expenses > My Expenses > Advances > Click on "Create"
4.6) Give it a name
4.7) Click "add a line"
4.8) Click on "Create"
4.9)Type $100 in the "Total" field
4.10) Click on "Save & Close"
4.11) Click on "Submitt to Manager"
4.12) Cick on "Approve"
4.13) Click on "Post Journal Entries"
4.14) Click on "Register Payment" and create a payment.
4.15) Go to Expenses > My Expenses to Report
4.16) Click on "Create"
4.17) Select a expense product
4.18) Type $50 in the "Total" field and click "Save"
4.19) Click on "Create Report"
4.20) Select the advance you've created in steps 4.6-4.10
4.21) Click on "Submitt to Manager"
4.22) Click on "Approve"
4.23) Click on "Post Journal Entries"
4.24) Look at the field Advance Remaining (advance_sheet_residual) and the value will be the same as the advance total instead of the actual remaining value of $50.
4.25) Click on Expenses > Advances
4.26) Look for the advance created in steps 4.6-4.10, it will be marked as fully paid instead of partially paid.
Expected behavior
The system should look to both fields and see which one is filled as it does in all the other modules.
The Product should be displayed in the list.
The option to add lines should continue to be available for the user to select expense lines or create new ones.
The remaining value should be properly set (in this example should display $50) but the correct value would be the advance minus the sum of all expense reports that has that advance selected.
Best Regards,
Luiz Fernando
Dear
An employee could be attached to a list of credit cards?
Then how to assign one of them when creating his expense?
Best regards
Is your feature request related to a problem?
Every month I am receiving my credit card statement.
Each expense is an invoice.
Each statement is linked with a journal.
If I am getting a refund, this refunds is sent back to my credit card.
Then I am expecting to link the "refund" instead of "invoice".
Describe the solution you'd like
To access to the Refund AND Invoices items and able to link to an expense
Best Regards
Youssef
The name of the module that has a bug.
hr_advance_clearing combine with account_reconciliation_widget
A clear and concise description of what the bug is.
Can't reconcile the advance refund using account_reconcilation _widget.
Affected versions: currently i test this in version 14.0
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
User can validate the reconciliation of the return advance
Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)
I can't try this in Runboat since module account_reconciliation_widget is not available in the hr_advance_clearing
Dear,
I am using hr-expense-journal to assign a credit card for expenses.
Question : In the credit card journal, I can't see anything ? is it right ? or do I need to import any assets here ? or is available in another Journal ?
How to assign the employee AS PARTNER ?
Best Regards,
Youssef
Dear
Id like to assign a period to my expense.
Any idea how to do it?
module: hr_expense_tier_validation
version: 14.0
Is there a way to trigger the approval after the employee has submitted the expense report to the manager, in order to improve the ux and flag the expense as already submitted while waiting for validations?
Indeed, it's quite puzzling to the employee to get 2 validation actions at its initial state Draft:
The case is a 2 steps validation by managers with a strict control on the users allowed to approve. The module fits this perfectly.
Steps to reproduce
Here is how I tried to do it:
Current behavior
The approval is triggered at the Draft state, and the button Request Validation already shows up next to Submit to Manager.
Expected behavior
To trigger this action in state submit, after the employee has triggered Submit to Manager
Thanks a lot in advance for your insight!
Best Regards
There is a part of code that is nor correctly written.
It is trying to avoid a warning on default_get() by update account type back and forth.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.