feat(configurator): A4 - add Express header fields to sale.order

This commit is contained in:
gsinghpal
2026-05-26 20:58:23 -04:00
parent ad3d6261af
commit 08bc2b6a89
2 changed files with 36 additions and 0 deletions

View File

@@ -121,6 +121,25 @@ class SaleOrder(models.Model):
'each shop slices its backlog differently (customer programme, ' 'each shop slices its backlog differently (customer programme, '
'priority, week, etc.).', 'priority, week, etc.).',
) )
# ---- Express Orders header-level (2026-05-26) ----
x_fc_material_process = fields.Char(
string='Material / Process Tag',
help='Free-text order-level shop tag (e.g. ENP-STEEL-HP-ADVANCED). '
'Informational; not used by the workflow.',
)
x_fc_internal_notes = fields.Text(
string='Order-Level Internal Notes',
help='Notes visible only to the estimator / planner / shop. Never '
'prints on customer-facing PDFs. Distinct from sale.order.note '
'which IS customer-facing (Terms & Conditions).',
)
x_fc_print_terms = fields.Boolean(
string='Print Terms on Customer Documents',
default=True,
help='When False, the Terms & Conditions (sale.order.note) is '
'suppressed on quote / SO / invoice / packing slip PDFs.',
)
x_fc_planned_start_date = fields.Date( x_fc_planned_start_date = fields.Date(
string='Planned Start Date', tracking=True, string='Planned Start Date', tracking=True,
) )

View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# Express Orders — Task A4 schema tests
from odoo.tests.common import TransactionCase, tagged
@tagged('post_install', '-at_install', 'fp_express')
class TestExpressSaleOrderFields(TransactionCase):
def test_new_fields_exist(self):
SO = self.env['sale.order']
self.assertIn('x_fc_material_process', SO._fields)
self.assertIn('x_fc_internal_notes', SO._fields)
self.assertIn('x_fc_print_terms', SO._fields)
def test_print_terms_default_true(self):
partner = self.env['res.partner'].create({'name': 'C'})
so = self.env['sale.order'].create({'partner_id': partner.id})
self.assertTrue(so.x_fc_print_terms)