Add Mandatory Field to Odoo WebSite e-commerce

Billing Information

If you need to add some more constraint into your  E-commerce(Billing Information) you have only to crate a simple odoo module.....
overwriting the website_sale object and adding a @property to the field mandatory_billing_fields adding the value that  you would like to check in this way..

from openerp.addons.website_sale.controllers.main import website_sale

class OmniaWebSiteSale(website_sale):
    @property
    def mandatory_billing_fields(self):
        return super(OmniaWebSiteSale,self).mandatory_billing_fields+['vat','street']

enjoy ..

Leave a comment

You must be logged in to post a comment.