diff --git a/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice.py b/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice.py
index cbe5ba4..ba3c572 100644
--- a/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice.py
+++ b/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice.py
@@ -271,11 +271,9 @@ def _prepare_subcontractor_work(self, employee_id, line_ids):
"quantity": lines._get_invoiceable_qty_with_project_unit(),
"timesheet_line_ids": [(6, 0, line_ids)],
}
- vals = self.env["subcontractor.work"].play_onchanges(vals, ["employee_id"])
return vals
def _prepare_invoice_line(self, invoice, task, timesheet_lines):
- line_obj = self.env["account.move.line"]
project = self.force_project_id or task.project_id
product = project.invoicing_typology_id.product_id
@@ -303,7 +301,7 @@ def _prepare_invoice_line(self, invoice, task, timesheet_lines):
}
)
if project.invoicing_typology_id.invoicing_mode != "customer_postpaid":
- vals["analytic_account_id"] = project.analytic_account_id.id
+ vals["prepaid_analytic_account_id"] = project.analytic_account_id.id
vals["price_unit"] = project.price_unit
if project.invoicing_typology_id.invoicing_mode == "customer_prepaid":
contribution = invoice.company_id._get_commission_rate()
@@ -334,7 +332,6 @@ def _prepare_invoice_line(self, invoice, task, timesheet_lines):
# I keep the above comment until v16 but we actually really need the onchange
# anyway now, to get the right account and price.
- vals = line_obj.play_onchanges(vals, ["product_id", "product_uom_id"])
return vals
@@ -399,7 +396,6 @@ def _get_invoice_vals(self, partner):
vals = {"partner_id": partner.id, "move_type": move_type}
if move_type == "in_invoice":
vals["invoice_date"] = fields.Date.today()
- vals = self.env["account.move"].play_onchanges(vals, ["partner_id"])
return vals
def action_customer_invoice(self):
diff --git a/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice_view.xml b/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice_view.xml
index 48e26b0..31832a6 100644
--- a/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice_view.xml
+++ b/project_invoicing_subcontractor/wizards/subcontractor_timesheet_invoice_view.xml
@@ -7,6 +7,7 @@