from odoo import fields, models


class XenoOrrReimbursementLine(models.Model):
    """One Place/Description/Amount/Proof row of an "Other" reimbursement
    (Section 6's "Other Reimbursement path"). Fuel reimbursements never use
    lines -- their single amount is auto-computed and stored directly on
    xeno.orr.reimbursement."""

    _name = "xeno.orr.reimbursement.line"
    _description = "Outside Request Reimbursement Line"
    _order = "reimbursement_id, sequence, id"

    reimbursement_id = fields.Many2one(
        "xeno.orr.reimbursement", required=True, ondelete="cascade", index=True)
    sequence = fields.Integer(default=10)
    place = fields.Char(required=True)
    description = fields.Char(required=True)
    amount = fields.Float(required=True)
    proof_image = fields.Binary(string="Proof Image", attachment=True)
