Hi
To add a custom column like "Customer Reference" to the quotation display in Odoo without using Odoo Studio, you'll need to create a custom module. This approach allows you to implement customizations without directly altering Odoo's core code. The key is to inherit the quotation tree view, which is responsible for displaying quotations. You can identify this view and then, in your custom module's XML file, use <record> and <field> tags to inherit and modify it.
Next, define the custom field (e.g., x_customer_ref) in your module's Python file within the sale.order model. Then, in the inherited tree view, add a <field> tag to include your custom field, specifying the name attribute as the name of your custom field (e.g., x_customer_ref). Finally, ensure that the field is added to the view in a way that it becomes visible in the quotation display. Remember to update your module and the quotation view to reflect these changes.
Python
from odoo import models, fields
class SaleOrder(models.Model):
_inherit = 'sale.order'
customer_ref = fields.Char(string='Customer Reference')
XML
<odoo>
<data>
<!-- Inherit Sale Order Tree View -->
<record id="sale_order_tree_view_inherit" model="ir.ui.view">
<field name="name">sale.order.tree.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="customer_ref" optional="hide"/>
</xpath>
</field>
</record>
</data>
</odoo>
Hope it helps