[MIG] purchase_collective: Migration to 16.0
This commit is contained in:
parent
27386c71cc
commit
9434c90457
9 changed files with 7 additions and 16 deletions
|
|
@ -19,7 +19,7 @@ El Usuario que crea la orden es el encargado de distribuir los productos al rest
|
||||||
'author': "Criptomart",
|
'author': "Criptomart",
|
||||||
'website': "https://criptomart.net",
|
'website': "https://criptomart.net",
|
||||||
'category': 'Purchase Management',
|
'category': 'Purchase Management',
|
||||||
'version': '0.12.0.1.0',
|
'version': "16.0.1.0.0",
|
||||||
'depends': ["purchase","sale","product","network_partner"],
|
'depends': ["purchase","sale","product","network_partner"],
|
||||||
'data': [
|
'data': [
|
||||||
'security/purchase_collective_security.xml',
|
'security/purchase_collective_security.xml',
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ from operator import attrgetter
|
||||||
from odoo import models, fields, api, osv, _
|
from odoo import models, fields, api, osv, _
|
||||||
from odoo.exceptions import Warning
|
from odoo.exceptions import Warning
|
||||||
from odoo.tools.safe_eval import safe_eval as eval
|
from odoo.tools.safe_eval import safe_eval as eval
|
||||||
import odoo.addons.decimal_precision as dp
|
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
@ -59,12 +58,10 @@ class PurchaseCollectiveOrder(models.Model):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def subscribe(self, partner):
|
def subscribe(self, partner):
|
||||||
self.message_subscribe(partner_ids=[(partner.id)])
|
self.message_subscribe(partner_ids=[(partner.id)])
|
||||||
self.message_post(body=("Order line created by %s" %(partner.name)))
|
self.message_post(body=("Order line created by %s" %(partner.name)))
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def button_details(self):
|
def button_details(self):
|
||||||
context = self.env.context.copy()
|
context = self.env.context.copy()
|
||||||
view_id = self.env.ref(
|
view_id = self.env.ref(
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ class SaleOrder(models.Model):
|
||||||
)
|
)
|
||||||
is_cp = fields.Boolean(string="Is part of a Collective Purchase")
|
is_cp = fields.Boolean(string="Is part of a Collective Purchase")
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def action_confirm(self):
|
def action_confirm(self):
|
||||||
for order in self:
|
for order in self:
|
||||||
order.warehouse_id = order.partner_id.node_id.wh_id
|
order.warehouse_id = order.partner_id.node_id.wh_id
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<odoo>
|
||||||
<data>
|
|
||||||
|
|
||||||
<record model="ir.module.category" id="module_category_purchase_collective_management">
|
<record model="ir.module.category" id="module_category_purchase_collective_management">
|
||||||
<field name="name">Collective Purchase</field>
|
<field name="name">Collective Purchase</field>
|
||||||
|
|
@ -44,5 +43,4 @@
|
||||||
<field name="perm_unlink" eval="False"/>
|
<field name="perm_unlink" eval="False"/>
|
||||||
<field name="perm_create" eval="True"/>
|
<field name="perm_create" eval="True"/>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</odoo>
|
||||||
</openerp>
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
<field name="name">Open</field>
|
<field name="name">Open</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">purchase_collective.order</field>
|
<field name="res_model">purchase_collective.order</field>
|
||||||
<field name="view_type">form</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="context">{
|
<field name="context">{
|
||||||
'search_default_my_sale_orders_filter': 1
|
'search_default_my_sale_orders_filter': 1
|
||||||
|
|
@ -22,7 +21,6 @@
|
||||||
<field name="name">Closed</field>
|
<field name="name">Closed</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">purchase_collective.order</field>
|
<field name="res_model">purchase_collective.order</field>
|
||||||
<field name="view_type">form</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="context">{
|
<field name="context">{
|
||||||
'search_default_my_sale_orders_filter': 1
|
'search_default_my_sale_orders_filter': 1
|
||||||
|
|
@ -39,7 +37,6 @@
|
||||||
<field name="name">Cancelled</field>
|
<field name="name">Cancelled</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">purchase_collective.order</field>
|
<field name="res_model">purchase_collective.order</field>
|
||||||
<field name="view_type">form</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="context">{
|
<field name="context">{
|
||||||
'search_default_my_sale_orders_filter': 1
|
'search_default_my_sale_orders_filter': 1
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="0">
|
<data>
|
||||||
|
|
||||||
<record id="view_partner_network_net_inherit_pc_form" model="ir.ui.view">
|
<record id="view_partner_network_net_inherit_pc_form" model="ir.ui.view">
|
||||||
<field name="name">partner.net.form.wh.view</field>
|
<field name="name">partner.net.form.wh.view</field>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="0">
|
<data>
|
||||||
|
|
||||||
<record id="view_partner_network_node_inherit_pc_form" model="ir.ui.view">
|
<record id="view_partner_network_node_inherit_pc_form" model="ir.ui.view">
|
||||||
<field name="name">partner.node.form.wh.view</field>
|
<field name="name">partner.node.form.wh.view</field>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="0">
|
<data>
|
||||||
|
|
||||||
<record id="purchase_collective_order_form_view" model="ir.ui.view">
|
<record id="purchase_collective_order_form_view" model="ir.ui.view">
|
||||||
<field name="name">purchase.collective.order.form.view</field>
|
<field name="name">purchase.collective.order.form.view</field>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="0">
|
<data>
|
||||||
<record id="view_form_sale_order_cp" model="ir.ui.view">
|
<record id="view_form_sale_order_cp" model="ir.ui.view">
|
||||||
<field name="name">sale order collective purchase extension</field>
|
<field name="name">sale order collective purchase extension</field>
|
||||||
<field name="model">sale.order</field>
|
<field name="model">sale.order</field>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue