Merge lp:~julie-w/unifield-server/US-4756 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4967
Proposed branch: lp:~julie-w/unifield-server/US-4756
Merge into: lp:unifield-server
Diff against target: 32 lines (+7/-7)
1 file modified
bin/addons/register_accounting/purchase.py (+7/-7)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-4756
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+349122@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/register_accounting/purchase.py'
2--- bin/addons/register_accounting/purchase.py 2017-11-27 15:38:38 +0000
3+++ bin/addons/register_accounting/purchase.py 2018-07-09 08:35:51 +0000
4@@ -52,13 +52,13 @@
5
6 To be 100% invoiced, a PO should have some linked invoiced that are validated ('open' state or 'paid' state) and that sum of amount is greater or equal to PO total amount. So to find PO that are not 100% invoiced, you should find those from which all invoice are not created or which amount is inferior to PO total amount.
7
8- BKLG-51: new filters
9- 1) On PO state: only allow "confirmed" or "confirmed (waiting)" POs to be selected in the wizard
10- (keeping 'done' for not completly invoiced)
11- 2) On PO type: only allow regular, purchase list and direct purchase order PO types
12+ BKLG-51 / US-3782: new filters
13+ 1) On PO LINE state: only allow PO having at least one line in Confirmed State, or Closed State if the related
14+ invoice is still in Draft state or Cancelled
15+ 2) On PO type: only allow regular and "purchase list" purchase order types
16 3) Make sure that RFQs or tenders can not be linked to down payments
17- 1) state 'confirm_waiting' + 'approved' + 'done' (done tolerated if partially invoiced)
18- 2) order_type 'regular', 'purchase_list', 'direct'
19+ 1) line state 'confirmed' + 'done' (done tolerated if invoice still in Draft state)
20+ 2) order_type 'regular', 'purchase_list'
21 3) rfq_ok != True
22
23 US-1064: new rule: as soon as all goods are received on a PO (state 'done') no new Down Payment is possible
24@@ -81,7 +81,7 @@
25 where pir.invoice_id = inv.id AND inv.state not in ('draft', 'cancel')
26 group by pir.purchase_id) inv on inv.purchase_id = po.id
27 LEFT JOIN product_pricelist as prod ON (po.pricelist_id = prod.id AND prod.currency_id = %s)
28- LEFT JOIN (select pol1.order_id, sum(pol1.price_unit * pol1.product_qty) as total
29+ INNER JOIN (select pol1.order_id, sum(pol1.price_unit * pol1.product_qty) as total
30 from purchase_order_line pol1
31 where pol1.state in ('confirmed', 'done') group by pol1.order_id) pol on pol.order_id=po.id
32 WHERE po.pricelist_id = prod.id

Subscribers

People subscribed via source and target branches