Commit Graph
25 Commits
Author SHA1 Message Date
Romain Derie be2f558019 [IMP] models, website: allow get_base_url() on empty recordset
Before this commit, `get_base_url()` could not be called on an empty recordset.
It might be called on an empty recordset for instance when getting the paypal
payment endpoint URLs.
This commit allows that and returns the ICP value in that case.

The goal is to always use the util method `get_base_url()` instead of directly
accessing the ICP.

closes odoo/odoo#68201

Related: odoo/enterprise#17538
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-06-02 10:04:29 +00:00
Romain Derie 92175d3341 [IMP] *: replace web.base.url ICP by helper method
Previous commit introduce an helper to get the most suited URL for a record
instead of always using the ICP, which is not correct in a website context.

This commit replaces calls to ICP by the helper method.

Community: https://github.com/odoo/odoo/pull/68201
Enterprise: https://github.com/odoo/enterprise/pull/17538
Upgrade: https://github.com/odoo/upgrade/pull/2372

task-2476101
2021-06-02 10:04:29 +00:00
Antoine Vandevenne (anv)andVictor Feyens 573ed74c12 [REF] payment, *: refactor online payments API
This commit replaces the old online payments API of the `payment`
module with the new one and adapts to it all the implementing modules.

See the merge commit for more details.

task-2085989
task-2119838
task-2165982
task-2289255

Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-03-30 09:25:51 +02:00
Christophe Simonis 3faea8fbf8 [MERGE] forward port branch saas-12.4 up to f26de445e5 2019-08-21 10:10:11 +02:00
Romain Derie 2f361bec36 [FIX] website(_*): better ondelete management on website_id
Before this commit, every model having website_id would have the default
`set null` as ondelete value for that field. Exception for `ir.ui.view` and
`website.redirect` which are set to `cascade`.

This meant that deleting a website would basically transform all its specific
records into generic ones.
That would lead to unwanted behavior, such as multiple `ir.attachment` with
same URL, when 2 websites had been theme-customized. Deleting one of the
website would result in later crashes when trying to open theme customization
in the remaining website(s), since those website would find their specific scss
custom attachment as well as the generic one from the deleted website.

Probably more behavior might be problematic when deleting a website before this
commit.

To summarize the choice of this commit implementation, every model not existing
outside website module are set to `cascade` (website.redirect, website.menu,
product.wishlist..).
The rest should be in restrict, as we don't want to delete a whole forum, blog
or job, which should probably be managed case by case to decide what to do.
Thus, restrict is a good choice to notify user of what should be handled.

Some exception remains, ir.ui.view should be delete on cascade while sale.order
should be set to null.

opw-2038414
opw-2035249

closes odoo/odoo#35398

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-13 10:02:32 +00:00
Prakash Prajapati c058562d73 [IMP] various: Add multi company domains on views
When the many2xxx field relates to a model where company_id is required, set
this  domain [('company_id','=',company_id.id)]

When the company_id field of the related model is not required, set this domain
['|',('company_id','=',company_id.id),('company_id','=',False)]

When setting the domain on a field which is in the treeview of a xxx2many field
evaluate against the company_id of the 'parent'.

Some constraints have been added on sereval models. Take a look at the complete
specification for more details.

TaskID: 2024446
Closes: #35266

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:17:28 +00:00
Jeremy Kersten 70d18276ec [IMP] website_payment: make it website specific
Allow to specity on a payment acquirer on if it is specific to one website or common to all.
2018-08-25 00:03:01 +02:00
Nirali SapraandDharmraj b2fefbd3c5 [IMP] portal, website, website_*: make footer content easy to customize
Previously, customizing the website footer was not very easy. This
commit will allow users to customize the footer like any other
snippet area.

There are several behavior changes, as mentioned below:

- Removed toggles 'Automatic Footer' and 'Payment Icons' from the
  Customize menu
- Language Selector was moved near the 'Copyright' section of the footer
  and features a dropdown (dropup technically) to select the language
- Moved some footer links from various modules to top menu
  List of the added menus / changed menus:
    (a) Resellers (new menu for previous footer link 'Resellers')
    (b) References (new menu for previous footer link 'Our References')
    (c) Forums (renamed from 'Forum', as a replacement of 'Forums'
        footer link, showing all the forums instead of 'Help', as there
        is no link available to all forums after this commit)
    (d) Live Support (new menu for previous footer link
        'Livechat Support')
    (e) Mailing Lists (new menu for previous footer link 'Mailing List')
    (f) Members (new menu for previous footer link 'Members')
- Links which were already available as a website menus (Presentations,
  Jobs, Events, News, Documentation, etc) are simply removed

Technical Notes:

- Introduced a new template called 'brand_promotion' in website.
  This will help to avoid adding redundant footer content (like
  copyright, language selector etc) from several modules (website_sale,
  website_event, website_quote, etc) while the only intention is to
  replace module page links.
- Removed summernote related fix in portal.less (caused by xpath)
  because footer is now customizable and added padding to structure
  instead of footer itself so that bg-color/img can be applied on
  whole footer.
- Few of the tours are improved to drag and drop snippets at proper
  places and not inside the footer.
- Used Flex in copyright portion of footer, so that text will always be
  horizontally centered (Some themes have different padding for buttons,
  etc, so if we don't align text dynamically, it has to be managed in
  particular theme and in particular layouts like full-screen / boxed.
  And if someone changes height of this portion, we have to re-design
  this portion again, etc).

task-38069
Closes https://github.com/odoo/odoo/pull/22298

Co-authored-by: Dharmraj <dja@odoo.com>
2018-05-29 11:13:28 +02:00
tbe-odoo be650c5979 [IMP] Fixing the code to fit the reviews 2017-08-29 17:16:42 +02:00
tbe-odoo ad095e492f [IMP] payment,website_payment: Change payment.option model name to payment.icon 2017-08-29 17:16:42 +02:00
tbe-odoo 64ae5e2bc3 [IMP] payment: Supported payment options
- Added the ability to specify which payment option each payment acquirer supports and,
    displays those payment option on e-commerce footer.
2017-08-29 17:11:23 +02:00
Thibault Delavallée faa9ace977 [REF] website_payment: remove website published mixin on payment acquirer
Indeed payment module already adds a website_published button to ease
acquirer management directly in payment without link to website. The
mixin added in website_payment adds a website_url field that has no use
for payment acquirers and is not used at all in the current codebase.
As there is no website url the website publish button method is not
different than the one already implemented in payment. There is
therefore no need for this override, lessening model code in
website payment.
2017-06-06 11:05:33 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
ptr 5b79505bb1 [IMP] account*: Improve the settings form view 2016-12-29 15:46:37 +01:00
Christophe Simonis f4738e7bb5 [MERGE] forward port branch saas-12 up to 78e9c7f 2016-08-26 18:06:17 +02:00
Joren Van Onder cae2c74985 [FIX] website_{payment,portal_sale}: move code depending on sale
From website_payment to website_portal_sale.
2016-08-24 11:19:15 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Joren Van Onder 65b1220008 [IMP] website_payment: when invoicing always ignore invoice policy
Sale orders created through the website that have to be automatically
invoiced should ignore the delivery invoicing policy.

Otherwise you can end up with either an invoice not being generated at
all. This means the user has to manually generate and add the payment to
it. Even worse is if only some purchased products have invoice policy
delivery. In this case a partial invoice would be generated to which the
payment would be added, leading to a mismatch between invoice total and
payment amount.
2016-06-17 13:09:18 +02:00
Joren Van Onder 8a761721d1 [IMP] payment: add options to automatically confirm SO's through website
Introduces two new options:
- confirm_so: to confirm the sale order on acquirer confirmation
- generate_and_pay_invoice: confirm_so + generation of invoice and
                            payment registration
2016-06-17 13:09:18 +02:00
Joren Van Onder 303e585371 [IMP] website_*: consolidate some duplicate payment logic
website_sale and website_quote both did their own
form_feedback. This causes issues because:

1. it would force upcoming features to have to be duplicated as well
2. there's a risk that improvements/bug fixes will only be applied to
one module, an example of this happening is
46c5f93b6c.
2016-06-17 13:09:18 +02:00
Yannick Tivisse ab833656bc [FIX] crm,website_payment: group_configuration doesn't exist anymore
The goal of commits
https://github.com/odoo/odoo/commit/56a06b73f25ba31ff8c33b04e3af33eb8722f7d3
https://github.com/odoo/odoo/commit/f4006d22ef29ebeb04ce2dfea6670cca4e1cb98e

were to allow admistration users others than 'Administrators' to
create ir.values. As the lowest group 'group_configuration' doesn't
exist anymore since saas-10, we use sudo if the user has the new
lowest access right, which is erp_manager

See https://github.com/odoo/odoo/commit/fdb3ad7082a572d71182b9460b274b94c6bd7560
2016-06-09 10:01:32 +02:00
Denis Ledoux 56a06b73f2 [FIX] website_payment: set default payment acquirer for configuration users
By default, users other than the admin cannot create
default values for all users,
`ir.values` for all users can only be created as sudo.

opw-672400
2016-03-21 10:30:03 +01:00
Damien Bouvy f341ca62ab [IMP] website_payment: generic payment controller
- generate payment from the frontend using a simple form
- send a payment with a simple url
- define a default provider for payments
2015-09-04 16:08:22 +02:00
Antony Lesuisse 4a3a3e5f3a [FIX] payment: Move website_published field to website_payment
We have to keep website_published defined in payemnt so that demo data publish
only payment_transfer for the website_sale tour.
2015-08-06 00:14:24 +02:00
Jeremy Kersten d6a30df5cc [IMP] website_payment: add payment method in footer
(optionnal and desactivate by defaut)

Add all acquirers published in the automatic footer
2015-06-10 21:50:50 +02:00