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

fix env #57

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions account_invoice_subcontractor/models/subcontractor_work.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,11 @@ def _scheduler_action_subcontractor_invoice_create(self, days=7):
if subcontractor.subcontractor_type == "internal":
dest_company = subcontractor.subcontractor_company_id
user = subcontractor.user_id
self = self.with_user(user).with_company(dest_company)
new_self = self.with_user(user).with_company(dest_company)
else:
# Used to group by invoice also for external in case of the cron
self = self.with_context(invoice_create_cron=True)
subcontractor_works = self.search(
new_self = self.with_context(invoice_create_cron=True)
subcontractor_works = new_self.search(
[
("id", "in", all_works.ids),
("employee_id", "=", subcontractor.id),
Expand Down
Loading