docx_report_generation/models/res_partner_contract_field_transient.py

23 lines
873 B
Python
Raw Normal View History

2019-12-12 17:12:51 +05:00
from odoo import fields, models
class ContractFieldTransient(models.TransientModel):
_name = "res.partner.contract.field.transient"
_description = "Contract Field Transient"
_contract_wizard_id = fields.Many2one(
2019-12-17 09:53:47 +05:00
"res.partner.contract.wizard", string="Contract", readonly=True,
)
2019-12-17 09:53:47 +05:00
contract_field_id = fields.Many2one("res.partner.contract.field", string="Field",)
2019-12-18 16:26:26 +05:00
name = fields.Char(related="contract_field_id.name", string="Name", readonly=True,)
technical_name = fields.Char(
2019-12-12 17:12:51 +05:00
related="contract_field_id.technical_name",
string="Technical Name",
2019-12-12 17:12:51 +05:00
readonly=True,
)
description = fields.Char(
2019-12-17 09:53:47 +05:00
related="contract_field_id.description", string="Description", readonly=True,
)
visible = fields.Boolean(related="contract_field_id.visible",)
2019-12-17 09:53:47 +05:00
value = fields.Char(string="Value", default="",)