Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions purchase_sale_inter_company/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ class ResCompany(models.Model):
default="raise",
help="Pick action to perform on sync picking failure",
)
sync_picking_state = fields.Boolean(
string="Sync the receipt state with the delivery state",
default=lambda p: p.sync_picking,
help="State of receipt picking syncs with state of the delivery "
"from the source company. Note this disallows user to manually "
"correct or change a picking that did not sync properly.",
)
block_po_manual_picking_validation = fields.Boolean(
string="Block manual validation of picking in the destination company",
)
Expand Down
3 changes: 3 additions & 0 deletions purchase_sale_inter_company/models/res_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class InterCompanyRulesConfig(models.TransientModel):
)
sync_picking_failure_action = fields.Selection(
related="company_id.sync_picking_failure_action",
)
sync_picking_state = fields.Boolean(
related="company_id.sync_picking_state",
readonly=False,
)
block_po_manual_picking_validation = fields.Boolean(
Expand Down
3 changes: 2 additions & 1 deletion purchase_sale_inter_company/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def _compute_state(self):
res = super()._compute_state()
for picking in self:
if (
picking.intercompany_picking_id
picking.company_id.sync_picking_state
and picking.intercompany_picking_id
and picking.picking_type_code == "incoming"
and picking.state not in ["done", "cancel"]
):
Expand Down
7 changes: 7 additions & 0 deletions purchase_sale_inter_company/views/res_config_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
class="oe_inline"
/>
<br />
<field name="sync_picking_state" class="oe_inline" />
<label
string="Sync picking state"
class="o_light_label"
for="sync_picking_state"
/>
<br />
<field
name="block_po_manual_picking_validation"
class="oe_inline"
Expand Down