[MIG] website_sale_*: migration to new api

Those module were almost already migrated, this commit simply modified the import and the xml tags.
This commit is contained in:
Jérome Maes
2016-07-12 14:29:31 +02:00
parent c8d238093e
commit 09b783794e
13 changed files with 48 additions and 27 deletions
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<template id="cart_delivery" name="Delivery Costs" inherit_id="website_sale.total">
<xpath expr="//div[@id='order_total_untaxed']" position="before">
@@ -65,5 +64,4 @@
</xpath>
</template>
</data>
</openerp>
</odoo>
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="view_delivery_carrier_form_website_delivery">
<record id="view_delivery_carrier_form_website_delivery" model="ir.ui.view">
<field name="name">delivery.carrier.website.form</field>
<field name="model">delivery.carrier</field>
<field name="inherit_id" ref="delivery.view_delivery_carrier_form"/>
@@ -18,6 +19,10 @@
</field>
</record>
<menuitem id="menu_ecommerce_delivery" parent="website_sale.menu_ecommerce_settings" name="Delivery Methods" action="delivery.action_delivery_carrier_form"/>
<menuitem
id="menu_ecommerce_delivery"
parent="website_sale.menu_ecommerce_settings"
name="Delivery Methods"
action="delivery.action_delivery_carrier_form"/>
</odoo>
</odoo>
@@ -4,6 +4,7 @@
import base64
from cStringIO import StringIO
from werkzeug.utils import redirect
from odoo import http
from odoo.http import request
from odoo.addons.website_portal.controllers.main import website_account
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="website_sale_digital.product_1" model="product.template">
<field name="name">Alice's Adventures in Wonderland - Lewis Caroll</field>
<field name="standard_price">2</field>
@@ -9,6 +11,7 @@
<field name="description">Novel by Lewis Caroll.</field>
<field name="description_sale">Alice's Adventures in Wonderland (commonly shortened to Alice in Wonderland) is an 1865 novel written by English author Charles Lutwidge Dodgson under the pseudonym Lewis Carroll. It tells of a girl named Alice falling through a rabbit hole into a fantasy world populated by peculiar, anthropomorphic creatures. The tale plays with logic, giving the story lasting popularity with adults as well as with children. It is considered to be one of the best examples of the literary nonsense genre. Its narrative course and structure, characters and imagery have been enormously influential in both popular culture and literature, especially in the fantasy genre.</field>
</record>
<record id="website_sale_digital.attach1" model="ir.attachment">
<field name="name">alice.pdf</field>
<field name="datas_fname">alice.pdf</field>
@@ -18,4 +21,5 @@
<field name="res_model">product.template</field>
<field name="product_downloadable">True</field>
</record>
</odoo>
@@ -1,8 +1,11 @@
# -*- encoding: utf-8 -*-
from openerp import models
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountInvoiceLine(models.Model):
_inherit = ['account.invoice.line']
def get_digital_purchases(self):
@@ -1,8 +1,11 @@
# -*- encoding: utf-8 -*-
from openerp import models, fields, api, _
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ir_attachment(models.Model):
class Attachment(models.Model):
_inherit = ['ir.attachment']
product_downloadable = fields.Boolean("Downloadable from product portal", default=False)
@@ -1,5 +1,7 @@
# -*- encoding: utf-8 -*-
from openerp import models, fields, api, _
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
class ProductTemplate(models.Model):
+3
View File
@@ -1,2 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import controllers
import models
@@ -1 +1,4 @@
import main
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import main
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<odoo>
<data noupdate="1">
<!-- add Warranty to ipad -->
@@ -55,4 +55,4 @@
<!-- -->
</data>
</openerp>
</odoo>
@@ -1,2 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import product
import sale_order
import sale_order
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<record model="ir.ui.view" id="product_template_form_view">
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.product.website.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="website_sale.product_template_form_view"/>
@@ -13,5 +12,4 @@
</field>
</record>
</data>
</openerp>
</odoo>
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<template id="assets_frontend" inherit_id="website.assets_frontend" name="Shop Product Options">
<xpath expr="." position="inside">
@@ -149,5 +148,4 @@
</xpath>
</template>
</data>
</openerp>
</odoo>