Commit Graph

60 Commits

Author SHA1 Message Date
Goffin Simon a617fd29ae [FIX] website_sale: discount display in e-commerce
Each time the quantity of a product is changed, the price must
be updated according to the pricelist of the user.
When the price given by the pricelist is less then the unit price
of the product, the reduction of the price must be displayed.

A not stored computed field is added in model "sale.order.line"
to compute the discounted price because when the module
product_visible_discount is installed the price unit of a SO line
is the full price of the product and the discount related to the pricelist
is written in percent in the field discount(function "product_id_change"
in addons/product_visible_discount/product_visible_discount.py).

opw:660178
2015-12-22 10:21:07 +01:00
David Monjoie fa48e6f485 [IMP] website_sale: sale_get_order avoid useless sql request
Avoid an sql request when sale_order_id is None.
Improvement of 6b6d7310c0.
Closes PR #8974.
2015-10-14 11:59:54 +02:00
David Monjoie 6b6d7310c0 [FIX] website_sale: sale_get_order force_create
Previously, if there was a sale_order_id but it was wrong,
like when the sale order was deleted for example, the function
didn't return a sale order, even with force_create=True.

It used to pass the first 'if' as sale_order_id had a value, so
no new sale order was created. However, as sometimes the id was
referring to a non-existant sale_order, a sale_order.exists() test
was used later, resulting in the function sometimes returning None,
even with force_create = True.

Proposed solution is to test the existence of the browse record with
the given id earlier, instead of testing the existence of the id itself.
2015-10-06 10:59:46 +02:00
Denis Ledoux 3b02e3d63d [FIX] sale*: company tax filtering
f26b94f had as goal to filter the taxes of the product
according to the company when the sale.order
was created/edited as SUPERUSER_ID
(Who ignores the record rules).

Unfortunetaly, to filter the taxes,
it used the company of the customer,
while it's actually the company of the order which
should be used.

Indeed, for instance,
partners can be shared among all companies.

It was way less simple to access the company
of the sale.order, this parameter being
not available in the on_change method signature.

This is the easiest way to solve this issue
without breaking the API / retro-compatibility.

opw-647819
2015-08-25 14:52:20 +02:00
Goffin Simon, Nicolas Lempereur 98a72a2604 [FIX] website_sale_delivery: update shopping cart
The delivery must be updated when the cart is updated.
The method "_check_carrier_quotation" called by "_cart_update" deletes sale order line related to delivery.
Then each line passed to "_cart_update" must be checked with "exists" to be sure that the record is not
missing.
Related to the task : 12239
opw:641913
2015-06-16 13:56:43 +02:00
Jeremy Kersten 31301bb31a [FIX] website_sale: reset sale order from session if status is no more in draft
When a sale order has in state != draft, we raise a error message since commit
f6c65a3d9e.

But if we don't reset the sale order id from the session, the user cannot
continue to navigate on website because the user will have the error each time.
2015-06-09 11:13:20 +02:00
Nicolas Martinelli f6c65a3d9e [FIX] website_sale: prevents the modification of a SO line if SO is not 'draft'
opw-634681
2015-05-18 13:08:01 +02:00
Damien Bouvy e4d8246c81 [FIX] website_sale: fix unnecessary permanent update of pricelist on checkout 2015-04-22 16:47:47 +02:00
Christophe Matthieu 74497a667f [FIX] website_sale: If there is no description_sale for the product set the cart display the product name and 'False' 2015-03-09 20:34:01 +01:00
Christophe Matthieu 72c418e6dd [FIX] website_sale: wrong line details in pdf invoice, the invoice line name does not contains the product name 2015-02-16 10:32:39 +01:00
Denis Ledoux 7a2ba5ca47 [FIX] website_sale: apply reduction code
The line being deleted in this revision looks to have been useful when it was introduced in this commit:
36fc910

As the sale order was updated right away through the update_pricelist method
But since this rev. 22f4c31, the sale order is updated later, and reset the sale_order_code_pricelist_id value in the session right after setting it prevent to apply the pricelist of the promotional code...
2014-11-21 15:56:37 +01:00
Julien Legros aecb24ad6b [FIX] website_sale: don't carry over tx details on SO duplication
opw-617319
2014-11-19 11:43:02 +01:00
Olivier Dony 9b67a483df [FIX] website_sale: better fiscal position detection + support update during checkout
The customer can change the country and tax
number in the billing information during
checkout, and the taxes should be properly
updated according to the re-detected fiscal
position.

The fiscal position detection also depends
on the `vat_subjected` flag, which we now assume
to be implicit as soon as the customer filled
in a valid Tax Identification Number.
2014-10-10 21:02:33 +02:00
Denis Ledoux eaa0f29094 [FIX] website*sale: product_id_change qty is 0 by default
Thus, need to pass the actual quantity to product_id_change in order to set values correctly
2014-09-30 17:20:28 +02:00
Thibault Delavallée dce983dea0 [IMP] website_sale: confirm quotation only when the payment is done, not directly when hitting 'pay now'. 2014-09-29 11:12:37 +02:00
Jamin Shah ff5e7a749c [IMP] website_sale : avoid duplicated order lines
Add line id to while calling _cart_update() from sale_get_order()
The missing line_id parametre was making the _cart_find_product_line() call to fail as it was linked to an option while searching for lines without options (making the method recreate new lines).
Fixes #2573
2014-09-25 11:31:49 +02:00
Olivier Dony e5bff82aff [MERGE] Forward-port saas-5 up to f9bcd67 2014-09-17 16:39:06 +02:00
Martin Trigaux 46efc164d6 Forward port of branch saas-3 up to rev 2ee1843 2014-09-17 12:58:08 +02:00
Christophe Matthieu 5f25cb9244 [FIX] website_sale: install website_event_sale click on event to make a registration, error because fiscal_position is undefined 2014-07-11 15:29:22 +02:00
Fabien Pinckaers 5cc81dd64f Fixes 2014-07-02 18:18:29 +02:00
Antony Lesuisse 22f4c315a3 [IMP] automatic fiscal positions for simple cases
Add group of countries res.country.group
Add get_fiscal_position method a method to compute a fiscal position based on company_id, partner_id, delivery_id
The meaning of res.partner.fiscal_position is now a forced a fiscal position.
The default implementation should handle simple cases, like VAT in UE and sales
tax in the US, but the method can be overriden to handle more complex ficals
rules.
2014-06-30 02:12:41 +02:00
Christophe Matthieu 412a7593be [IMP] website_sale_options 2014-06-25 11:31:39 +02:00
Christophe Matthieu 7505cce2e9 [WIP] 2014-06-24 17:37:13 +02:00
Christophe Matthieu 204a62499a [IMP] website_sale_options 2014-06-24 15:11:53 +02:00
Christophe Matthieu 22d528c7a7 [IMP] website_sale: display the discount in the product template when the user select a variant 2014-06-19 13:12:08 +02:00
Christophe Matthieu 43ca22d10c [FIX] website_sale: access right for currency for public user 2014-06-19 13:12:07 +02:00
Christophe Matthieu a6185caa18 [FIX] website_sale: display in currency of the user 2014-06-19 13:12:06 +02:00
Christophe Matthieu 7295a07c4a [FIX] website_sale: display price with user curencie. 2014-06-19 13:12:06 +02:00
Christophe Matthieu 9f77cb9d1f [IMP] website_sale: optional product have all time the same quantity of the liked product. 2014-06-17 14:23:15 +02:00
Christophe Matthieu 8319356630 [IMP] website_sale: allow optional products in shop; In shop, it opens the modal jus after having clicked on the 'Add to cart'. The modal contains the optional products. 2014-06-11 12:50:41 +02:00
Denis Ledoux 489742873d [FIX] website_sale: backport commit 3cc4785ba6 of master
This fix aimed saas-5, not master.
original Commit message:
display accessory field in form view and display the good accessory product inside ecommerce
This is related to previous rev 86055fb8cd
2014-06-04 11:25:51 +02:00
Denis Ledoux 86055fb8cd [FIX] website_sale: accessory_product_ids are product.product, not product.template
This many2many field should actually have product.template as relation
But, in a stable release, we cannot alter the database
Therefore, when displaying accessory products in the card, it display the product_tmpl_id of the product.product, not itself
This relation should be changed in trunk
+ Actually displaying this field in the backend
2014-06-04 10:44:56 +02:00
Thibault Delavallée 721a3d4ed2 [MERGE] [IMP] Added a website salesteam, used to handle ecommerce quotations and
contact leads. Also added use_opportunities and use_quotations boolean fields on
sales team, like use_leads to ease the salesteam customization.

Also removed some dead code in website_sale_crm and website_sale_delivery.
2014-05-15 10:02:02 +02:00
Thibault Delavallée a1e70ea0a4 [IMP] website_crm, website_sale: have only one salesteam to handle ecommerce and contact form.
The xml_id is now based on website.
2014-05-13 12:09:24 +02:00
Thibault Delavallée 2b8739cf8b [IMP] website sales salesteam: refactored implementation
- now having a website sales sales team in website_sale;
- temporarily crm accepted as a dependency of website_sale (will be improved when sales team are
taken out of crm);
- removed website_sale_crm unnecessary module + dead code
- removed shopping cart state + its management
- added acquirer and transaction fields on sale order
- azdded use_opportunities and use_quotations fields on sales team like use_leads
2014-05-12 17:52:10 +02:00
Paramjit Singh Sahota f1dd083521 [MERGE] Merged lp:openobject-addons. 2014-05-08 18:41:39 +05:30
chm@openerp.com d3678bf521 [FIX] website_sale: don't rewrite sale order partner_id with the public user
bzr revid: chm@openerp.com-20140505124702-cq6tvb6h3lgyst99
2014-05-05 14:47:02 +02:00
chm@openerp.com 9e176a977e [FIX] website_sale: apply tax position on checkout signup
bzr revid: chm@openerp.com-20140505092300-l29tc4pum31nqd1h
2014-05-05 11:23:00 +02:00
chm@openerp.com 939b2f2d44 [FIX] website_sale & tour
bzr revid: chm@openerp.com-20140502155124-98xz2b4gd2zzzrkx
2014-05-02 17:51:24 +02:00
chm@openerp.com bbfdc57ad9 [FIX] website_sale: add to cart product => quantity + 1
bzr revid: chm@openerp.com-20140502150842-nitu8tsxd02e6dnh
2014-05-02 17:08:42 +02:00
chm@openerp.com c10800f2f1 [FIX] website_event_sale: multi tickets
bzr revid: chm@openerp.com-20140502140152-hx7ktaf0cg2m7ija
2014-05-02 16:01:52 +02:00
Paramjit Singh Sahota 5e3eb59d0f [MERGE] Merged lp:openobject-addons. 2014-05-02 16:22:26 +05:30
Denis Ledoux 79d4c57877 [MERGE] Forward-port of latest saas-3 bugfixes, up to rev. 9439 revid:dle@openerp.com-20140429112147-hqfqd0y487s817n7
bzr revid: dle@openerp.com-20140429112738-y2el246dmd2o2zy9
2014-04-29 13:27:38 +02:00
chm@openerp.com 36fc910e48 [FIX] website_sale: apply new pricelist and fiscal position after signup.
bzr revid: chm@openerp.com-20140428102857-41lfs08v1crudnco
2014-04-28 12:28:57 +02:00
chm@openerp.com bb2ebf7cb9 [FIX] website_sale: apply fiscal position on change product id and update cart.
[IMP] sale: apply fiscal position of the partner if they are not fiscal position defined

bzr revid: chm@openerp.com-20140428093609-8z8my9vj322shcll
2014-04-28 11:36:09 +02:00
Denis Ledoux 22edf72dc1 [FIX] website_sale: fiscal_position must be passed to product_id_change in order to compute taxes correctly
bzr revid: dle@openerp.com-20140425145739-3s7wgsc6l0re3lhe
2014-04-25 16:57:39 +02:00
chm@openerp.com edaed14f3f [FIX] website_sale: apply tax
bzr revid: chm@openerp.com-20140425133403-g94w1yaj56k9whr5
2014-04-25 15:34:03 +02:00
Paramjit Singh Sahota 97711ed282 [ImP] Improved typo's AND searched the section_id direct from the xml id AND directly inserted the state on the 2nd position in sale.order rather than declaring the states again. 2014-04-17 10:45:01 +05:30
chm@openerp.com 7298130f31 [MERGE] from trunk
bzr revid: chm@openerp.com-20140410152925-ndajhnyh4rt8pkgu
2014-04-10 17:29:25 +02:00
chm@openerp.com 81cfa028e5 [FIX] website_sale: checkout shipping address; remove url terminal slash
bzr revid: chm@openerp.com-20140410143524-zrrsh6zvvrg9ntgz
2014-04-10 16:35:24 +02:00