Commit Graph

3898 Commits

Author SHA1 Message Date
Goffin Simon 75b9932451 [FIX] stock_account: VAT for extra moves
If an extra move contains a product which is not initially in the order,
the taxes set on this product must be considered according to the fiscal position
of this order.

opw:634305
2015-05-27 09:03:18 +02:00
Olivier Dony ebb5ddcd65 [I18N] Sync latest translations from Launchpad (not the final one) 2015-05-21 14:42:20 +02:00
Denis Ledoux 75aa699f62 [MERGE] forward port of branch saas-3 up to 6026c2f 2015-05-20 13:41:03 +02:00
Denis Ledoux 6026c2f4d0 [MERGE] forward port of branch 7.0 up to cc61d46 2015-05-20 13:39:39 +02:00
Goffin Simon cc61d467fa [FIX] purchase: validate invoice
A user that has the rights in Accounting & Finance equal to Invoicing & Payments
must have the right to validate a supplier invoice.

opw:634601
2015-05-19 14:14:07 +02:00
Christophe Simonis f722254018 [MERGE] forward port of branch saas-3 up to 0f5b6cf 2015-05-18 17:13:50 +02:00
Christophe Simonis 0f5b6cf60b [MERGE] forward port of branch 7.0 up to c435b84 2015-05-18 17:13:18 +02:00
Nicolas Martinelli 769fc81140 [FIX] stock_account: fix dependencies
Purchase and Sale are not part of the dependencies of stock_account, so purchase_line_id
and sale_line_id might not exist.

Fixes #6619
2015-05-13 12:51:18 +02:00
Denis Ledoux acd61f8f0e [FIX] purchase: deletion of PO lines in states other than approved/done
This is related to revision 65d7cc524d

The `order_line` field of `purchase.order` is readonly within states
aprroved, done. See the field definition. This means it should be
possible to remove lines of a `purchase.order` when the PO is in
any other state than approved or done.

Therefore, the deletion of lines shouldn't be prevented
when the PO is not in state approved or done

opw-634538
2015-05-13 11:42:09 +02:00
Denis Ledoux 73432ffe9f [FIX] *: accesses of views concernings specific groups
If the whole view relates to a specific group,
apply the group on the view itself instead of
each view part (each fields, each page, each div,...),
so the view is loaded / added to the base view
only if the user is in the right group.
So the view is not loaded uselessly
and the fields are not read for nothing
(performances & security).

Indeed, when a group is applied on a field itself, the field content
is read, but hidden, therefore reading the content of the field
uselessly, and potentially leading to accesses issues
if the user hasn't the rights to read the field.
(e.g. reading a property when not having access to the model
of the proprty, pricelists on partners for instance)

opw-634402
2015-05-12 11:33:43 +02:00
Nicolas Martinelli 610a461099 [FIX] purchase: update and cancel of purchase order line takes into account existing procurements
Update:
When an existing purchase order line is updated, for example if a new procurement was required,
we check if the sum of existing running linked procurements is larger than the quantity in the
purchase order. If it is the case, we update the quantity and the unit price accordingly.
Without this fix, we systematically add the procurement quantity (or the provider minimum quantity)
to the purchase order line, even if the sum of the procurements is smaller than the ordered
quantity.

Cancel:
When a procurement is cancelled, we recompute the unit price of the associated purchase order
according to the quantity and make sure the provider minimum quantity is met. If the required
quantity is zero, we cancel and unlink the purchase order line.

opw: 632175 and 632176
2015-05-07 11:19:28 +02:00
Goffin Simon 1062905acb [IMP] purchase: fiscal positions
Automatic detection of a fiscal position is now working for Purchase.

opw:631554
2015-04-28 11:05:03 +02:00
Olivier Dony 622e00baa5 [I18N] Sync 8.0 translations from Launchpad 2015-04-28 09:45:53 +02:00
Denis Ledoux cf4d14ce39 [MERGE] forward port of branch saas-3 up to 09b277c 2015-04-27 14:02:52 +02:00
Denis Ledoux d6ae7fb7db [MERGE] forward port of branch 7.0 up to 3e7d3c7 2015-04-27 12:19:43 +02:00
Martin Trigaux 316be12a3c [FIX] purchase: mark order as invoiced when fully invoiced only
Make sure the purchase order is marked as invoiced only when fully invoiced.
If the invoices are generated on delivery order (invoice_method picking), make
sure all products are delivered before setting it as invoiced.
opw 614256
2015-04-24 10:46:42 +02:00
Adil Houmadi f2ef46e9f4 [FIX] product: purchase report, correct warehouse
Fix stock warehouse column on purchase report,
we need to join stock_picking_type and stock_warehouse
in order to have the warehouse itself

Closes #6409
2015-04-23 13:23:40 +02:00
Nicolas Martinelli 4a7159ca78 [FIX] purchase: merge RFQ if same currency and merge order lines in appropriate RFQ
- RFQ of same currency are merged (fixes #5901 and opw: 632594)
- Merge order lines in the appropriate RFQ
2015-04-15 14:10:27 +02:00
moylop260 820d6aa760 [FIX] purchase: avoid duplicated product codes in demo/test data
Closes #5414
2015-04-07 10:17:16 +02:00
Martin Trigaux cbd396d3da [FIX] purchase: use order date to set the picking date
When creating a pickign from a purchase order, do not use the schedule date
('date_planned') to specify the creation date ('date') of a picking.
There is already field called Scheduled Date ('min_date') and Max Expected Date
('max_date') that can display this information, this is redundand.

Fixes #4352
2015-04-02 17:48:35 +02:00
Christophe Simonis 12f600cec9 [MERGE] forward port of branch 7.0 up to 35077af 2015-04-01 19:07:59 +02:00
Goffin Simon 79ac324ca1 [FIX] stock_account: Invoicing on incoming shipment
When an extra line is added on an incoming shipment, the resulting
invoice must consider the tax of the product.

opw:630758, 630778
2015-04-01 09:28:48 +02:00
Martin Trigaux 23918ae97d [FIX] purchase: remove duplicated filter
Same name, same domain, different string...
opw 597964
2015-03-31 12:08:55 +02:00
Nicolas Martinelli 34c891a426 [FIX] purchase: set the unit price to zero if requested in the purchase order
If a purchase order is created with free goods (e.g. 5 units offered if 100 are purchased),
the price_unit of stock.move and the cost of stock.quant were set to the product cost price
instead of zero. This would lead to inconsistencies in the 'Current Inventory Valuation'.

opw: 630593
2015-03-27 13:31:03 +01:00
Josse Colpaert 20312e2880 [IMP] Deleting PO lines should work the same way as Cancelling PO
Also the test is adapted.  When a product as treated as MTO, it should not
without notice change to an MTS.
2015-03-13 13:58:19 +01:00
Denis Ledoux 8eb62ca282 [FIX] purchase: invoice control on purchase order lines menu.
Only display purchase orders having as invoice control method
'on purchase order lines'.

opw-630016
2015-03-12 17:55:24 +01:00
Christophe Simonis c0496ed03a [MERGE] forward port of branch saas-3 up to f8a9405 2015-03-10 18:00:43 +01:00
Christophe Simonis f8a94057e5 [MERGE] forward port of branch 7.0 up to a5e3269 2015-03-10 17:51:16 +01:00
David Monjoie 6758b4cfc5 [FIX][REF] purchase: prevent confirming order if no stockable item
After discussing with jco, we decided to keep it simple and have a coherent behavior between different versions, we then changed the behavior from the one of jbefficient PR at 92adf673f7.
2015-03-10 14:22:32 +01:00
Christophe Simonis 416f0246ac [MERGE] forward port of branch saas-3 up to 4a3c471 2015-03-09 12:03:22 +01:00
Christophe Simonis 4a3c4713e9 [MERGE] forward port of branch 7.0 up to 209ce6f 2015-03-09 11:24:32 +01:00
Josse Colpaert 872a80c419 [IMP] Stock: Not only service products can be invoiced after shipment, but also lines without product
Purchase lines or sale order lines without product should have the same behaviour
when invoicing based on shipments as those with services
2015-03-05 18:09:11 +01:00
jbeficent a81a7513b2 [FIX] purchase: prevent user to confirm a purchase order when there is a service product in it and invoicing is based on incoming shipments
Fix for issue 3492 and opw 628377
2015-03-04 11:37:54 +01:00
Goffin Simon 1155099d2b [FIX] purchase: wrong currency printed on purchase order
Choosing a currency different than the purchase order pricelist is allowed.
Therefore, the purchase order report must display the currency
of the purchase order, and not the currency of the pricelist.

opw:628767
Fixes #5443
2015-03-03 16:54:53 +01:00
Goffin Simon 631d2f7146 [FIX] purchase: pricelist and related currency mismatch on purchase order (Bid received).
pricelist must be readonly when currency is readonly because there 's an onchange on currency which depends
on the pricelist.

opw:627009
Fixed #4598
2015-03-02 08:44:45 +01:00
Josse Colpaert d416492259 [IMP] To determine the invoice we put extra moves in, it is better to take the values from the sale order / purchase order if we can find it through the picking
[IMP] Add comments

[IMP] Simplify code
2015-02-25 10:30:36 +01:00
Josse Colpaert cb6e27c992 [IMP] When invoicing from multiple pickings, services should be checked for all purchases/sales
[FIX] Should make sure purchase order lines are not invoiced twice
2015-02-25 10:29:50 +01:00
Olivier Dony 91d4b947f6 [I18N] Update translations from Launchpad 8.0 branches 2015-02-18 11:51:07 +01:00
Denis Ledoux 31527c9a36 [MERGE] forward port of branch saas-3 up to 4c7e078 2015-02-17 11:10:10 +01:00
Denis Ledoux 550910a8f6 [MERGE] forward port of branch 7.0 up to a87d60f 2015-02-16 18:26:45 +01:00
Denis Ledoux 30d3f9605f [FIX] purchase: order line description being reset on qty change
Also set name as False for product_id field in the purchase order line form (popup)
This rev. is related to 11bd7a6774
2015-02-16 15:04:22 +01:00
Denis Ledoux 11bd7a6774 [FIX] purchase: order line description being reset on qty change
The name must be changed when changing of product,
but not for other changes, quantity for instance.
The 'or not uom_id' is just for retro-compatibility concerns
uom_id being False actually means we just changed of product,
and the name must therefore be changed
name as been set as False in the onchange call in the view
for the product_id field, in this rev.,
so the name being False now means th change of product
Nevertheless, existing databases for which the view
is not up to date won't have this change
and we therefore have to rely on something else to know
when the product has been changed or not.

fixes #5295
opw-628138
2015-02-16 14:22:15 +01:00
Martin Trigaux 20e3f33ebd [FIX] purchase: get supplier from the procurement company
The seller_id field is a related that is read administrator so it would fetch
the first line, whatever the company specified.
Setting related_sudo=False would not be enough as creating purchase orders
through the scheduler makes the computation done as administrator.
Use the company of the procurement (required) to search for a supplier.
If no result, fallback on the first one as before.

Fixes #3833, opw 618809
2015-02-13 15:07:45 +05:30
Alexandre Fayolle 0e1deed63b [FIX] purchase: typo in commit 675357b + add coverage test
Closes #5193
2015-02-10 14:51:18 +01:00
Adrien Peiffer (ACSONE) 675357b7d7 [FIX] purchase: propagate analytic accounts when invoicing on incoming shipments
Closes #5127
2015-02-09 16:31:19 +01:00
Goffin Simon 835065531c [FIX] purchase: wrong positioning of vat
opw:626089
2015-01-29 16:31:34 +01:00
Denis Ledoux 0b18a5afec [FIX] purchase: purchases button on product variants
This rev. is related to 8381d47543

The action action_purchase_line_product_tree is used in both
product templates and product variants forms.
Therefore, the default_product_id: active_id in the context
cannot be used,
As sometimes it will active_id will be a product template,
sometimes it will be a product variant.

I believe two different window actions should be used,
instead of sharing a common one and making hacks.
Nevertheless, as we avoid taking risks in stable releases
This should be done in master.
2015-01-27 10:37:49 +01:00
Denis Ledoux 8381d47543 [FIX] purchase: purchases button on product templates
The purchases button on product templates open the purchase orders
that have at least one of the variants of the templates

Set in the context of the action button action_purchase_line_product_tree
'search_default_product_id': active_id, 'default_product_id': active_id
as no point, as default_product_id expects a variant id (product.product)
while active_id is a template id (product.template).

opw-626521
2015-01-27 10:21:25 +01:00
Olivier Dony 8e03852fd4 [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
Aaron Bohy 3cae676619 [FIX] Use local copies of png instead of fetching them from websites
Debian does not allow fetching data from external website at runtime.
This fixes the privacy-breach-generic lintian warnings for Debian packaging.
The removed youtube url was a dead link...
2015-01-23 11:23:04 +01:00