feat(configurator): A4 - add Express header fields to sale.order
This commit is contained in:
@@ -121,6 +121,25 @@ class SaleOrder(models.Model):
|
||||
'each shop slices its backlog differently (customer programme, '
|
||||
'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(
|
||||
string='Planned Start Date', tracking=True,
|
||||
)
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user