changes
This commit is contained in:
@@ -16,6 +16,21 @@ class ResPartner(models.Model):
|
||||
string='Parts',
|
||||
compute='_compute_part_count',
|
||||
)
|
||||
# Default lead-time band for new Express Orders. Set once per
|
||||
# customer in their Plating profile; auto-copies onto every new
|
||||
# Express Order via the partner-onchange on fp.direct.order.wizard.
|
||||
x_fc_default_lead_time_min_days = fields.Integer(
|
||||
string='Default Lead Time Min (days)',
|
||||
default=0,
|
||||
help='Pre-fills the Lead Time Min field on new Express Orders '
|
||||
'for this customer. Operator can override per-order.',
|
||||
)
|
||||
x_fc_default_lead_time_max_days = fields.Integer(
|
||||
string='Default Lead Time Max (days)',
|
||||
default=0,
|
||||
help='Pre-fills the Lead Time Max field on new Express Orders '
|
||||
'for this customer. Operator can override per-order.',
|
||||
)
|
||||
|
||||
def _compute_part_count(self):
|
||||
for partner in self:
|
||||
|
||||
@@ -165,6 +165,31 @@
|
||||
.o_fp_xpr_cell.span-2 { grid-column: span 2; }
|
||||
.o_fp_xpr_cell.row-span-2 { grid-row: span 2; }
|
||||
.o_fp_xpr_cell.row-span-4 { grid-row: span 4; }
|
||||
.o_fp_xpr_cell.row-span-6 { grid-row: span 6; }
|
||||
|
||||
// Cells with a toggle-style field — label sits inline with the
|
||||
// toggle instead of stacked above. Used by Blanket Sales Order
|
||||
// (matches the mockup's compact toggle row). Toggle anchored
|
||||
// next to the label so layout doesn't shift when the secondary
|
||||
// "Block partial" toggle appears.
|
||||
.o_fp_xpr_cell.o_fp_xpr_inline_label {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 32px;
|
||||
|
||||
> label {
|
||||
margin-bottom: 0;
|
||||
white-space: nowrap;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
> .o_fp_xpr_inline_pair {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
.o_fp_xpr_cell.required > label::after {
|
||||
content: " *";
|
||||
color: $xpr-bad;
|
||||
|
||||
@@ -488,6 +488,15 @@ class FpDirectOrderWizard(models.Model):
|
||||
self.deposit_percent = partner.x_fc_default_deposit_percent
|
||||
if partner.x_fc_default_delivery_method:
|
||||
self.delivery_method = partner.x_fc_default_delivery_method
|
||||
# Lead-time default band — set once per customer in their
|
||||
# Plating profile, auto-copies onto every new Express Order.
|
||||
# Only fills when the operator hasn't already typed a value.
|
||||
if (partner.x_fc_default_lead_time_min_days
|
||||
and not self.lead_time_min_days):
|
||||
self.lead_time_min_days = partner.x_fc_default_lead_time_min_days
|
||||
if (partner.x_fc_default_lead_time_max_days
|
||||
and not self.lead_time_max_days):
|
||||
self.lead_time_max_days = partner.x_fc_default_lead_time_max_days
|
||||
|
||||
# Deadline auto-fill — anchored to planned_start_date with today
|
||||
# as fallback. Honours explicit deadlines the user already typed.
|
||||
|
||||
Reference in New Issue
Block a user