Browse Source

ADD FIX Extensión eiru_reports informe especial para radio positiva - suceso

Sebas 6 năm trước cách đây
mục cha
commit
8eb411c5b6
3 tập tin đã thay đổi với 32 bổ sung1 xóa
  1. 31 0
      models.py
  2. BIN
      models.pyc
  3. 1 1
      static/src/js/reports/report_account_pay.js

+ 31 - 0
models.py

@@ -121,6 +121,37 @@ class AccountVoucher(models.Model):
 
 		return values
 
+class AccountMoveLine(models.Model):
+	_inherit = 'account.move.line'
+
+	@api.model
+	def getAccountMoveLine(self,domain):
+		AccountMoveLine = self.env['account.move.line'].search(domain)
+		decimal_precision = self.env['decimal.precision'].precision_get('Account')
+		values = []
+		for line in AccountMoveLine:
+
+			values.append({
+				'id': line.id,
+				'name': line.name,
+				'date': line.date,
+				'date_maturity': line.date_maturity,
+				'reconcile_ref': line.reconcile_ref,
+				'amount_residual': line.amount_residual,
+				'partner_id': [
+					line.partner_id.id,
+					line.partner_id.name,
+				],
+				'move_id': [
+					line.move_id.id,
+					line.move_id.name,
+				],
+				'debit': line.credit,
+				'credit': line.debit,
+			})
+
+		return values
+
 class AccounPaymentTerm(models.Model):
 	_inherit = 'account.payment.term'
 

BIN
models.pyc


+ 1 - 1
static/src/js/reports/report_account_pay.js

@@ -614,7 +614,7 @@ function report_account_pay(reporting){
 
                         if(AccountVoucher.length > 0){
                             _.each(AccountVoucher, function(item2){
-                                console.log(item2);
+
                                 var CurrencyVoucher = self.getResCurrency(item2.currency_id[0]).shift();
 
                                 var amount_pagado = 0;