i have created custom button to create Journal Entries in account.move her the code:
def compute_overheads(self):
if self.total_cost != 0:
print(self.total_cost)
debit_value = {
'name': 'Production Overheads',
'debit': self.total_cost,
'credit': 0.0,
'account_id': self.credit_account,
}
credit_value = {
'name': 'Production Overheads',
'debit': 0.0,
'credit': self.total_cost,
'account_id': self.credit_account,
}
values = {
# 'journal_id': self.
# 'date': self.date.today(),
'ref': 'Production Overheads Costs',
'state': 'draft',
'line_ids': [(0, 0, debit_value), (0,
}
move = self.env['account.move'].create(values)
return move
no error raised when click button but no entries created in accounting