<commit_before># -*- coding: utf-8 -*-
# Copyright 2017 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import fields, models

STATES = [('draft', 'Rascunho'),
          ('done', 'Confirmado'),
          ('paid', 'Pago'),
          ('error', 'Erro'),
          ('cancel', 'Cancelado')]


class PaymentOrder(models.Model):

    _inherit = 'payment.order'

    def action_done(self):
        super(PaymentOrder, self).action_done()
        for line in self.line_ids:
            line.action_done()
        pass


class PaymentLine(models.Model):
    _inherit = 'payment.line'

    # order_id
    status = fields.Selection(
        selection=STATES,
        default='draft',
        string='Status',
        readonly=True,
    )
    payslip_id = fields.Many2one(
        string="Ref do Holerite",
        comodel_name="hr.payslip",
    )

    def action_done(self):
        self.status = 'done'

    # FIXME
    def action_paid(self):
        self.state = 'paid'

    # Caso de retorno
    def verify_error(self):
        pass<commit_msg>[FIX] troca de state para status<commit_after># -*- coding: utf-8 -*-
# Copyright 2017 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import fields, models

STATUS = [('draft', 'Rascunho'),
          ('done', 'Confirmado'),
          ('paid', 'Pago'),
          ('error', 'Erro'),
          ('cancel', 'Cancelado')]


class PaymentOrder(models.Model):

    _inherit = 'payment.order'

    def action_done(self):
        super(PaymentOrder, self).action_done()
        for line in self.line_ids:
            line.action_done()
        pass


class PaymentLine(models.Model):
    _inherit = 'payment.line'

    payslip_id = fields.Many2one(
        string="Ref do Holerite",
        comodel_name="hr.payslip",
    )

    def action_done(self):
        self.status = 'done'

    # FIXME
    def action_paid(self):
        self.state = 'paid'

    # Caso de retorno
    def verify_error(self):
        pass
{'fraction_non_alphanumeric': 0.1399402390438247, 'fraction_numerical': 0.00796812749003984, 'mean_word_length': 2.33167495854063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2644082', 'n_tokens_mistral': 666, 'n_tokens_neox': 636, 'n_words': 143}