Commit Graph
4288 Commits
Author SHA1 Message Date
Goffin Simon 4142d6ed8e [FIX] purchase: unlink PO
A PO must be in state cancel to be canceled.
Before the fix, it was possible to cancel a draft PO
then if a PO linked to a procurement was deleted with being
canceled, the procurement stayed in running state.

opw:666311
2016-01-12 16:28:01 +01:00
Denis Ledoux 0b9fbc67bb [FIX] purchase: prevent write on the related stock.location
`default_location_dest_id_usage` on `purchase.order` is
used only for an attrs domain on the field
`dest_address_id` in the purchase order form.

There is therefore no worries to set it as readonly,
it won't break the feature he has been added for.

Besides, this will prevent the useless write of the
same field value on the related `stock.location`
when saving the purchase order.

This is important to prevent the useless write
on `stock.location`, as users might have the rights
to create/edit purchase orders without having
the write access to the stock locations.

opw-660736
2016-01-07 10:29:49 +01:00
Nicolas Martinelli fcab79217a [FIX] purchase: link extra move to PO line
Commit ec949ad5 links the extra move to the Sale Order through the
procurement. To be consistent, we also have to link the extra move to
the Purchase Order.

The original issue is that any extra move is not taken into account in
the received quantity calculated.

opw-665398
2016-01-06 08:22:59 +01:00
Martin Trigaux 5ca043b86c [FIX] mail, purchase: forwardport
Missing parts, I only blame rerere
2016-01-06 08:11:45 +01:00
Martin Trigaux 8b4f052a38 [MERGE] Forwardport of branch saas-6 up to c649bb0df 2016-01-05 18:28:06 +01:00
Denis Ledoux 0f085db19e [MERGE] forward port of branch 8.0 up to a4e48d4 2016-01-04 12:36:14 +01:00
Alexis de Lattre a4e48d4c28 [FIX] product, purchase: pricelist of PO issued from procurements
When a purchase order is created through a procurement order,
the purchase order pricelist is taken from
the partner `property_product_pricelist_purchase`,
which is a property, which therefore can be different
according to the company. This is therefore
important to force the company to the procurement company
when browsing the partner, to get the correct pricelist,
from the right company. Otherwise, it take the pricelist
from the `SUPERUSER` company (when running the schedulers/cron),
which can be different than the procurement company.

The same as to be applied when browsing the product,
as the `standard_price` field (Cost Price) is a property
as well, and can be different according to the company,
in order to get the correct price unit on the purchase
order line, from the correct company.

Fixes #5329
Closes #5330
2016-01-04 11:35:23 +01:00
Odoo Translation Bot 8000181772 [I18N] Update translation terms from Transifex 2016-01-03 02:54:27 +01:00
Odoo Translation Bot 4dac9f2b73 [I18N] Update translation terms from Transifex 2016-01-03 01:24:45 +01:00
Martin Trigaux 955ed51687 [MERGE] Forwardport of branch 8.0 up to 6efc3712 2015-12-30 11:48:14 +01:00
Martin Trigaux ddeb90d46e [I18N] Update translation terms from Transifex 2015-12-29 17:40:57 +01:00
Odoo Translation Bot 8fe876cae7 [I18N] Update translation terms from Transifex 2015-12-27 02:54:48 +01:00
Odoo Translation Bot e6a92e523f [I18N] Update translation terms from Transifex 2015-12-27 01:25:25 +01:00
Martin Trigaux ef762f4335 [FIX] wrongly translated planners
breaking the rendering
2015-12-24 16:09:06 +01:00
Denis Ledoux 24eee9d7ba [FIX] purchase: confirm of purchase orders with kit boms
When using phantom/kit boms,
`action_confirm` on the move can lead to the move unlink,
as new moves with the different parts of the product have
been created.

See `_action_explode` in `mrp/stock.py`

The method `action_confirm` on `stock.move` returns the list
of remaining moves.

`force_assign` should therefore be performed on this new
moves list, returned by `action_confirm`, rather than
be performed on the moves list sent to `action_confirm`

opw-660722
2015-12-23 16:21:52 +01:00
Denis Ledoux aef8a4d618 [MERGE] forward port of branch 8.0 up to f9f7669 2015-12-21 18:24:22 +01:00
Odoo Translation Bot 0093372184 [I18N] Update translation terms from Transifex 2015-12-20 02:54:53 +01:00
Odoo Translation Bot 9e211ef127 [I18N] Update translation terms from Transifex 2015-12-20 01:26:02 +01:00
Danimar Ribeiro 1ac94db8e8 [FIX] context to map_tax
Missing context to map_tax calls
Fixes #9909
2015-12-15 16:10:16 +01:00
Goffin Simon cd5638ef46 [FIX] purchase: _default_picking_type
The function "_default_picking_type" must return a browse record.
2015-12-15 13:38:28 +01:00
Goffin Simon eb993b7f3b [FIX] purchase: supplier taxes in onchange_product_id
When adding a line in a PO with the SUPERUSER_ID all the record rules
didn't apply on him. Then all the supplier taxes set on the  product
were written in the PO line even if some of its were not in the company
of the user. Then with the SUPERUSER_ID, just the company taxes of this
user must be applied. Inspired from product_id_change in model
'sale.order.line'.

opw:659236
2015-12-14 12:15:12 +01:00
Odoo Translation Bot 63414bef54 [I18N] Update translation terms from Transifex 2015-12-13 02:56:20 +01:00
Odoo Translation Bot 5254e31a46 [I18N] Update translation terms from Transifex 2015-12-13 01:27:04 +01:00
qdp-odoo 2a89c926ec [FIX] analytic, addentum to commit f6d6762dc7: added some domains to filter out archived analytic accounts 2015-12-11 21:48:41 +01:00
Fabien Pinckaers 4c1224f5ec [IMP] Some features of product form should not be technical features (e.g. archive) 2015-12-11 20:40:20 +01:00
Nicolas Martinelli d23a1be96e [FIX] purchase: follow group_propagation_option
The propagation of procurement group is not applied when a procurement
generates a PO.

opw-659331
2015-12-11 18:35:30 +01:00
Daniel Dico d8e5cdec7d [FIX] fix various Lucida misspellings
closes #9997
2015-12-10 09:55:22 +01:00
Thibault Delavallée da2b88bbbe [FIX] sale and others: email_from of templates 2015-12-09 09:59:04 +01:00
Christophe Simonis 12d799623c [MERGE] forward port of branch 8.0 up to 83a4a58 2015-12-08 13:03:08 +01:00
Odoo Translation Bot 0de99dd2c8 [I18N] Update translation terms from Transifex 2015-12-06 02:56:34 +01:00
Odoo Translation Bot 8e7417ffa6 [I18N] Update translation terms from Transifex 2015-12-06 01:28:23 +01:00
Martin Trigaux 44eeb387d3 [FIX] purchase: updating existing PO should keep origin
When a make to order product is sold, a purchase order is created or added to an
existing one. In the second case, the origin of the sale order was lost.
It is now added to the existing source.

opw 656688
2015-12-01 15:23:46 +01:00
Odoo Translation Bot b8dfa91613 [I18N] Update translation terms from Transifex 2015-11-29 02:58:05 +01:00
Nicolas Martinelli 83181547f9 [FIX] purchase: stop when PO line found
If a PO line matching the procurement is found, stop the loop. This
would be an issue if more than one line match the criteria.
2015-11-27 12:47:13 +01:00
Nicolas Martinelli 53cb608b17 [FIX] purchase: missing string
Even if the field is used for technical purpose only, it is still better
to define a string for the translation.
2015-11-26 15:46:37 +01:00
Nicolas Martinelli 86015ac1c5 [FIX] purchase: add missing drop ship address
The drop ship address was missing from the view, making impossible to
specify the address where the products needed to be delivered.

The fix adds the missing field to the view, and make it visible (and
required) if the delivery must be done at a customer location.

opw-657054
2015-11-26 15:16:59 +01:00
Martin Trigaux e8e5405d0c [I18N] Update French translation terms from Transifex
Fixes #9712
2015-11-25 17:22:26 +01:00
Nicolas Martinelli 4d8ddabe63 [FIX] purchase: keep track of all procurements
Keep track of all the procurements in the field "Source Document" of the
PO.

opw-654424
2015-11-25 16:10:40 +01:00
Nicolas Martinelli 40a7c177e7 [FIX] purchase: select suppliers of variant
When a PO is created from a procurement, the field product_id of the
supplierinfo is not taken into account when the possible vendors are
chosen. For example, let's take the following situation:
- A product with 2 variants (color White and Black), route MTO
- Two vendors are created, one for color white, the other for color
  black
- When a SO containing the 2 variants is created, only one PO for the
  same vendor is created for both products.

With this fix, 2 POs will be created, linking the appropriate vendor and
variant.

opw-657362
2015-11-24 15:42:22 +01:00
Nicolas Martinelli 3d864c14d8 [FIX] purchase: product name and reference
The product name and reference of the supplier should be used for a PO
line generated automatically.

opw-653848
2015-11-24 08:40:43 +01:00
Nicolas Martinelli e6a82e539b [FIX] purchase: suggest quantity only if product change
The suggestion of the new quantity is now working correctly every time
the product is changed. Some code cleaning as well.
2015-11-23 08:51:39 +01:00
Odoo Translation Bot 3180f80bf9 [I18N] Update translation terms from Transifex 2015-11-22 01:30:36 +01:00
Nicolas Martinelli 902c1bf085 [IMP] purchase: split onchange_product_id
This commit splits the changes which affect the product_id and the
changes which affect the product quantity. The main reason is that a
product change should trigger the recalculation of the price unit,
while a change in the quantity should not trigger product-specific data
recalculation (such as the name or the taxes).

The original issue was the following:
- set a supplier for a product with a minimum quantity larger than 1.0
- create a PO for this supplier and this product: since the minimum
  quantity is not met, no tax is set on the line.
- change the quantity to the minimum quantity of the supplier
- the tax is set on the line, but a warning pop up confuses the user by
  asking if it is necessary to discard the line since Odoo and the user
  changed the same line.

This commit prevents this warning, and moreover it will set the taxes on
the product right away.

Bonus: if you change the product of an existing line, it will not keep
the privious quantity/price values, which was the case before.

opw-656729
2015-11-20 13:55:04 +01:00
Nicolas Martinelli d38f916cd8 [IMP] purchase, product: suggest minimum quantity for vendor
This commit introduces the suggestion of a minimum quantity for the
chosen vendor. The minimum quantity is suggested only if the quantity on
the line is zero. It still allows the user to set a quantity smaller
than the minimum quantity for the given vendor.

opw-654300
2015-11-20 13:55:04 +01:00
Nicolas Martinelli b528afe299 [FIX] purchase: correction of correction of wrong portage
Really fixes #9252
2015-11-19 14:42:49 +01:00
Nicolas Martinelli d28865fba4 [FIX] purchase: convert to invoice currency
When a PO is imported, convert the prices in the currency of the
invoice. Moreover, an onchange on the currency will recalculate the
prices if necessary.

opw-656762
2015-11-19 14:42:49 +01:00
Nicolas Martinelli b2a30a1747 [FIX] purchase: delivered quantity
The field `product_qty` contains the normalized quantity, while
`product_uom_qty` contains the actual requested quantity in the UoM of
the PO line.

opw-654318
2015-11-19 13:21:52 +01:00
Nicolas Martinelli b53ff53cdb [FIX] purchase: do not create stock move for services
If a PO containing services contains at least one stockable/consumable
product, stock moves are generated for these services, which is not
correct.
2015-11-19 12:08:43 +01:00
Nicolas Martinelli d40a548ac8 [FIX] purchase: prevent traceback
message_post should only be called with a singleton.
2015-11-18 08:08:42 +01:00
Nicolas Martinelli b098ab1f93 [FIX] purchase: unit price
The seller price is expressed in the seller UoM. If the UoM of the PO
line is different from the seller UoM, it must be recalculated.

opw-654417
2015-11-18 08:08:42 +01:00