[FIX] report_e_invoice: change function name
This commit is contained in:
parent
b39ae9c9d8
commit
9d8ca7ae74
|
|
@ -150,6 +150,10 @@ class AccountPaymentRegister(models.TransientModel):
|
||||||
|
|
||||||
payments = self._create_payments()
|
payments = self._create_payments()
|
||||||
|
|
||||||
|
if self._context.get('dont_redirect_to_payments'):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
# Update `move_id` values to include `takaful_sponsorship_id`
|
# Update `move_id` values to include `takaful_sponsorship_id`
|
||||||
# if self.is_refund_sponsorship:
|
# if self.is_refund_sponsorship:
|
||||||
# for payment in payments:
|
# for payment in payments:
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ class AccountMoveLine(models.Model):
|
||||||
class AccountMove(models.Model):
|
class AccountMove(models.Model):
|
||||||
_inherit = 'account.move'
|
_inherit = 'account.move'
|
||||||
|
|
||||||
qr_string = fields.Char(compute='_compute_qr_code_str')
|
qr_string = fields.Char(compute='_compute_exp_qr_code_str')
|
||||||
|
|
||||||
@api.depends('amount_total', 'amount_untaxed', 'invoice_date', 'company_id', 'company_id.vat')
|
@api.depends('amount_total', 'amount_untaxed', 'invoice_date', 'company_id', 'company_id.vat')
|
||||||
def _compute_qr_code_str(self):
|
def _compute_exp_qr_code_str(self):
|
||||||
|
|
||||||
def get_qr_encoding(tag, field):
|
def get_qr_encoding(tag, field):
|
||||||
company_name_byte_array = field.encode('UTF-8')
|
company_name_byte_array = field.encode('UTF-8')
|
||||||
|
|
@ -38,8 +38,12 @@ class AccountMove(models.Model):
|
||||||
company_name_length_encoding = len(company_name_byte_array).to_bytes(length=1, byteorder='big')
|
company_name_length_encoding = len(company_name_byte_array).to_bytes(length=1, byteorder='big')
|
||||||
return company_name_tag_encoding + company_name_length_encoding + company_name_byte_array
|
return company_name_tag_encoding + company_name_length_encoding + company_name_byte_array
|
||||||
|
|
||||||
|
<<<<<<< Updated upstream
|
||||||
self.qr_string = ''
|
self.qr_string = ''
|
||||||
|
=======
|
||||||
|
>>>>>>> Stashed changes
|
||||||
for record in self:
|
for record in self:
|
||||||
|
record.qr_string = ''
|
||||||
qr_code_str = ''
|
qr_code_str = ''
|
||||||
if record.invoice_date and record.company_id.vat:
|
if record.invoice_date and record.company_id.vat:
|
||||||
invoice_date = datetime.datetime.strptime(str(record.invoice_date), DEFAULT_SERVER_DATE_FORMAT)
|
invoice_date = datetime.datetime.strptime(str(record.invoice_date), DEFAULT_SERVER_DATE_FORMAT)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue