Replace em-dashes and en-dashes with hyphens across 789 shipped source files (py/xml/js/scss) so the delivered module reads as human-written; em-dashes had become a recognizable AI-generated tell. Internal .md dev notes are excluded. The WO-sticker mojibake strippers keep their dash search targets (now written — / –). No logic changes: comments and display strings only; validated with py_compile + lxml parse. Rewrite the 7 customer notification emails to be intake-neutral (ship-in / drop-off / pickup) and repair-aware, and fix the Shipped email documents line (packing slip vs bill of lading; certificate only when issued). Subjects use a hyphen separator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28 lines
1.2 KiB
Python
28 lines
1.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Phase 1 - rack-load core model tests.
|
|
from odoo.tests import TransactionCase, tagged
|
|
|
|
|
|
@tagged('post_install', '-at_install')
|
|
class TestRackLoad(TransactionCase):
|
|
|
|
def test_equal_split_math(self):
|
|
"""Remainder goes to the first racks (spec D4)."""
|
|
Load = self.env['fp.rack.load']
|
|
self.assertEqual(Load._fp_equal_split(100, 1), [100])
|
|
self.assertEqual(Load._fp_equal_split(100, 2), [50, 50])
|
|
self.assertEqual(Load._fp_equal_split(100, 3), [34, 33, 33])
|
|
self.assertEqual(Load._fp_equal_split(100, 4), [25, 25, 25, 25])
|
|
self.assertEqual(Load._fp_equal_split(10, 3), [4, 3, 3])
|
|
self.assertEqual(Load._fp_equal_split(0, 3), [0, 0, 0])
|
|
self.assertEqual(Load._fp_equal_split(5, 0), [])
|
|
# sums always equal the total
|
|
self.assertEqual(sum(Load._fp_equal_split(97, 6)), 97)
|
|
|
|
def test_create_sequence_and_qty_total(self):
|
|
rack = self.env['fusion.plating.rack'].create({'name': 'RL-TEST-RACK'})
|
|
load = self.env['fp.rack.load'].create({'rack_id': rack.id})
|
|
self.assertTrue(load.name.startswith('RACKLOAD/'))
|
|
self.assertEqual(load.state, 'loading')
|
|
self.assertEqual(load.qty_total, 0)
|