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

[15.0][MIG] hr_expense_substate #143

Open
wants to merge 11 commits into
base: 15.0
Choose a base branch
from

Conversation

Saran440
Copy link
Member

Standard migrate

@Saran440
Copy link
Member Author

/ocabot migration hr_expense_substate

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 17, 2023
@Saran440 Saran440 removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 21, 2023
@bosd
Copy link

bosd commented Oct 2, 2023

Thanks for your efforts.
Did a functionally test on runboat. It failed..
Error message (Propably not yours)

Traceback (most recent call last):
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 368, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 357, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 921, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 546, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 1328, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/main.py", line 1316, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 464, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 451, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/mnt/data/odoo-addons-dir/hr_expense_pay_to_vendor/models/hr_expense.py", line 91, in action_sheet_move_create
    res = super().action_sheet_move_create()
  File "/mnt/data/odoo-addons-dir/hr_expense_invoice/models/hr_expense_sheet.py", line 20, in action_sheet_move_create
    move_lines = res[sheet.id].line_ids
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 654, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
KeyError: 6

@Saran440 Saran440 force-pushed the 15.0-mig-hr_expense_substate branch from 9173863 to 746f033 Compare October 6, 2023 10:14
@Saran440
Copy link
Member Author

Saran440 commented Oct 6, 2023

@bosd Thank you for your review. May be this PR is not up to date of runboat. Can you check again please?

Copy link

@bosd bosd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this addition.
Was unable to functionally test this.. See review comments.

Can you add unit tests?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you migrate this mail template to V15.
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0

On runboat I didn't see this mail template being attached to an substate.
propably because the demo data is not correctly loaded.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a bug of module base_substate.
Now i fixed it here OCA/server-ux#735
Can you help review please?

hr_expense_substate/readme/DESCRIPTION.rst Outdated Show resolved Hide resolved
<field name="arch" type="xml">
<xpath expr="//header/field[@name='state']" position="before">
<field
name="substate_id"
Copy link

@bosd bosd Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other modules the substates have moved to the line below on the form view.
Example from account_move_substate I'm working on.
image

https://github.com/OCA/account-invoicing/pull/1568/files#diff-1947d80641a90451e063090957b86e45ae7bbe8d67d9bea602469e8eab9e6106R8-R16

Can you change this view to keep consistency?

hr_expense_substate/demo/hr_expense_substate_demo.xml Outdated Show resolved Hide resolved
hr_expense_substate/__manifest__.py Outdated Show resolved Hide resolved
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 25, 2024
@bosd
Copy link

bosd commented Feb 25, 2024

@Saran440 Can you incorporate the latest changes? (or is it already done) After that, please retrigger runboat creation. Would like to func test it 🙏

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 3, 2024
@Saran440 Saran440 force-pushed the 15.0-mig-hr_expense_substate branch from 4876cee to cab1576 Compare May 2, 2024 01:51
@@ -0,0 +1,5 @@
This module allows to add a substate to an expense report.
For each expense report state you can define a substate.
We this module you can define substate which allow you to extend expense report workflow.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line can be deleted. The improved one is already above

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description for explain this module. I think it okay to use this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We this module is not proper english :)
The line says the same as the lines above, so it is a duplicate.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Saran440 Going to review this one now. Can you please attend to my earlier comment.

@Saran440 Saran440 force-pushed the 15.0-mig-hr_expense_substate branch from 77a06a2 to 507653d Compare May 30, 2024 06:10
@Saran440
Copy link
Member Author

@bosd Sorry for very late reply. Can you check again. I think this PR ready to merge.

@bosd
Copy link

bosd commented May 30, 2024

@bosd
Copy link

bosd commented May 30, 2024

Not send email because it waiting OCA/server-ux#735

AAh.. So we should attend that PR first.

I'm shy to ask, but could you add that PR as a dependency here in test-requirements.txt?
So we can test the full flow on a runboat here.

@bosd
Copy link

bosd commented Jun 12, 2024

@Saran440 Can you add the dependency in the test-requirements.txt So we can test the full flow on a runboat?

@Saran440 Saran440 force-pushed the 15.0-mig-hr_expense_substate branch from d0af64d to d6b8f19 Compare June 14, 2024 06:57
@Saran440
Copy link
Member Author

@bosd Add it in test-requirement. I not sure that is correct please recheck.

@bosd
Copy link

bosd commented Jun 14, 2024

@bosd Add it in test-requirement. I not sure that is correct please recheck.

Thanks!!
I think it is correctly added.
Have to dig into why tests are failling. (Sadly, I'm really occupied lately).
Are tests ok on your local system?

@Saran440
Copy link
Member Author

Amm, I never use test-requirement. Not sure why it failed.
However, This module I used on production.

@bosd
Copy link

bosd commented Jun 28, 2024

It fails, because there is something wrong in the base_substate with the inheritance of mail.thread

@bosd
Copy link

bosd commented Jul 3, 2024

@Saran440 can you please force push here?
To see if checks are passing with your newest commit on the base module.

@Saran440 Saran440 force-pushed the 15.0-mig-hr_expense_substate branch from 3220a1b to fc6ee33 Compare July 9, 2024 05:12
@bosd
Copy link

bosd commented Jul 9, 2024

Just functionally tested this one on the runboat. The "verified" email is not being sent.
Is this one still depending on OCA/server-ux#735 ?

@bosd
Copy link

bosd commented Jul 9, 2024

@Saran440 I know you spent already a lot of time on this module.
But ideally some added tests would be nice. For example/inspiration see : https://github.com/OCA/purchase-workflow/blob/14.0/purchase_substate/tests/test_purchase_substate.py

@Saran440
Copy link
Member Author

Saran440 commented Jul 9, 2024

@bosd please wait, I'm doing fixed. and find a way to send message.

@Saran440
Copy link
Member Author

Saran440 commented Jul 9, 2024

@bosd Now, I think it's work to me (but it depend OCA/server-ux#735)

Selection_007

@bosd
Copy link

bosd commented Jul 9, 2024

Now, I think it's work to me (but it depend OCA/server-ux#735)

Can you please add that back to the test-requirements.txt like before, so we can test it here on the runboat.

Then after a cleanup and squash of commits it is approved for me.

test-requirements.txt Outdated Show resolved Hide resolved
@Saran440 Saran440 force-pushed the 15.0-mig-hr_expense_substate branch from b16dc38 to 13b7f59 Compare July 9, 2024 10:11
@bosd
Copy link

bosd commented Jul 9, 2024

oopsie my bad, (Im learning this as well) Appears my suggestion for the name in test-requirements.txt was wrong.
Error has inconsistent name: expected 'odoo15-addon-base-substate', but metadata has 'odoo-addon-base-substate'

@Saran440 Saran440 force-pushed the 15.0-mig-hr_expense_substate branch from 13b7f59 to 5843e5f Compare July 9, 2024 11:18
Copy link

@Dranyel-Bosd Dranyel-Bosd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks so good to me 💯

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 10, 2024
@bosd
Copy link

bosd commented Nov 14, 2024

Please don't go stale :)
Let's merge the base module and the depending ones.

@Saran440 Saran440 removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants