Intechnity-com / OdooJsonRpcClient

Odoo Client Json Rpc
MIT License
67 stars 29 forks source link

Cannot create unbalanced journal entry, Differences debit - credit: [-2.0] #92

Open LuisDanFraga opened 6 months ago

LuisDanFraga commented 6 months ago

I try to create a new line of account.move.line but I get that error, I was testing but it won't let me create it, I investigated the error but they say that you have to put "check_move_validity=false" in the context and I don't know how to put it , Could you please help me ? `var lineCreate = OdooDictionaryModel.Create(() => new AccountMoveLineOdooModel() { MoveId = idInvoice, Name = "Ajuste Contable", AccountId = 18565, TaxIds = null, PriceUnit = -2, Quantity = 1, Credit = 2, Debit = 0,
AmountCurrency = -2, Reconciled = false, Blocked =false, CurrencyId = findInvoice.Value.CurrencyId, TaxBaseAmount=0, TaxTagInvert = false, AmountResidualCurrency = 0, RecomputeTaxLine = false, IsRoundingLine = false, ExcludeFromInvoiceTab = false, IsAngloSaxonLine = false, PredictFromName = false, });

var resultLine = await line.CreateAsync(lineCreate);`