-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
[17.0][MIG] product_configurator #106
Closed
Closed
Changes from 1 commit
Commits
Show all changes
496 commits
Select commit
Hold shift + click to select a range
5087d27
[PATCH 247/493] [IMP][#T00513]product_configurator:create test cases …
f2dccfb
[PATCH 248/493] [IMP][#T00513]product_configurator:change variable name
567db5b
[PATCH 249/493] [WIP][#T00513]product_configurator: write test case f…
66c6efb
[PATCH 250/493] [FIX]fix changes request during review
bizzappdev 33d5db5
[PATCH 251/493] [FIX]remove parameter limit from search_session and u…
bizzappdev 7198706
[PATCH 252/493] [IMP][T-00511] website configuration image
9544669
[PATCH 253/493] [T-00513][ADD] product_Configurator_image_builder: wr…
bizzappdev 0375314
[PATCH 254/493] [FIX]check values only if both exists
bizzappdev e8de048
[PATCH 255/493] [FIX]fix attribute_value_line_ids in _prepare_configu…
bizzappdev c046a64
[PATCH 256/493] [WIP][#T00513]product_configurator: improve the code …
a9587ac
[PATCH 257/493] [T-00513][ADD] product_configurator_image_builder: ad…
bizzappdev 2a99a76
[PATCH 258/493] [WIP][#T00513]product_configurator: improve the code …
f696d2b
[PATCH 259/493] [FIX]add domain in record rules
bizzappdev 5586faf
[PATCH 260/493] [WIP][#T00513]product_configurator:write test case fo…
6727acb
[PATCH 261/493] [FIX]fix record rules
bizzappdev 3ca8d14
[PATCH 262/493] [FIX]change module name to base from product_configur…
bizzappdev ec07c70
[PATCH 263/493] [FIX]remove extra parentheses
bizzappdev d6d715d
[PATCH 264/493] [FIX]change xml-id of record rule
bizzappdev 7efc8f4
[PATCH 265/493] [IMP][#T00494] product_configurator : add domain on v…
bd29b2d
[PATCH 266/493] [FIX]add group on toggle button for configuration
bizzappdev 1bac3a0
[PATCH 267/493] [FIX]add group manager on attr config setings and wei…
bizzappdev 7e6c55a
[PATCH 268/493] [FIX]add group config manager on varuant price button
bizzappdev 9318261
[PATCH 269/493] [FIX]add group config manager on product attr custom val
bizzappdev 8e1450c
[PATCH 270/493] [FIX]remove extra space
bizzappdev 7ff2691
[PATCH 271/493] [FIX]add group config manager on weight extra on product
bizzappdev f1a365f
[PATCH 272/493] [IMP][T-00513]fix conflict
4217255
[PATCH 273/493] [ADD][T00513]product_configurator : create demo data
718b78d
[PATCH 274/493] [IMP][#T00494] product_configurator,product_configura…
3279503
[PATCH 275/493] [ADD][#IMP]product_configurator:improve the code and …
00023e2
[PATCH 276/493] [IMP][#T00494] product_configurator : solve flak8 in …
dd619b3
[PATCH 277/493] [IMP][#T00494] product_configurator : add depends on …
3af6208
[PATCH 278/493] [IMP][#T00494] product_configurator : remove print st…
afd461b
[PATCH 279/493] [FIX]use UserError instead of warning, raise error if…
bizzappdev 062894d
[PATCH 280/493] [ADD][#T00513] product_configurator_sale, product_con…
6f08b9f
[PATCH 281/493] [FIX]add value_ids in depends
bizzappdev 841f970
[PATCH 282/493] [ADD][#T00513]product_configurator:create test case f…
16e4e3e
[PATCH 283/493] [WIP][#T00513] write test-case for product template
bizzappdev 3c0984f
[PATCH 284/493] [IMP]price and weight on website
bizzappdev 95e3cdf
[PATCH 285/493] [IMP][#T00513] product_configurator: write test-case …
bizzappdev 3359ccb
[PATCH 286/493] [IMP][#T00513]product_configurator: create test case …
879a73a
[PATCH 287/493] [IMP][#T00513]product_configurator:create test case f…
230536d
[PATCH 288/493] [FIX]fix record rules
bizzappdev 5df8b8d
[PATCH 289/493] [FIX]set value_ids only if value_ids is None
bizzappdev 5227611
[PATCH 290/493] [IMP][#T00513]product_configurator: create test case …
4260caa
[PATCH 291/493] [IMP][#T00513]product_configurator: remove comment st…
d5c6519
[PATCH 292/493] [FIX]uncommit button config_ok
bizzappdev d7c4333
[PATCH 293/493] [IMP][#T00513]product_configurator: create test case …
b8cbd7e
[PATCH 294/493] [ADD][t00513]product_configurator,product_configurato…
87ae08c
[PATCH 295/493] [T-00513][IMP] product_configurator: For test-case ad…
bizzappdev 487b627
[PATCH 296/493] [ADD][#T00513]product_configurator:solved conflict
8576da8
[PATCH 297/493] [FIX]move .get_custom_value_id to config session
bizzappdev bdf844d
[PATCH 298/493] [T-00513][IMP] add new changes
bizzappdev 7df212f
[PATCH 299/493] [FIX]fix flake8 and pylint errors
bizzappdev d2b607f
[PATCH 300/493] [ADD][#T00513]product_configurator: create test case …
bfc7ab1
[PATCH 301/493] [FIX]call get_custom_value using config_session
bizzappdev 9285ea5
[PATCH 302/493] [FIX]fix flake8
bizzappdev 90c02c9
[PATCH 303/493] [FIX]change realtion and columns name in value_ids
bizzappdev 3e650de
[PATCH 304/493] [FIX][T-00513] product_configurator: add new changes …
bizzappdev 27df99e
[PATCH 305/493] [IMP][T-00513] product_configurator: solve flake8
bizzappdev 8a1ba7b
[PATCH 306/493] [FIX]add domain website_published = true in record ru…
bizzappdev 71626ec
[PATCH 307/493] [WIP]initial working wizard for the v12 migration
bizzappdev 9bca2dd
[PATCH 308/493] [FIX]remove noupdate=1 from security file of product_…
bizzappdev deacb62
[PATCH 309/493] [IMP]make image click work for radio and check box
bizzappdev 8755c28
[PATCH 310/493] [FIX]take value_ids from session if value_ids is not …
bizzappdev c6c0b45
[PATCH 311/493] [FIX]if default not exist then set it to {}
bizzappdev 14fe0e1
[PATCH 312/493] [FIX]return new_attrs outside for loop
bizzappdev 280de95
[PATCH 313/493] [IMP][T-00513] product_configurator: add changes for …
bizzappdev 00717db
[PATCH 314/493] [FIX]add copy False in product_ids and attribute_line…
bizzappdev b472b17
[PATCH 315/493] [IMP][T-00513] product_configurator: add changes for …
bizzappdev e247874
[PATCH 316/493] [FIX][00513]product_configurator : chnages in test case
a78d785
[PATCH 317/493] [IMP]add description and copy false in attr line_ids …
bizzappdev 06d5265
[PATCH 318/493] [FIX]add price_extra
bizzappdev fb6dde4
[PATCH 319/493] [FIX]fix wizard view
bizzappdev 98e91a3
[PATCH 320/493] [IMP][T-00513] product_configurator: add changes for …
bizzappdev 15b4415
[PATCH 321/493] [FIX]fix flake8 error
bizzappdev 95a2992
[PATCH 322/493] [IMP][T-00513] product_configurator: add chages in te…
bizzappdev 6f7fcda
[PATCH 323/493] [FIX]fix access rules and record rules
bizzappdev 836cffc
[PATCH 324/493] [FIX]use value_ids is None instead not value_ids and …
bizzappdev ecb3fb7
[PATCH 325/493] [IMP][T-00513] product_configurator: add chages for t…
bizzappdev 6488900
[PATCH 326/493] [FIX]change model in record rules
bizzappdev 9018030
[PATCH 327/493] [FIX]fix price extra functionality
bizzappdev 61a04a8
[PATCH 328/493] [FIX]fixes from 11.0
bizzappdev 616ed4d
[PATCH 329/493] [FIX][T-00517]fix :: When we create the standard prod…
bizzappdev b4324a2
[PATCH 330/493] [FIX]add for loop in compute and constrains method to…
bizzappdev 127a891
[PATCH 331/493] [FIX][T-00517]fix default filter,add desciption, allo…
bizzappdev de17b51
[PATCH 332/493] [FIX]delete recor rules
bizzappdev 63032fd
[PATCH 333/493] [FIX]add check in create write and unlink
bizzappdev 791f3d4
[PATCH 334/493] [FIX]move image to last field in tree view
bizzappdev 37b47d6
[PATCH 335/493] [FIX][T-00513] product_configurator: fix test-case is…
bizzappdev 1bf09d1
[PATCH 336/493] [IMP][T-00513] product_configurator: init uncomment code
bizzappdev 16c75a8
[PATCH 337/493] [FIX]filter configuratble product and loop out then i…
bizzappdev 867805e
[PATCH 338/493] [FIX] use condition change_config_ok or self.config_ok
bizzappdev 6e1795b
[PATCH 339/493] [FIX]remove onchange and add readonly in config_ok on…
bizzappdev 56dba7c
[PATCH 340/493] [FIX]remove loop from unlink
bizzappdev 92a7234
[PATCH 341/493] [FIX]set config_ok=true default in method
bizzappdev 94f3799
[PATCH 342/493] [FIX]fix flake8
bizzappdev d511cde
[PATCH 343/493] [WIP][00513]product_configurator : write testcase
1b9263e
[PATCH 344/493] [FIX]move config_ok at top of method
bizzappdev 5b49810
[PATCH 345/493] [FIX]change group manager
bizzappdev a36234b
[PATCH 346/493] [FIX]if check_value_ids is none only then set it to s…
bizzappdev fac8085
[PATCH 347/493] [FIX]remove config_ok from method check_config_user_a…
bizzappdev 42b40c5
[PATCH 348/493] [FIX][T-00513] fix issue test-case issue in product_c…
bizzappdev f81ce6b
[PATCH 349/493] [FIX] fix ex. name
bizzappdev 2a45b22
[PATCH 350/493] [FIX] product_configurator: fix validation issue in p…
bizzappdev 6dba0bd
[PATCH 351/493] [WIP][00517] website_product_configurator: create cha…
bizzappdev c484c02
[PATCH 352/493] [FIX]fixes from 11.0
bizzappdev 11fc7ad
[PATCH 353/493] [FIX]fix security file
bizzappdev e57c491
[PATCH 354/493] [FIX]add if value_ids is None instead if not value_id…
bizzappdev 84eec48
[PATCH 355/493] [FIX]fix argument name
bizzappdev 9341c58
[PATCH 356/493] [IMP][T00517] product_configurator : add attribute on…
afdae26
[PATCH 357/493] [IMP][T00517] product_configurator : add attribute on…
9564b00
[PATCH 358/493] [IMP][T00517] product_configurator : add attribute on…
091ec33
[PATCH 359/493] [IMP][T00517] product_configurator : add attribute on…
8d880d8
[PATCH 360/493] [IMP][T00517] product_configurator : add attribute on…
d612fc3
[PATCH 361/493] [FIX]add group manager in weight_extra
bizzappdev 133acb0
[PATCH 362/493] [FIX][T-00517]website_product_configurator: fix flake8
bizzappdev dd01c49
[PATCH 363/493] [FIX]fix flake8
bizzappdev 4f374ff
[PATCH 364/493] [ADD][00517]product_configurator : migration testcase…
f481b2d
[PATCH 365/493] [FIX][00517] product_configurator,product_configurato…
c0e6922
[PATCH 366/493] [FIX]change version in manifest file
bizzappdev 669ab9c
[PATCH 367/493] [WIP][00517]product_configurator : migration test-cas…
ad47e37
[PATCH 368/493] [ADD][FIX][00517]product_configurator : craete test-c…
3431fe7
[PATCH 369/493] [FIX][00517]product_configurator : onchange method c…
c590de4
[PATCH 370/493] [FIX][00517]product_configurator : solve the flak8
b1eb768
[PATCH 371/493] [FIX] product_configurator: Add admin to Manager group
max3903 b2151b0
[PATCH 372/493] [FIX] product_configurator: Reorder and rename the me…
max3903 ddf5b99
[PATCH 373/493] [FIX]add group confg manager to user root and admin
bizzappdev f6f38cd
[PATCH 374/493] [FIX]website_product_configurator,product_configurato…
8ab522f
[PATCH 375/493] [WIP] product_configurator: add change for fix price …
bizzappdev e755c62
[PATCH 376/493] [FIX][T-00517]fix domain calculation don't consider i…
bizzappdev 8ce1c8c
[PATCH 377/493] [FIX][T-00517]fix price precision on backend wizard
bizzappdev f3387ae
[PATCH 378/493] [FIX]display currency in backend wizard
bizzappdev d7ab14a
[PATCH 379/493] Adding created/found variant on configuration session…
PCatinean e5f8f8b
[PATCH 380/493] Added product_id field to config.session views
PCatinean fd22c84
[PATCH 381/493] [FIX]add ondelete='cascade' instead of ondelete='rest…
bizzappdev fb96d45
[PATCH 382/493] [FIX]remove action_confirm from create_get_variant an…
bizzappdev 064772b
[PATCH 383/493] [FIX]remove extra call for .create_get_variant
bizzappdev 797e601
[PATCH 384/493] [FIX][T2998]fix write method
bizzappdev c9f9e57
[PATCH 385/493] [FIX]product_configurator : chnage in product_configu…
20c9167
[PATCH 386/493] [FIX]product_configurator,website_product_configurato…
b571791
[PATCH 387/493] [IMP][T-00560] product_Configurator: for the restrict…
bizzappdev fc8e7ba
[PATCH 388/493] [IMP][T-00560] product_configurator: fix issue of cha…
bizzappdev 4f7c7d1
[PATCH 389/493] [IMP][T-00560] product_configurator: make change for …
bizzappdev d1a5cf1
[PATCH 390/493] [IMP][T-00560] product_configurator: make readonly at…
bizzappdev c20c155
[PATCH 391/493] [IMP][T-00560] product_configurator: solve flake8
bizzappdev 50fb525
[PATCH 392/493] [FIX]product_configurator : add new test case for get…
5c450c6
[PATCH 393/493] [FIX]fix price precision on backend wizard
bizzappdev 3d12bc6
[PATCH 394/493] [WIP][T-00616] Product_configurator: show price_extra…
bizzappdev 2648ab2
[PATCH 395/493] [IMP][T-00616] Product_configurator: price extra changes
bizzappdev a3a6993
[PATCH 396/493] [FIX][T-00616]fix test case and code optimization
bizzappdev 833bf0b
[PATCH 397/493] [FIX][T-00547]move code from onchage to new method ap…
bizzappdev 4f85f6a
[PATCH 398/493] [FIX][T-00616]find price from related product, and th…
bizzappdev 2eb78b9
[PATCH 399/493] [IMP][T-00622]add name in separator for Configuration…
bizzappdev 5b0c14f
[PATCH 400/493] [FIX][T-00631]call onchange for custom values too
bizzappdev 3902cd8
[PATCH 401/493] [IMP]Add installable False to module from version 12
bizzappdev 22c79fe
[PATCH 402/493] [MIG]migrate product configurator base to 13.0 from 12.0
bizzappdev 32e509b
[PATCH 403/493] [IMP][T3186]add domain in restriction
bizzappdev 38dc616
[PATCH 404/493] Revert "[IMP][T3186]add domain in restriction"
bizzappdev 1a850d5
[PATCH 405/493] [IMP][T3186]add domain in restriction
bizzappdev 1d69ad9
[PATCH 406/493] [FIX][T3186]fix variant prices domain
bizzappdev 6828b19
[PATCH 407/493] [FIX][T3186]fix variant prices domain
bizzappdev 0fe816a
[PATCH 408/493] [FIX][T3186]fix product_preset_id in onchane
bizzappdev 43184af
[PATCH 409/493] [FIX][T3186]send template in context on reset
bizzappdev dd861d1
[PATCH 410/493] [FIX][T3186]change int to integer (custom type)
bizzappdev ab8f61a
[PATCH 411/493] [FIX][T3186]fix reset button functionality
bizzappdev dfbb658
[PATCH 412/493] [FIX][T3186]hide create button from variants
bizzappdev 711dbc7
[PATCH 413/493] [FIX][T3186]prevent to save wrong custom value when n…
bizzappdev 2bab35d
[PATCH 414/493] [FIX][T3186]prevent warning for int/float value valid…
bizzappdev 0e4b239
[PATCH 415/493] [FIX][T3186] fix js error due to undefined element
bizzappdev cfe7702
[PATCH 416/493] [FIX][T3186] open config attribute view from product_…
bizzappdev 190d95d
[PATCH 417/493] [FIX][T3186] fix context on attribute lines
bizzappdev c29bddd
[PATCH 418/493] [FIX][T3186] fix context on attribute lines
bizzappdev 78469cd
[PATCH 419/493] [FIX][T3186] fix context on attribute lines
bizzappdev 1405bab
[PATCH 420/493] [FIX][T3186] fix context on attribute lines
bizzappdev f17cc5e
[PATCH 421/493] [WIP][3186]add views in wizard action
bizzappdev de296ca
[PATCH 422/493] [IMP][T3186]add helper methods to call onchage
bizzappdev 6c5f3a8
[PATCH 423/493] [IMP][T3186]remove custom values on variant
bizzappdev 656bdc4
[PATCH 424/493] [IMP][T3186]remove search on custom values in get_var…
bizzappdev 571b608
[PATCH 425/493] [FIX][3186]add name in session custom values
bizzappdev 29a0900
[PATCH 426/493] [FIX][T3199]add active false in custom attribute values
bizzappdev aefbf6a
[PATCH 427/493] [FIX]fix flake8
bizzappdev e1d7937
[PATCH 428/493] [FIX]remove print
bizzappdev 72e81be
[PATCH 429/493] [FIX][T3186]fix duplicate copy of attribute-lines and…
bizzappdev 695663a
[PATCH 430/493] [MIG]migrate website_product_configurator to v13
bizzappdev 26978e7
[PATCH 431/493] [FIX]add res config settings view
bizzappdev 5293afb
[PATCH 432/493] [FIX]remove extra context from res config settings view
bizzappdev 17a8314
[PATCH 433/493] [FIX]fix configurator setting menu
bizzappdev 7c085c6
[PATCH 434/493] [FIX]update po file
bizzappdev 4b959ae
[PATCH 435/493] [FIX][T3200]fix price in cart lines
bizzappdev 437b279
[PATCH 436/493] [FIX][T3200]fix product session in context
bizzappdev 484c758
[PATCH 437/493] [FIX]fix flake8 error
bizzappdev 6074eb1
[PATCH 438/493] [FIX]fix signletom error
bizzappdev 8a9b398
[PATCH 439/493] Fix flake8 error
PCatinean 3cf3ea3
[PATCH 440/493] [13.0][FIX]wrong view inherit (#183)
luc-demeyer fb09c2e
[PATCH 441/493] FIX user access if sudo() mode (#180)
60939e4
[PATCH 442/493] [13.0][FIX] Error on smart button with context (#184)
e72b498
[PATCH 443/493] [IMP] product_configurator: black, isort, prettier
dreispt 004ef3a
[PATCH 444/493] [MIG] product_configurator: Migration to 14.0
dreispt 9905344
[PATCH 445/493] [IMP] Improved the code and made the module as instal…
Chandresh-SerpentCS f601ddf
[PATCH 446/493] [FIX] product_configurator: wizard form would not open
dreispt 0d0d0f5
[PATCH 447/493] [FIX] Fixed pre-commit, improved the methods.
Chandresh-OSI 50a533e
[PATCH 448/493] [FIX] product_configurator: attribute required error …
dreispt 6d83096
[PATCH 449/493] [FIX] product_configurator: fix installation log warn…
dreispt 513309f
[PATCH 450/493] [FIX] product_configurator: readme, precommit, beta m…
dreispt 91770c1
[PATCH 451/493] [UPD] Update product_configurator.pot
oca-travis a63c2ad
[PATCH 452/493] [UPD] README.rst
OCA-git-bot 2bd5520
[PATCH 453/493] [FIX] product_configurator: remove old readme file
dreispt a327812
[PATCH 454/493] product_configurator 14.0.1.0.1
OCA-git-bot e63a017
[PATCH 455/493] [MIG] Migrated product_configurator base to V14
PCatinean bef8dec
[PATCH 456/493] [MIG] rebase product configurator module.
pledrateam 3e01389
[PATCH 457/493] [MIG] rebase product configurator module for translat…
pledrateam 63111c7
[PATCH 458/493] [UPD] Update product_configurator.pot
oca-travis d9f2c3c
[PATCH 459/493] [UPD] README.rst
OCA-git-bot 61108c2
[PATCH 460/493] product_configurator 14.0.1.1.0
OCA-git-bot fbabb84
[PATCH 461/493] [FIX]remove stock from depends
pledrateam 3e45f05
[PATCH 462/493] [FIX]product_configurator: stock depending view move …
pledrateam affb808
[PATCH 463/493] product_configurator 14.0.1.2.0
OCA-git-bot 6a1b9a2
[PATCH 464/493] FIX form_widget.js because it conflicted with the eva…
a6bd980
[PATCH 465/493] [FIX] product_configurator: missing variable initiali…
84ac843
[PATCH 466/493] product_configurator 14.0.1.2.1
OCA-git-bot 78ff260
[PATCH 467/493] Modifi Fotmat code
0249129
[PATCH 468/493] Modify format by pre-commite
b03326f
[PATCH 469/493] product_configurator 14.0.1.2.2
OCA-git-bot 9235d04
[PATCH 470/493] Add pcatinean as maintainer for all modules
PCatinean 1516404
[PATCH 471/493] [UPD] README.rst
OCA-git-bot 9009743
[PATCH 472/493] [WIP][T-01839]product_configurator: remove price calc…
pledrateam ac61de5
[PATCH 473/493] [REF] *: fix PCatinean maintainer
dreispt 19d5850
[PATCH 474/493] [UPD] README.rst
OCA-git-bot 3043e19
[PATCH 475/493] product_configurator 14.0.1.2.3
OCA-git-bot c99d36e
[PATCH 476/493] [FIX] product_configurator: ordinary users don't have…
DonatasV 93f3762
[PATCH 477/493] product_configurator 14.0.1.2.4
OCA-git-bot 9e96408
[PATCH 478/493] [IMP] Change from Transient to regular Model
patrickrwilson 3d9e780
[PATCH 479/493] product_configurator 14.0.1.2.5
OCA-git-bot 4c9c3bf
[PATCH 480/493] [FIX] product_configurator
csil300 b618fa3
[PATCH 481/493] product_configurator 14.0.1.2.6
OCA-git-bot 23962fd
[PATCH 482/493] [MIG] product_configurator: Migration to 16.0
dannyadair de52359
[PATCH 483/493] [REF] product_configurator: pre-commit
dreispt dbfcd16
[PATCH 484/493] [FIX] product_configurator: Deprecated attribute
SirAionTech c99c607
[PATCH 485/493] [FIX] product_configurator: Validate attributes
SirAionTech 7bafbb5
[PATCH 486/493] [IMP] product_configurator: Use new translation syntax
SirAionTech b0ee01e
[PATCH 487/493] [IMP] product_configurator: Use new name_search
SirAionTech 6bdca02
[PATCH 488/493] [REF] product_configurator: Remove unused method
SirAionTech ba6a66d
[PATCH 489/493] [FIX] product_configurator: product.product.price doe…
SirAionTech 2b6b826
[PATCH 490/493] [IMP] product_configurator: Use existing flatten
SirAionTech e77cfcd
[PATCH 491/493] [FIX] product_configurator: Remove old commented code
SirAionTech c24067f
[PATCH 492/493] [IMP] product_configurator: Do not recreate same exce…
SirAionTech 6a10823
[PATCH 493/493] [UPD] Update product_configurator.pot
ac945b4
[ADD] product_configurator: Migrated to v17
Nikul-OSI a9134c4
[FIX] Fixed validation error
Nikul-OSI de2eb0d
[FIX] Commented a code.
Ammar-OSI File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
continue | ||
for line in lines[:-1]: | ||
if line.operator == "or": | ||
computed_domain.append("|") | ||
computed_domain.append( | ||
(line.attribute_id.id, line.condition, line.value_ids.ids) | ||
) | ||
|
@@ -96,25 +96,25 @@ | |
@api.depends("attribute_id") | ||
def _compute_template_attribute_value_ids(self): | ||
for domain in self: | ||
domain.template_attribute_value_ids = ( | ||
domain._get_allowed_attribute_value_ids() | ||
) | ||
|
||
def _compute_attribute_id_domain(self): | ||
if "product_attribute_ids" in self.env.context: | ||
return [("id", "in", self.env.context["product_attribute_ids"][0][2])] | ||
return [] | ||
|
||
def _get_allowed_attribute_value_ids(self): | ||
self.ensure_one() | ||
product_template = self.env["product.template"] | ||
if self.env.context.get("product_tmpl_id"): | ||
product_template = product_template.browse( | ||
self.env.context.get("product_tmpl_id") | ||
) | ||
template_lines = product_template.attribute_line_ids | ||
attribute_values = self.attribute_id.value_ids | ||
return ( | ||
product_template | ||
and (template_lines.mapped("value_ids") & attribute_values) | ||
or attribute_values | ||
|
@@ -177,9 +177,9 @@ | |
) | ||
def _compute_template_attribute_ids(self): | ||
for config_line in self: | ||
product_template = config_line.product_tmpl_id | ||
attribute_line_ids = product_template.attribute_line_ids | ||
config_line.template_attribute_ids = attribute_line_ids.mapped( | ||
"attribute_id" | ||
) | ||
|
||
|
@@ -266,8 +266,8 @@ | |
product_tmpl_id=cfg_img.product_tmpl_id.id, | ||
final=False, | ||
) | ||
except ValidationError as exc: | ||
raise ValidationError( | ||
_( | ||
"Values entered for line '%s' generate " | ||
"a incompatible configuration" | ||
|
@@ -321,7 +321,7 @@ | |
lambda line: line != config_step | ||
).mapped("config_step_id") | ||
if config_step.config_step_id in cfg_steps: | ||
raise ValidationError( | ||
_("Cannot have a configuration step defined twice.") | ||
) | ||
|
||
|
@@ -369,14 +369,14 @@ | |
def _compute_config_step_name(self): | ||
"""Get the config.step.line name using the string stored in config_step | ||
field of the session""" | ||
cfg_step_line_obj = self.env["product.config.step.line"] | ||
cfg_session_step_lines = self.mapped("config_step") | ||
cfg_step_line_ids = set() | ||
for step in cfg_session_step_lines: | ||
try: | ||
cfg_step_line_ids.add(int(step)) | ||
except ValueError: | ||
_logger.debug("Step from session not valid") | ||
cfg_step_lines = cfg_step_line_obj.browse(cfg_step_line_ids) | ||
for session in self: | ||
try: | ||
|
@@ -386,7 +386,7 @@ | |
) | ||
session.config_step_name = config_step_line.name | ||
except Exception: | ||
_logger.debug("Invalid session data ignored") | ||
if not session.config_step_name: | ||
session.config_step_name = session.config_step | ||
|
||
|
@@ -407,20 +407,20 @@ | |
|
||
product_tmpl = self.product_tmpl_id | ||
|
||
self = self.with_context(active_id=product_tmpl.id) | ||
|
||
value_ids = self.flatten_val_ids(value_ids) | ||
|
||
weight_extra = 0.0 | ||
product_attr_val_obj = self.env["product.template.attribute.value"] | ||
product_tmpl_attr_values = product_attr_val_obj.search( | ||
[ | ||
("product_tmpl_id", "in", product_tmpl.ids), | ||
("product_attribute_value_id", "in", value_ids), | ||
] | ||
) | ||
for product_tmpl_attr_val in product_tmpl_attr_values: | ||
weight_extra += product_tmpl_attr_val.weight_extra | ||
|
||
return product_tmpl.weight + weight_extra | ||
|
||
|
@@ -437,10 +437,10 @@ | |
cfg_session.weight = cfg_session.get_cfg_weight() | ||
|
||
def _compute_currency_id(self): | ||
main_company = self.env["res.company"]._get_main_company() | ||
for session in self: | ||
template = session.product_tmpl_id | ||
session.currency_id = ( | ||
template.company_id.sudo().currency_id.id or main_company.currency_id.id | ||
) | ||
|
||
|
@@ -507,7 +507,7 @@ | |
def _check_product_id(self): | ||
for session in self.filtered(lambda s: s.state == "done"): | ||
if not session.product_id: | ||
raise ValidationError( | ||
_("Finished configuration session must have a " "product_id linked") | ||
) | ||
|
||
|
@@ -553,14 +553,14 @@ | |
if field_vals[0] == 6: | ||
field_val += field_vals[2] or [] | ||
elif field_vals[0] == 4: | ||
field_val.append(field_vals[1]) | ||
# field_val = [ | ||
# i[1] for i in vals[field_name] if vals[field_name][0] | ||
# ] or vals[field_name][0][1] | ||
elif not attr_line.multi and isinstance(vals[field_name], int): | ||
field_val = vals[field_name] | ||
else: | ||
raise UserError( | ||
_("An error occurred while parsing value for attribute %s") | ||
% attr_line.attribute_id.name | ||
) | ||
|
@@ -573,8 +573,8 @@ | |
val = vals.get(custom_field_name, False) | ||
if attr_line.attribute_id.custom_type == "binary": | ||
# TODO: Add widget that enables multiple file uploads | ||
val = [{"name": "custom", "datas": vals[custom_field_name]}] | ||
custom_val_dict.update({attr_id: val}) | ||
# Ensure there is no standard value stored if we have switched | ||
# from selected value to custom value. | ||
attr_val_dict.update({attr_id: False}) | ||
|
@@ -634,7 +634,7 @@ | |
).unlink() | ||
|
||
if custom_val_dict: | ||
binary_field_ids = ( | ||
self.env["product.attribute"] | ||
.search( | ||
[ | ||
|
@@ -652,9 +652,9 @@ | |
continue | ||
|
||
if "custom_value_ids" not in update_vals: | ||
update_vals["custom_value_ids"] = [] | ||
|
||
custom_vals = {"attribute_id": attr_id} | ||
|
||
if attr_id in binary_field_ids: | ||
attachments = [ | ||
|
@@ -665,11 +665,11 @@ | |
) | ||
for val in vals | ||
] | ||
custom_vals.update({"attachment_ids": attachments}) | ||
else: | ||
custom_vals.update({"value": vals}) | ||
|
||
update_vals["custom_value_ids"].append((0, 0, custom_vals)) | ||
self.write(update_vals) | ||
|
||
def write(self, vals): | ||
|
@@ -677,7 +677,7 @@ | |
# TODO: Issue warning when writing to value_ids or custom_val_ids | ||
res = super().write(vals) | ||
if not self.product_tmpl_id: | ||
return res | ||
value_ids = self.value_ids.ids | ||
avail_val_ids = self.values_available(value_ids) | ||
if set(value_ids) - set(avail_val_ids): | ||
|
@@ -685,9 +685,9 @@ | |
try: | ||
self.validate_configuration(final=False) | ||
except ValidationError as exc: | ||
raise ValidationError(_("{}".format(exc))) | ||
except Exception as exc: | ||
raise ValidationError(_("Invalid Configuration")) from exc | ||
return res | ||
|
||
@api.model_create_multi | ||
|
@@ -711,7 +711,7 @@ | |
) | ||
value_ids = vals.get("value_ids") | ||
if value_ids: | ||
default_val_ids += value_ids[0][2] | ||
try: | ||
self.validate_configuration( | ||
value_ids=default_val_ids, | ||
|
@@ -721,9 +721,9 @@ | |
# TODO: Remove if cond when PR with | ||
# raise error on github is merged | ||
except ValidationError as exc: | ||
raise ValidationError(_("%s") % exc.name) from exc | ||
except Exception as exc: | ||
raise ValidationError( | ||
_( | ||
"Default values provided generate an invalid " | ||
"configuration" | ||
|
@@ -754,9 +754,9 @@ | |
try: | ||
self.validate_configuration() | ||
except ValidationError as exc: | ||
raise ValidationError(_("%s") % exc.name) from exc | ||
except Exception as exc: | ||
raise ValidationError(_("Invalid Configuration")) from exc | ||
|
||
duplicates = self.search_variant( | ||
value_ids=value_ids, product_tmpl_id=self.product_tmpl_id | ||
|
@@ -783,7 +783,7 @@ | |
if value_ids is None: | ||
value_ids = self.value_ids.ids | ||
|
||
value_obj = self.env["product.attribute.value"].with_context( | ||
pricelist=pricelist.id | ||
) | ||
values = ( | ||
|
@@ -798,14 +798,14 @@ | |
value_ids = self.value_ids.ids | ||
vals = self._get_option_values(pricelist, value_ids) | ||
for val in vals: | ||
prices["vals"].append( | ||
( | ||
val.attribute_id.name, | ||
val.product_id.name, | ||
val.product_id.price, | ||
) | ||
) | ||
product = val.product_id.with_context(pricelist=pricelist.id) | ||
product_prices = product.taxes_id.sudo().compute_all( | ||
price_unit=product.price, | ||
currency=pricelist.currency_id, | ||
|
@@ -814,10 +814,10 @@ | |
partner=self.env.user.partner_id, | ||
) | ||
|
||
total_included = product_prices["total_included"] | ||
taxes = total_included - product_prices["total_excluded"] | ||
prices["taxes"] += taxes | ||
prices["total"] += total_included | ||
return prices | ||
|
||
@api.model | ||
|
@@ -929,7 +929,7 @@ | |
("state", "=", state), | ||
] | ||
if parent_id: | ||
domain.append(("parent_id", "=", parent_id)) | ||
return domain | ||
|
||
def get_session_vals(self, product_tmpl_id, parent_id=None, user_id=None): | ||
|
@@ -967,7 +967,7 @@ | |
if (value_ids or custom_value_ids) and state != "select": | ||
return False | ||
elif not (value_ids or custom_value_ids) and state != "select": | ||
raise UserError( | ||
_( | ||
"You must select at least one " | ||
"attribute in order to configure a product" | ||
|
@@ -994,7 +994,7 @@ | |
if next_step: | ||
pass | ||
elif not (value_ids or custom_value_ids): | ||
raise UserError( | ||
_( | ||
"You must select at least one " | ||
"attribute in order to configure a product" | ||
|
@@ -1140,7 +1140,7 @@ | |
step_to_open = step | ||
break | ||
if step_to_open: | ||
return "%s" % (step_to_open.id) | ||
return False | ||
|
||
@api.model | ||
|
@@ -1271,7 +1271,7 @@ | |
# Validate custom values | ||
attr = line.attribute_id | ||
if attr.id in custom_vals: | ||
attr.validate_custom_val(custom_vals[attr.id]) | ||
if final: | ||
common_vals = set(value_ids) & set(line.value_ids.ids) | ||
custom_val = custom_vals.get(attr.id) | ||
|
@@ -1287,7 +1287,7 @@ | |
and not custom_val | ||
): | ||
# TODO: Verify custom value type to be correct | ||
raise ValidationError( | ||
_("Required attribute '%s' is empty") % (attr.name) | ||
) | ||
|
||
|
@@ -1364,7 +1364,7 @@ | |
custom_attrs_with_error = list( | ||
set(custom_vals.keys()) - set(custom_attr_ids) | ||
) | ||
custom_attrs_with_error = self.env["product.attribute"].browse( | ||
custom_attrs_with_error | ||
) | ||
error_message = _( | ||
|
@@ -1377,7 +1377,7 @@ | |
) | ||
message_vals = "" | ||
for attr_id in custom_attrs_with_error: | ||
message_vals += f"\n {attr_id.name}: {custom_vals.get(attr_id.id)}" | ||
raise ValidationError(error_message % (message_vals)) | ||
|
||
# Check if there are multiple values passed for non-multi attributes | ||
|
@@ -1387,7 +1387,7 @@ | |
attrs_with_error = {} | ||
for line in mono_attr_lines: | ||
if len(set(line.value_ids.ids) & set(value_ids)) > 1: | ||
wrong_vals = self.env["product.attribute.value"].browse( | ||
set(line.value_ids.ids) & set(value_ids) | ||
) | ||
attrs_with_error[line.attribute_id] = wrong_vals | ||
|
@@ -1402,7 +1402,7 @@ | |
) | ||
message_vals = "" | ||
for attr_id, vals in attrs_with_error.items(): | ||
message_vals += "\n {}: {}".format( | ||
attr_id.name, ", ".join(vals.mapped("name")) | ||
) | ||
raise ValidationError(error_message % (message_vals)) | ||
|
@@ -1425,9 +1425,9 @@ | |
value_ids = list(set(value_ids) - set(custom_value_id.ids)) | ||
|
||
if not product_tmpl_id: | ||
product_tmpl_id = self.product_tmpl_id | ||
if not product_tmpl_id: | ||
raise ValidationError( | ||
_( | ||
"Cannot conduct search on an empty config session " | ||
"without product_tmpl_id kwarg" | ||
|
@@ -1485,9 +1485,9 @@ | |
if value_ids and value_ids[0]: | ||
for val in value_ids: | ||
if not val: | ||
continue | ||
if isinstance(val, list): | ||
flat_val_ids.add(val[1]) | ||
elif isinstance(val, int): | ||
flat_val_ids.add(val) | ||
return list(flat_val_ids) | ||
|
@@ -1496,8 +1496,8 @@ | |
if prices is None: | ||
prices = {} | ||
dp = None | ||
prices["taxes"] = formatLang(self.env, prices["taxes"], monetary=True, dp=dp) | ||
prices["total"] = formatLang(self.env, prices["total"], monetary=True, dp=dp) | ||
prices["vals"] = [ | ||
(v[0], v[1], formatLang(self.env, v[2], monetary=True, dp=dp)) | ||
for v in prices["vals"] | ||
|
@@ -1510,19 +1510,19 @@ | |
:param custom_vals: dict {product.attribute.id: custom_value} | ||
:returns: list of custom values compatible with write and create | ||
""" | ||
attr_obj = self.env["product.attribute"] | ||
binary_attribute_ids = attr_obj.search([("custom_type", "=", "binary")]).ids | ||
custom_lines = [] | ||
|
||
for key, val in custom_vals.items(): | ||
custom_vals = {"attribute_id": key} | ||
# TODO: Is this extra check neccesairy as we already make | ||
# the check in validate_configuration? | ||
attr_obj.browse(key).validate_custom_val(val) | ||
if key in binary_attribute_ids: | ||
custom_vals.update({"attachment_ids": [(6, 0, val.ids)]}) | ||
else: | ||
custom_vals.update({"value": val}) | ||
custom_lines.append((0, 0, custom_vals)) | ||
return custom_lines | ||
|
||
|
@@ -1530,12 +1530,12 @@ | |
def get_child_specification(self, model, parent): | ||
"""return dictiory of onchange specification by | ||
appending parent before each key""" | ||
model_obj = self.env[model] | ||
specs = model_obj._onchange_spec() | ||
new_specs = {} | ||
for key, val in specs.items(): | ||
new_specs[f"{parent}.{key}"] = val | ||
return new_specs | ||
|
||
@api.model | ||
def get_onchange_specifications(self, model): | ||
|
@@ -1544,16 +1544,19 @@ | |
- needed this method because odoo don't add specification for fields | ||
one2many or many2many there is view-reference(using : tree_view_ref) | ||
intead of view in that field""" | ||
model_obj = self.env[model] | ||
specs = model_obj._onchange_spec() | ||
for name, field in model_obj._fields.items(): | ||
if field.type not in ["one2many", "many2many"]: | ||
continue | ||
ch_specs = self.get_child_specification( | ||
model=field.comodel_name, parent=name | ||
) | ||
specs.update(ch_specs) | ||
|
||
# TODO :- Commented a code and ths code already base in a odoo base modules. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just delete the code then. |
||
# for name, field in model_obj._fields.items(): | ||
# if field.type not in ["one2many", "many2many"]: | ||
# continue | ||
# ch_specs = self.get_child_specification( | ||
# model=field.comodel_name, parent=name | ||
# ) | ||
# specs.update(ch_specs) | ||
|
||
return specs | ||
|
||
@api.model | ||
def get_vals_to_write(self, values, model): | ||
|
@@ -1561,24 +1564,24 @@ | |
- same functionality by _convert_to_write | ||
- needed this method because odoo don't call convert to write | ||
for the many2many/one2many fields""" | ||
model_obj = self.env[model] | ||
values = model_obj._convert_to_write(values) | ||
fields = model_obj._fields | ||
for key, vals in values.items(): | ||
if not isinstance(vals, list): | ||
continue | ||
new_lst = [] | ||
for line in vals: | ||
new_line = line | ||
if line and isinstance(line[-1], dict): | ||
new_line = line[:-1] + ( | ||
self.get_vals_to_write( | ||
values=line[-1], model=fields[key].comodel_name | ||
), | ||
) | ||
new_lst.append(new_line) | ||
values[key] = new_lst | ||
return values | ||
|
||
|
||
class ProductConfigSessionCustomValue(models.Model): | ||
|
@@ -1589,8 +1592,8 @@ | |
@api.depends("attribute_id", "attribute_id.uom_id") | ||
def _compute_val_name(self): | ||
for attr_val_custom in self: | ||
uom = attr_val_custom.attribute_id.uom_id.name | ||
attr_val_custom.name = "{}{}".format( | ||
attr_val_custom.value, | ||
(" %s" % uom) or "", | ||
) | ||
|
@@ -1618,7 +1621,7 @@ | |
"""Return custom value evaluated using the related custom field type""" | ||
field_type = self.attribute_id.custom_type | ||
if field_type == "binary": | ||
vals = self.attachment_ids.mapped("datas") | ||
if len(vals) == 1: | ||
return vals[0] | ||
return vals | ||
|
@@ -1639,7 +1642,7 @@ | |
) | ||
> 1 | ||
): | ||
raise ValidationError( | ||
_("Configuration cannot have the " "same value inserted twice") | ||
) | ||
|
||
|
@@ -1657,16 +1660,16 @@ | |
@api.constrains("attachment_ids", "value") | ||
def check_custom_type(self): | ||
for custom_val in self: | ||
custom_type = custom_val.attribute_id.custom_type | ||
if custom_val.value and custom_type == "binary": | ||
raise ValidationError( | ||
_( | ||
"Attribute custom type is binary, attachments are the " | ||
"only accepted values with this custom field type" | ||
) | ||
) | ||
if custom_val.attachment_ids and custom_type != "binary": | ||
raise ValidationError( | ||
_( | ||
"Attribute custom type must be 'binary' for saving " | ||
"attachments to custom value" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
raise ValidationError(_("{}").format(exc))
?Or even better, I can't see the point for this
except
, what if we remove it?