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

[14.0][BPRT] edi_sale_ubl_oca #24

Open
wants to merge 91 commits into
base: 14.0
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
7a12d78
Add edi_sale_oca
simahawk Aug 2, 2022
4ee531f
edi_sale: take over edi_sale_order_import
simahawk Aug 14, 2022
d86e9a2
edi_sale: filter/group by origin
simahawk Sep 2, 2022
e55c2f8
edi_sale: handle ext ref for sol
simahawk Sep 14, 2022
7111831
edi_sale: show edi_id
simahawk May 15, 2023
8053611
edi_sale: store metadata
simahawk May 18, 2023
b502b3f
edi_sale: clean file and drop *type_auto dependency
simahawk May 19, 2023
e07c9cc
edi_sale: add process hook for order create
simahawk May 19, 2023
24ec539
edi_sale: process propagate edi origin
simahawk May 19, 2023
482b148
edi_sale: add edi_exchange_ready
simahawk May 23, 2023
9a86b11
edi_sale: fix edi disable flag
simahawk May 26, 2023
da06fa3
edi_sale: fix _edi_exchange_ready for qty=0
simahawk Jul 6, 2023
f6f078e
edi_sale: move OrderMixin from edi_sale_ubl
simahawk Aug 7, 2023
48a81f0
edi_sale: fix test_process
simahawk Aug 7, 2023
35ec71e
edi_sale: propagate origin on lines
simahawk Aug 7, 2023
b1f710e
[MIG] edi_sale_oca: Migration to 16.0
Oct 18, 2023
c203284
[IMP] edi_sale_oca: Support edi_id for edi_sale_edifact_oca
Oct 18, 2023
48c754b
[IMP] edi_sale_oca: Refactor code for passing all configurations via …
Oct 26, 2023
01469d8
[UPD] Update edi_sale_oca.pot
Nov 21, 2023
fd73801
[BOT] post-merge updates
OCA-git-bot Nov 21, 2023
d61c20d
[IMP] edi_oca: add partner form page
Jan 10, 2024
ccac2c9
[UPD] Update edi_sale_oca.pot
Jan 15, 2024
c24da23
[BOT] post-merge updates
OCA-git-bot Jan 15, 2024
9f86a3f
[FIX] edi_sale_oca: fix test
Jan 22, 2024
efbc5cd
[UPD] Update edi_sale_oca.pot
Jan 31, 2024
25bf865
[BOT] post-merge updates
OCA-git-bot Jan 31, 2024
4956da6
[UPD] Update edi_sale_oca.pot
Feb 4, 2024
1195ead
Added translation using Weblate (Italian)
mymage May 13, 2024
bd3e057
[BPRT] edi_sale_oca: Backport from v16.0
thienvh332 Jun 27, 2024
d4dd854
[IMP] edi_sale_oca: add partner form page
thienvh332 Jul 4, 2024
1bddcdf
[FIX] account_invoice_import_simple_pdf: version extraction for fitz/…
alexis-via Aug 1, 2024
a5c733c
[FIX] account_invoice_import_simple_pdf: add seek(0) to avoid error "…
alexis-via Aug 1, 2024
f443247
[FIX] pdf_helper: fix issue pypdf 5.0 dropped support for python<=3.7
thienvh332 Sep 18, 2024
6366caf
[FIX] account_invoice_download: don't set default_name in context
alexis-via Sep 23, 2024
f7cae2f
Merge PR #1041 into 14.0
OCA-git-bot Sep 23, 2024
b44373a
[BOT] post-merge updates
OCA-git-bot Sep 23, 2024
bb4fe31
Merge PR #1018 into 14.0
OCA-git-bot Sep 24, 2024
f00132b
[BOT] post-merge updates
OCA-git-bot Sep 24, 2024
c93b5fc
[FIX] pypdf version for tests
alexis-via Sep 29, 2024
b79a2b3
Merge PR #1043 into 14.0
OCA-git-bot Sep 29, 2024
94addaf
[BOT] post-merge updates
OCA-git-bot Sep 29, 2024
5e459c0
Merge PR #1023 into 14.0
OCA-git-bot Nov 14, 2024
6c64ab5
[UPD] Update edi_oca.pot
Nov 14, 2024
173ae79
[UPD] Update edi_sale_oca.pot
Nov 14, 2024
222e606
[BOT] post-merge updates
OCA-git-bot Nov 14, 2024
e2ebcb1
Update translation files
weblate Nov 14, 2024
00825b4
Add edi_sale_endpoint
simahawk May 29, 2023
409f40a
edi_sale_order_import: deprecate
simahawk Aug 14, 2022
95f7266
Update translation files
weblate Nov 14, 2024
eb27a4d
Merge PR #1066 into 14.0
OCA-git-bot Nov 14, 2024
039ec9b
[UPD] Update edi_sale_order_import.pot
Nov 14, 2024
2f1d449
[BOT] post-merge updates
OCA-git-bot Nov 14, 2024
6cb125f
Update translation files
weblate Nov 14, 2024
c70c569
Merge PR #1022 into 14.0
OCA-git-bot Nov 14, 2024
4e3f5ea
[UPD] Update edi_sale_endpoint.pot
Nov 14, 2024
acb4d94
[BOT] post-merge updates
OCA-git-bot Nov 14, 2024
29f1353
Add edi_sale_ubl_oca
simahawk Aug 14, 2022
184b12a
edi_sale_ubl: improve order response data
simahawk Sep 14, 2022
a9d7838
edi_sale_ubl_oca: make exc type demo FIXME
simahawk Nov 15, 2022
c57f8ba
edi_sale_ubl_oca: depend on party data
simahawk Dec 6, 2022
7f6c355
edi_sale_ubl_oca: move data to demo
simahawk Dec 6, 2022
ceb5e45
edi_sale_ubl_oca: imp OrderResponse data
simahawk Dec 6, 2022
7280800
edi_sale_ubl_oca: fix tests
simahawk Dec 6, 2022
cf82851
edi_sale_ubl: ease data override via info
simahawk Dec 17, 2022
98c1f0a
edi_sale_ubl: fix demo data
simahawk May 19, 2023
b16b3e2
edi_sale_ubl: introduce states
simahawk May 19, 2023
8e8a245
edi_sale_ubl: improve tests common
simahawk May 19, 2023
8ead28f
edi_sale: add edi_exchange_ready
simahawk May 23, 2023
05af9d1
edi_sale_ubl: fix state mapping
simahawk May 24, 2023
aafa463
edi_sale_ubl: fix order state handling
simahawk May 26, 2023
88b25b3
edi_sale_ubl: do not use Form for tests
simahawk May 26, 2023
8566af7
edi_sale_ubl: fix state update
simahawk May 26, 2023
e3d10f0
edi_sale_ubl: improve line state test
simahawk Jun 22, 2023
f81af10
edi_sale_ubl: trigger state update on line create/write
simahawk Jun 23, 2023
8c5e644
edi_sale_ubl: fix line state compute
simahawk Jul 3, 2023
7c438fc
edi_sale_ubl: fix order state compute
simahawk Jul 3, 2023
553de98
edi_sale_ubl: adapt to type rule
simahawk Jul 6, 2023
914e6ef
edi_sale_ubl: make state readonly
simahawk Jul 6, 2023
e6e427f
edi_sale_ubl: fix line state compute
simahawk Jul 6, 2023
427759e
edi_sale_ubl: fix tests order setup
simahawk Jul 6, 2023
f793740
edi_sale_ubl: fix line state compute on order create
simahawk Jul 10, 2023
d588bcc
edi_sale_ubl: fix ordrsp tmpl
simahawk Jul 10, 2023
82c47e0
edi_sale_ubl: fix line state for qty=0
simahawk Jul 10, 2023
a4bcfa2
edi_sale_ubl: fix tests, handle increased qty
simahawk Jul 31, 2023
4e5e1a7
edi_sale: move OrderMixin from edi_sale_ubl
simahawk Aug 7, 2023
698c653
[IMP] edi_sale_ubl_oca: add more decorator on create method
May 23, 2024
817df32
test-requirements.txt: depend on edi.config
simahawk Nov 14, 2024
43bfc5a
edi_sale_ubl_oca: use edi.config
simahawk Nov 14, 2024
821a063
fixup! edi_sale_ubl_oca: use edi.config
simahawk Nov 15, 2024
f6fbc45
fixup! fixup! edi_sale_ubl_oca: use edi.config
simahawk Nov 15, 2024
ffb2719
fixup! fixup! fixup! edi_sale_ubl_oca: use edi.config
simahawk Nov 15, 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
edi_sale_ubl: fix tests, handle increased qty
simahawk committed Nov 15, 2024
commit a4bcfa21dd04990f000ce4909f15e9214a5b87ba
5 changes: 3 additions & 2 deletions edi_sale_ubl_oca/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -106,9 +106,10 @@ def _edi_get_line_state_code(self, vals_by_edi_id):
if not vals:
# Brand new line
return self.order_id.EDI_STATE_ORDER_LINE_ADDED
if not self.product_uom_qty:
qty = self.product_uom_qty
if not qty:
return self.order_id.EDI_STATE_ORDER_LINE_NOT_ACCEPTED
if self.product_uom_qty < vals["product_uom_qty"]:
if qty > vals["product_uom_qty"] or qty < vals["product_uom_qty"]:
return self.order_id.EDI_STATE_ORDER_LINE_CHANGED
if self.product_id.id != vals["product_id"]:
return self.order_id.EDI_STATE_ORDER_LINE_CHANGED
33 changes: 23 additions & 10 deletions edi_sale_ubl_oca/tests/test_order_state.py
Original file line number Diff line number Diff line change
@@ -48,8 +48,8 @@ def test_state_partially_accepted(self):
self.assertEqual(
order.edi_state_id.code, order.EDI_STATE_ORDER_CONDITIONALLY_ACCEPTED
)
self.assertTrue(
order.mapped("order_line.edi_state_id.code"),
self.assertEqual(
[x.edi_state_id.code for x in order.order_line],
[
order.EDI_STATE_ORDER_LINE_CHANGED,
order.EDI_STATE_ORDER_LINE_ACCEPTED,
@@ -61,8 +61,8 @@ def test_state_partially_accepted(self):
self.assertEqual(
order.edi_state_id.code, order.EDI_STATE_ORDER_CONDITIONALLY_ACCEPTED
)
self.assertTrue(
order.mapped("order_line.edi_state_id.code"),
self.assertEqual(
[x.edi_state_id.code for x in order.order_line],
[
order.EDI_STATE_ORDER_LINE_CHANGED,
order.EDI_STATE_ORDER_LINE_CHANGED,
@@ -74,8 +74,8 @@ def test_state_partially_accepted(self):
self.assertEqual(
order.edi_state_id.code, order.EDI_STATE_ORDER_CONDITIONALLY_ACCEPTED
)
self.assertTrue(
order.mapped("order_line.edi_state_id.code"),
self.assertEqual(
[x.edi_state_id.code for x in order.order_line],
[
order.EDI_STATE_ORDER_LINE_CHANGED,
order.EDI_STATE_ORDER_LINE_CHANGED,
@@ -87,21 +87,34 @@ def test_state_partially_accepted(self):
self.assertEqual(
order.edi_state_id.code, order.EDI_STATE_ORDER_CONDITIONALLY_ACCEPTED
)
self.assertTrue(
order.mapped("order_line.edi_state_id.code"),
self.assertEqual(
[x.edi_state_id.code for x in order.order_line],
[
order.EDI_STATE_ORDER_LINE_ACCEPTED,
order.EDI_STATE_ORDER_LINE_CHANGED,
order.EDI_STATE_ORDER_LINE_CHANGED,
],
)
# get more qty for line 1
line1.product_uom_qty = orig_qties[line1.id] + 1
self.assertEqual(
order.edi_state_id.code, order.EDI_STATE_ORDER_CONDITIONALLY_ACCEPTED
)
self.assertEqual(
[x.edi_state_id.code for x in order.order_line],
[
order.EDI_STATE_ORDER_LINE_CHANGED,
order.EDI_STATE_ORDER_LINE_CHANGED,
order.EDI_STATE_ORDER_LINE_CHANGED,
],
)
# discard line 1
line1.product_uom_qty = 0
self.assertEqual(
order.edi_state_id.code, order.EDI_STATE_ORDER_CONDITIONALLY_ACCEPTED
)
self.assertTrue(
order.mapped("order_line.edi_state_id.code"),
self.assertEqual(
[x.edi_state_id.code for x in order.order_line],
[
order.EDI_STATE_ORDER_LINE_NOT_ACCEPTED,
order.EDI_STATE_ORDER_LINE_CHANGED,