- The button 'Receive Product' is highlighted and hidden after all the
products are received
- The draft state is name 'RFQ' and not 'Draft PO'
- Do not display 'Re-print RFQ' in state 'sent', as it is not always the case
When the PO is related to a contact of a company, the current behavior
is to add the contact in the list of suppliers of the product. However,
there is little chance that this is actually the desired behavior.
Indeed, in most of the cases, this will simply add a lot of useless
suppliers on a product.
The fix is to add the parent company of the contact in the list of
vendors, since `_select_seller` wil also search in the parent companies
to get a purchase price.
opw-672862
The price unit on the account move line is defined as a monetary field.
However, on a Sales Order or on a Purchase Order, the price unit is
defined as a float with precision 'Product Price'. Therefore, when an
invoice is generated from a SO or a PO, inconsistencies arise if the
product price precision is larger than the currency precision.
opw-673251
When a product is set up to generate a purchase tender instead of a
purchase order, the associated procurement is set in exception.
This is because the result of `make_po` is returned by the method `_run`,
and the result of `_run` is used to determine if the procurement is
running or in exception. Since a purchase tender does not generate the PO,
the method `make_po` returns an empty list, and therefore the procurement
is considered as in exception.
The fix is to return the procurement_id instead if a purchase order or a
purchase tender has been created.
opw-672170
Currently there is a selection field 'account_type' on the
account.analytic.account model with 2 values : Active or Archived
Let's use an active field instead and add a Archive stat button on the
form. That way, we can remove all the domain ('account_type','=','normal')
which are implicit with the generic active field behavior
Otherwise, when uninstalling the `purchase` module, this
menu is not deleted, while it should.
Besides, there is no reason to set `base.` to this xml_id:
It's not used by any other module.
opw-672130
The type of the related field purchase_id is many2one.
With the type the function _related_read in fields.py can convert
the record "purchase.order" in id.