Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] rma_purchase #560

Open
wants to merge 69 commits into
base: 18.0
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
8e1afc9
init branch
JordiBForgeFlow Jul 27, 2017
ff9057b
[9.0][FIX] rma:
LoisRForgeFlow Aug 2, 2017
c6e1f68
[IMP] default operation in product and product_categ for customer and…
AaronHForgeFlow Aug 16, 2017
9f61036
[9.0][IMP] rma_purchase:
LoisRForgeFlow Aug 25, 2017
4a63f01
[9.0][REW] rma_purchase: adapt
LoisRForgeFlow Oct 18, 2017
11e82e2
[9.0][IMP] rma: add constrains
LoisRForgeFlow Oct 19, 2017
645a32c
[9.0][FIX] wizards need to specify partner.
LoisRForgeFlow Oct 19, 2017
6b382a6
[9.0][IMP] rma_purchase: allow to search by order reference
LoisRForgeFlow Nov 8, 2017
9c3c92d
[FIX] allow child partners too
LoisRForgeFlow Nov 13, 2017
6a211dd
[9.0][IMP] rma: add link to source SO and PO
LoisRForgeFlow Nov 13, 2017
4cf66b6
[MIG]rma_purchase v10
AaronHForgeFlow Dec 20, 2017
5f1f151
[IMP] Improved Unit Test Case and Fixed Travis
nikul-serpentcs Nov 10, 2017
faa061c
[FIX]various fixes
AaronHForgeFlow Jan 2, 2018
9a8b648
[MIG] Migrated UT & Fixed Travis
nikul-serpentcs Jan 5, 2018
29b5b5a
[MIG] Migrate configuration and cleanup
max3903 Feb 9, 2018
ba03171
[11.0] MIG: rma_purchase
Feb 9, 2018
dd82feb
[FIX] Add read access to purchase order and po line
max3903 Jun 26, 2018
8ebf688
[FIX] TypeError: unhashable type: 'list'
Jul 19, 2018
c610bfd
Revert "[FIX] TypeError: unhashable type: 'list'"
Jul 19, 2018
658851c
[IMP]name get when filling form purchase order lines
AaronHForgeFlow May 25, 2018
da71201
[9.0] rma_purchase: add purchase_policy
LoisRForgeFlow May 25, 2018
2353745
[IMP] code
Jul 20, 2018
ccaf879
[IMP] rma_operation
Jul 20, 2018
0184818
Revert "[IMP] code"
Jul 22, 2018
e07f156
Revert "[IMP] rma_operation"
Jul 22, 2018
94d4f1a
[MIG] Purchase policy
Jul 22, 2018
b3908d3
[RM] ValidationError message if there is no purchase order found
Jul 26, 2018
36a9076
[FIX] flake8
Jul 26, 2018
0c51a1e
[FIX] issue of name_get purchase order line id
Jul 27, 2018
4f05e89
[IMP]create PO from wizard
AaronHForgeFlow Jul 27, 2018
46b3e74
[IMP]include action to see PO generated from the RMA
AaronHForgeFlow Jul 27, 2018
9404f88
[ENH] change from customer to supplier domain and lable in Purchase w…
Jul 27, 2018
dda4c15
[ENH] make supplier readonly in Create Purchase Order wizard
Jul 27, 2018
4f7939b
[9.0][REW] rma_purchase: complete rework of tests
LoisRForgeFlow May 17, 2018
1f823ca
[FIX]currency_id was not filled
AaronHForgeFlow Oct 4, 2018
3a92f06
[WIP][MIG][12.0] rma_purchase
murtuzasaleh Mar 20, 2019
7675324
[SET] Correct website URL for RMA modules
May 24, 2019
37016a4
[FIX]remove autoinstall for rma_account, rma_sale and rma_purchase mo…
AaronHForgeFlow Oct 29, 2019
df71f98
[FIX] action returned when creating purchase orders from rma
AaronHForgeFlow Nov 29, 2019
7a33e59
[FIX] default_gets: avoid using shadowname 'fields'
MiquelRForgeFlow Nov 29, 2019
69e532d
[IMP] rma_purchase: black, isort, prettier
MateuGForgeFlow Dec 22, 2020
2793b11
[MIG] rma_purchase: Migration to 14.0
MateuGForgeFlow Dec 23, 2020
54b1259
[IMP] rma_purchase: adapt to simplification on rma.line form view.
LoisRForgeFlow Mar 26, 2021
ce9608a
[14.0][MIG] rma*: ir.actions.act_window has different access
LoisRForgeFlow Apr 16, 2021
98eae6a
Fix Pre-commit Websites
MateuGForgeFlow Oct 6, 2021
1413845
[MIG] rma_purchase: Migration to 15.0
JasminSForgeFlow Jan 7, 2022
23353f3
[IMP] COPIER UPDATE: black, isort, prettier
AaronHForgeFlow Apr 22, 2022
e769004
[IMP] rma: Refactor all rma modules in order to consider using the co…
JordiBForgeFlow Mar 2, 2022
5508ca1
[15.0][IMP] Tests for stock valuation
AaronHForgeFlow Mar 4, 2022
4b1e029
[15.0][FIX] rma_purchase: fixup of procurement
DavidJForgeFlow Jul 11, 2022
4289ce1
[FIX] rma_purchase: fix author in manifest
LoisRForgeFlow Nov 7, 2022
b166f76
[IMP] fp-303: add changes from 14.0
Nov 8, 2022
444da13
[FIX] include anglo-saxon price unit calculation in refunds.
JordiBForgeFlow Nov 21, 2022
ad71381
[IMP] centralize the logic to get the correct cost of the RMA.
JordiBForgeFlow Nov 23, 2022
0029329
[IMP] calculate refund unit price
JordiBForgeFlow Nov 29, 2022
4924254
[FIX] rma_purchase: Reconcile the interim accounts when vendor bill i…
JordiBForgeFlow Nov 29, 2022
29d1969
[FIX] rma_purchase: `purchase_line_id` filled with wrong model.
LoisRForgeFlow Dec 27, 2022
2e321e0
[FIX] rma_purchase: Ensure that configuration on the operation is app…
LoisRForgeFlow Dec 28, 2022
8f2fffe
[IMP] rma_purchase: copy group description to rma lines
LoisRForgeFlow Jan 2, 2023
550c245
[IMP] rma_purchase: button cancel
DavidJForgeFlow Feb 15, 2023
51f302d
[MIG] rma_purchase: Migration to 16.0
DavidJForgeFlow Feb 23, 2023
bfc8233
[IMP] rma_purchase: black, isort, prettier
AaronHForgeFlow May 6, 2024
ef3c219
[MIG] rma_purchase: Migration to v17
CarlosVForgeFlow May 6, 2024
48260da
[FIX] rma_purchase: name_search migration
AaronHForgeFlow May 7, 2024
d77729f
[FIX] rma_purchase: tests not fetching refund_line_ids correctly
AaronHForgeFlow May 8, 2024
76dd218
[IMP] rma_purchase: add test return_and_refund_diff_price
mariadforgeflow Feb 27, 2023
747c294
[FIX] rma_purchase: write-off differences in price between rma line a…
mariadforgeflow Feb 27, 2023
cb13734
[FIX] rma_purchase: add dependency with purchase_stock
JordiBForgeFlow May 22, 2024
4b65987
[MIG] rma_purchase: Migration to 18.0
JasminSForgeFlow Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[FIX] include anglo-saxon price unit calculation in refunds.
Otherwise the anglo saxon entries won't be correct.
For example, the Interim (Delivered) account should balance
after receiving and triggering a refund on a customer rma.
  • Loading branch information
JordiBForgeFlow authored and JasminSForgeFlow committed Nov 28, 2024
commit 444da13e866be5e2bac1df124211b1ed53080410
42 changes: 21 additions & 21 deletions rma_purchase/tests/test_rma_stock_account_purchase.py
Original file line number Diff line number Diff line change
@@ -14,50 +14,50 @@ def setUpClass(cls):
super(TestRmaStockAccountPurchase, cls).setUpClass()
cls.pol_model = cls.env["purchase.order.line"]
cls.po_model = cls.env["purchase.order"]

def test_01_cost_from_po_move(self):
"""
Test the price unit is taken from the cost of the stock move associated to
the PO
"""
# Create PO:
cls.product_fifo_1.standard_price = 1234
cls.po = cls.po_model.create(
self.product_fifo_1.standard_price = 1234
po = self.po_model.create(
{
"partner_id": cls.partner_id.id,
"partner_id": self.partner_id.id,
}
)
cls.pol_1 = cls.pol_model.create(
pol_1 = self.pol_model.create(
{
"name": cls.product_fifo_1.name,
"order_id": cls.po.id,
"product_id": cls.product_fifo_1.id,
"name": self.product_fifo_1.name,
"order_id": po.id,
"product_id": self.product_fifo_1.id,
"product_qty": 20.0,
"product_uom": cls.product_fifo_1.uom_id.id,
"product_uom": self.product_fifo_1.uom_id.id,
"price_unit": 100.0,
"date_planned": Datetime.now(),
}
)
cls.po.button_confirm()
cls._do_picking(cls.po.picking_ids)

def test_01_cost_from_po_move(self):
"""
Test the price unit is taken from the cost of the stock move associated to
the PO
"""
po.button_confirm()
self._do_picking(po.picking_ids)
self.product_fifo_1.standard_price = 1234 # this should not be taken
supplier_view = self.env.ref("rma_purchase.view_rma_line_form")
rma_line = Form(
self.rma_line.with_context(supplier=1).with_user(self.rma_basic_user),
view=supplier_view.id,
)
rma_line.partner_id = self.po.partner_id
rma_line.purchase_order_line_id = self.pol_1
rma_line.partner_id = po.partner_id
rma_line.purchase_order_line_id = pol_1
rma_line.price_unit = 4356
rma_line = rma_line.save()
rma_line.action_rma_to_approve()
picking = self._deliver_rma(rma_line)
# The price is not the standard price, is the value of the incoming layer
# of the PO
rma_move_value = picking.move_lines.stock_valuation_layer_ids.value
po_move_value = self.po.picking_ids.mapped(
"move_lines.stock_valuation_layer_ids"
)[-1].value
po_move_value = po.picking_ids.mapped("move_lines.stock_valuation_layer_ids")[
-1
].value
self.assertEqual(-rma_move_value, po_move_value)
# Test the accounts used
account_move = picking.move_lines.stock_valuation_layer_ids.account_move_id