- Fix: partners can no longer have default carrier accounts that are
archived.
- Refactor: remove write/create overrides to replace them with
computed/stored fields.
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.
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.
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
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