在使用销售点时,部分付款如何影响会计报表?

时间:2017-09-10 10:24:39

标签: odoo odoo-10

由于我购买了pos_partial_payment模块,但发现我的要求不完整,因此需要修改/添加新功能。当我执行部分付款(剩余信用额度)时,会计没有变化。 例如,此类部分付款金额未在会计中显示,也未将应收帐款更改为现金日记帐。

 @api.one
def pay_partial_payment(self, amount):
    # Comment this method because we don't want generate payment accounting entry, if you want then just Uncomment it...
    print  "partnerrrrrrrrrrrrrrrrrrrrrrr id",self    
    print "****************codeeeeeeeeeeeeeeeeeeeeeeeee",amount
    #finding recivble 
    print  "id of account rec account",self.property_account_receivable_id.id
    lines = []              
    partner_line = {'account_id':self.property_account_receivable_id.id,
    'name':'/',
    'date':date.today(),
    'partner_id': self.id,
    'debit':float(amount),
    'credit':0.0,

    }
    lines.append(partner_line)              
    #find sale account
    recivable_ids = self.env['account.account'].search([('user_type_id.name','=','Receivable')])
    print "*********************************************************recivable_ids",recivable_ids
    rec_id = False
    if recivable_ids:
        rec_id  = recivable_ids[0]

    pos_line  = {'account_id':rec_id.id,
    'name':'pos partial payment',
    'date':date.today(),
    'partner_id': self.id,
    'credit':float(amount),
    'debit':0.0,
    }       
    lines.append(pos_line)
    line_list = [(0, 0, x) for x in lines]
    move_id = self.env['account.move'].create({'partner_id':self.id,
                                    'date':date.today(),
                                    # 'journal_id':7,
                                    'journal_id':6,
                                    'line_ids':line_list
                                    })

    return True     

0 个答案:

没有答案