Skip to content

Commit

Permalink
Merge PR #3377 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by JordiBForgeFlow
  • Loading branch information
OCA-git-bot committed Nov 5, 2024
2 parents a81e597 + bbab91a commit 06ba6d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sale_order_line_date/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

commitment_date = fields.Datetime("Delivery Date")
commitment_date = fields.Datetime("Delivery Date", copy=False)

def _prepare_procurement_values(self, group_id=False):
vals = super(SaleOrderLine, self)._prepare_procurement_values(group_id)
Expand Down
9 changes: 9 additions & 0 deletions sale_order_line_date/tests/test_sale_order_line_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,12 @@ def test_03_line_commitment_date_picking_propagation(self):
self._assert_equal_dates(
self.sale_line3.commitment_date, self.sale_line3.move_ids.date_deadline
)

def test_04_commitment_date_duplication(self):
"""
Test if commitment_date field is empty when duplicating a sale order line.
"""
self._assert_equal_dates(self.sale_line1.commitment_date, self.dt1)
duplicated_order = self.sale1.copy()
for duplicated_line in duplicated_order.order_line:
self.assertFalse(duplicated_line.commitment_date)

0 comments on commit 06ba6d0

Please sign in to comment.