Commit graph

25 commits

Author SHA1 Message Date
Marc Durepos
4840d9ac9e delivery_carrier_partner_account: fix and refactoring
- Fix: partners can no longer have default carrier accounts that are
archived.
- Refactor: remove write/create overrides to replace them with
  computed/stored fields.
2025-07-03 07:18:05 -04:00
Marc Durepos
8561aeca57 delivery_carrier_partner_account: transfer carrier account to delivery order on SO confirmation 2025-07-03 07:18:05 -04:00
Marc Durepos
6fa8068be5 [FIX] delivery_carrier_partner_account - failing collect SO
Fixes a bug where sale orders with a partner_shipping_id not within the
same commercial entity as their partner_id could not have collect
carrier accounts set after being confirmed.

The issue stemmed from the fact that the sale order's recipient_id field
was being set to partner_id, while the created delivery order had
recipient_id set to its partner_id, which is the partner_shipping_id of
the sale order. In other words, the sale order recipient was incorrectly
set to the main partner instead of the shipping address.

This commit adds a test that was previously failing in this scenario. It
also properly sets the recipient_id on the transport selection wizard
and on sale orders themselves, fixing the issue.
2025-07-03 07:18:05 -04:00
Marc Durepos
c08f4779d8 debugging carrier account issue with logging 2025-07-03 07:18:05 -04:00
Marc Durepos
31892a892a attempt fix to delivery carrier account - selecting collect account raising error 2025-07-03 07:18:05 -04:00
Marc Durepos
1da36c1e1c attempt fix to delivery carrier account - selecting collect account raising error 2025-07-03 07:18:05 -04:00
Marc Durepos
b627b1f57c new module sale_mandatory_customer_reference and small fix to delivery_carrier_partner_account 2025-07-03 07:18:05 -04:00
Marc Durepos
3c9835270e Fix to delivery_carrier_partner_account + test to validate 2025-07-03 07:18:05 -04:00
Marc Durepos
852c0723b9 fix a dependency issue for customer carrier accounts 2025-07-03 07:18:05 -04:00
Marc Durepos
4a778d7d81 remove debug logging for delivery_carrier_partner_account 2025-07-03 07:18:05 -04:00
Marc Durepos
4563b8b8b1 Significant rework of delivery_carrier_account.
carrier_id, carrier_account_id and delivery_billing_mode fields are all computed and have a single inverse method that can be overriden by subclasses.
2025-07-03 07:18:05 -04:00
xtremxpert
f45cd3a633 fix for _ help 2025-07-03 07:18:05 -04:00
Marc Durepos
a7eb187202 changes to delivery_carrier_partner_account 2025-07-03 07:18:05 -04:00
Marc Durepos
f4c6d0c21e Add better carrier linking for purchasing
delivery_carrier_partner_account and purchase_delivery_carrier
2025-07-03 07:18:05 -04:00
Marc Durepos
bcd92d5039 purchase_delivery_carrier: integrate with delivery_carrier_partner_account 2025-07-03 07:18:05 -04:00
Marc Durepos
c8e492b481 delivery_carrier_partner_account: added some test cases and fixed some bugs relating default accounts 2025-07-03 07:18:05 -04:00
Marc Durepos
6e61c065a5 make sure carrier_account_ids is set before indexing at 0 2025-07-03 07:18:05 -04:00
Marc Durepos
a273cde7ba delivery_carrier_partner_account: make default the first account added to a partner 2025-07-03 07:18:05 -04:00
Marc Durepos
c8bbeac919 [ENH] delivery_carrier_partner_account: Add ppc billing mode.
Adds a Prepaid & Charge billing mode to carrier.account.mixin and
overrides the stock.picking method that sets the shipping cost on sales
orders after shipping. This modifies the behaviour of "invoicing policy"
on delivery.carrier when a delivery billing mode is selected on the SO
or picking.
2024-11-21 16:36:48 -05:00
Marc Durepos
a365609f21 [ENH] delivery_carrier_partner_account: add delivery info to sale line
When adding transport charges to a sale order via the "Add Shipping"
button, the line's description now contains the delivery billing mode
and account number when applicable.

Fixes #112
2024-11-21 15:41:45 -05:00
Marc Durepos
15aee61953 [ENH] delivery_carrier_partner_account: add active field to accounts
Fixes #111
2024-11-21 14:40:26 -05:00
Marc Durepos
01c424c485 [ENH] delivery_carrier_partner_account: company_id + view all from menu
Add the ability to view all the transporter accounts from the sales
configuration menu.

Add company_id to delivery.carrier.account model as a related field
to delivery.carrier. Also constrain the delivery.carrier and res.partner
associated to an account to be linked to the same company.

Fixes #113
2024-11-21 14:39:20 -05:00
Marc Durepos
9b882ec7f8 delivery_carrier_partner_account: add choose delivery wizard code and tests 2024-11-20 13:13:57 -05:00
Marc Durepos
d99acaa3ec delivery_carrier_partner_account: added views and action 2024-11-20 11:17:35 -05:00
Marc Durepos
34ec1a8230 new module delivery_carrier_partner_account started 2024-11-20 09:15:59 -05:00