{"action":"created","issue":{"url":"https://api.github.com/repos/django-oscar/django-oscar/issues/2664","repository_url":"https://api.github.com/repos/django-oscar/django-oscar","labels_url":"https://api.github.com/repos/django-oscar/django-oscar/issues/2664/labels{/name}","comments_url":"https://api.github.com/repos/django-oscar/django-oscar/issues/2664/comments","events_url":"https://api.github.com/repos/django-oscar/django-oscar/issues/2664/events","html_url":"https://github.com/django-oscar/django-oscar/issues/2664","id":310875933,"number":2664,"title":"Regression: price_excl_tax is necessary for availability","user":{"login":"maikhoepfel","id":509427,"avatar_url":"https://avatars0.githubusercontent.com/u/509427?v=4","gravatar_id":"","url":"https://api.github.com/users/maikhoepfel","html_url":"https://github.com/maikhoepfel","followers_url":"https://api.github.com/users/maikhoepfel/followers","following_url":"https://api.github.com/users/maikhoepfel/following{/other_user}","gists_url":"https://api.github.com/users/maikhoepfel/gists{/gist_id}","starred_url":"https://api.github.com/users/maikhoepfel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maikhoepfel/subscriptions","organizations_url":"https://api.github.com/users/maikhoepfel/orgs","repos_url":"https://api.github.com/users/maikhoepfel/repos","events_url":"https://api.github.com/users/maikhoepfel/events{/privacy}","received_events_url":"https://api.github.com/users/maikhoepfel/received_events","type":"User","site_admin":false},"labels":[{"id":97344,"url":"https://api.github.com/repos/django-oscar/django-oscar/labels/%E2%98%81%20Bug","name":"☁ Bug","color":"F8C1C1","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-03T15:04:13Z","updated_at":"2018-04-14T06:25:54Z","closed_at":null,"author_association":"OWNER","body":"I get to upgrade an old Oscar project, and that went really well. Thanks for keeping Oscar so backwards-compatible! I noticed just a small regression for a corner case:\r\n\r\nI work on a project where it was essential that Oscar stores the tax-inclusive price and the price without tax is calculated. The reasoning is that the tax-inclusive prices are legally binding, and doing it this way ensures that a bug in the price calculation logic has less of an impact.\r\n\r\nThis was easily done by storing the price_incl_tax on the stock record, and writing a short pricing policy for it. But two recent changes [here](https://github.com/django-oscar/django-oscar/commit/82d9e7d2647ab50aacd653d21f93f8423f974fbf#diff-38aa6a43fa33c6bad17543acc1e24541) and [here](https://github.com/django-oscar/django-oscar/commit/3e4dda9a89a51323ea50d216bd895101aa014bbf#diff-38aa6a43fa33c6bad17543acc1e24541) make this harder, because they look at a `price_excl_tax` and assume because that is not set, the product is not available to buy. \r\n\r\nI'd like to argue that pricing and availability are concepts that should be kept separate, and the two commits linked above essentially bypass Oscar's pricing logic. \r\n\r\nMy workaround was to backport the `StockRequired` policy from Oscar 1.4."},"comment":{"url":"https://api.github.com/repos/django-oscar/django-oscar/issues/comments/381307454","html_url":"https://github.com/django-oscar/django-oscar/issues/2664#issuecomment-381307454","issue_url":"https://api.github.com/repos/django-oscar/django-oscar/issues/2664","id":381307454,"user":{"login":"solarissmoke","id":160227,"avatar_url":"https://avatars1.githubusercontent.com/u/160227?v=4","gravatar_id":"","url":"https://api.github.com/users/solarissmoke","html_url":"https://github.com/solarissmoke","followers_url":"https://api.github.com/users/solarissmoke/followers","following_url":"https://api.github.com/users/solarissmoke/following{/other_user}","gists_url":"https://api.github.com/users/solarissmoke/gists{/gist_id}","starred_url":"https://api.github.com/users/solarissmoke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solarissmoke/subscriptions","organizations_url":"https://api.github.com/users/solarissmoke/orgs","repos_url":"https://api.github.com/users/solarissmoke/repos","events_url":"https://api.github.com/users/solarissmoke/events{/privacy}","received_events_url":"https://api.github.com/users/solarissmoke/received_events","type":"User","site_admin":false},"created_at":"2018-04-14T06:25:54Z","updated_at":"2018-04-14T06:25:54Z","author_association":"MEMBER","body":"Proposed fix here: #2679. \r\n\r\nI have only reverted the changes in #1913 and offered a different way to handle the issue that it was trying to fix. \r\n\r\n#2294 seems to be correct to me in the sense that that change was to pricing policy rather than availability policy - and for `FixedRateTax` it makes sense to return `UnavailablePricing` if `price_excl_tax` is not set - if you don't know it then you need to use a different strategy."}}
{"actor":{"display_login":"solarissmoke"}}