commit
176b06d669
|
|
@ -1174,13 +1174,15 @@ class PaymentDetailsLines(models.Model):
|
|||
donation_date = fields.Date(string='Donation Date',default=lambda self: fields.Date.today())
|
||||
note = fields.Char(string='Note')
|
||||
journal_id = fields.Many2one('account.journal', string="Journal")
|
||||
points_of_sale = fields.Many2one('points.of.sale.custom', string="Point OF sale")
|
||||
points_of_sale = fields.Many2one('points.of.sale.custom', string="Point OF sale",domain="[('branch_custom_id','=',branch_custom_id)]")
|
||||
sponsorship_id = fields.Many2one('takaful.sponsorship')
|
||||
bank_id = fields.Many2one('res.partner.bank',string="Sponsorship Bank")
|
||||
charity_journal_id = fields.Many2one('account.journal', string="charity Bank",related = 'points_of_sale.journal_id')
|
||||
name = fields.Char(string="Ref.",readonly=True)
|
||||
check_number = fields.Char(string='Check Number')
|
||||
account_payment_method = fields.Many2one('account.payment.method.line',domain="[('payment_type','=','inbound')]",string='Account Payment Method')
|
||||
branch_custom_id = fields.Many2one('branch.settings', string="Branch",related='sponsorship_id.branch_custom_id')
|
||||
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
|
|
@ -1188,7 +1190,7 @@ class PaymentDetailsLines(models.Model):
|
|||
if not res.name or res.name == _('New'):
|
||||
res.name = self.env['ir.sequence'].sudo().next_by_code('payment.details.sequence') or _('New')
|
||||
return res
|
||||
@api.onchange('journal_id')
|
||||
@api.onchange('payment_method')
|
||||
def onchange_journal_id(self):
|
||||
for rec in self:
|
||||
# Build the dynamic domain
|
||||
|
|
|
|||
|
|
@ -247,6 +247,7 @@
|
|||
<field name="check_number" attrs="{'invisible': [('payment_method','!=','check')]}"/>
|
||||
<field name="bank_id" attrs="{'invisible': ['|',('payment_method','=','cash'),('payment_method','=',False)]}"/>
|
||||
<field name="journal_id" attrs="{'invisible': ['|','|',('payment_method','=','card'),('payment_method','=','credit_card'),('payment_method','=',False)]}"/>
|
||||
<field name="branch_custom_id" invisible="1"/>
|
||||
<field name="points_of_sale" attrs="{'invisible': ['|','|',('payment_method','=','cash'),('payment_method','=','check'),('payment_method','=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
|
|
|
|||
Loading…
Reference in New Issue