Skip to content

Commit

Permalink
Merge pull request #1 from OCA/8.0
Browse files Browse the repository at this point in the history
8.0 update to OCA 8.0
  • Loading branch information
andrius-preimantas committed Mar 7, 2016
2 parents 4074d05 + 21c0e2b commit 8e6a096
Show file tree
Hide file tree
Showing 80 changed files with 133 additions and 35 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,47 @@ This project aim to deal with modules related to manage purchase and their relat
- Choose the cheapest supplier
- Add validation step
- ...

[//]: # (addons)
Available addons
----------------
addon | version | summary
--- | --- | ---
[framework_agreement](framework_agreement/) | 8.0.2.0.0 | Long Term Agreement (or Framework Agreement) for purchases
[procurement_batch_generator](procurement_batch_generator/) | 8.0.0.1.0 | Wizard to create procurements from product variants
[product_by_supplier](product_by_supplier/) | 8.0.1.0 | Show products grouped by suppliers
[product_supplierinfo_discount](product_supplierinfo_discount/) | 8.0.1.0.0 | Discounts in product supplier info
[purchase_all_shipments](purchase_all_shipments/) | 8.0.1.0.0 | Purchase All Shipments
[purchase_delivery_address](purchase_delivery_address/) | 8.0.1.1.0 | Deprecated: install purchase_transport_multi_address and stock_transport_multi_address instead
[purchase_discount](purchase_discount/) | 8.0.1.1 | Purchase order lines with discounts
[purchase_fiscal_position_update](purchase_fiscal_position_update/) | 8.0.1.0.0 | Changing the fiscal position of a purchase order will auto-update purchase order lines
[purchase_last_price_info](purchase_last_price_info/) | 8.0.1.0.0 | Product Last Price Info - Purchase
[purchase_order_reorder_lines](purchase_order_reorder_lines/) | 8.0.1.0.1 | Purchase order lines with sequence number
[purchase_order_revision](purchase_order_revision/) | 8.0.1.0.0 | Purchase order revisions
[purchase_order_type](purchase_order_type/) | 8.0.1.0.0 | Purchase Order Type
[purchase_origin_address](purchase_origin_address/) | 8.0.1.0.0 | Deprecated: use purchase_transport_multi_address from OCA/stock-logistics-transport
[purchase_partial_invoicing](purchase_partial_invoicing/) | 8.0.0.1.1 | Purchase partial invoicing
[purchase_partner_invoice_method](purchase_partner_invoice_method/) | 8.0.1.0.0 | Adds supplier invoicing control on partner form
[purchase_requisition_auto_rfq](purchase_requisition_auto_rfq/) | 8.0.0.2.0 | Automatically create RFQ from a purchase requisition
[purchase_requisition_auto_rfq_bid_selection](purchase_requisition_auto_rfq_bid_selection/) | 8.0.0.1.0 | Bridge module for PR Auto RFQ / Bid Selection
[purchase_requisition_bid_selection](purchase_requisition_bid_selection/) | 8.0.2.1.0 | Purchase Requisition Bid Selection
[purchase_requisition_delivery_address](purchase_requisition_delivery_address/) | 8.0.0.2.0 | Deprecated: install purchase_requisition_transport_multi_address instead
[purchase_requisition_multicurrency](purchase_requisition_multicurrency/) | 8.0.0.1.0 | Purchase Requisition Multicurrency
[purchase_requisition_transport_document](purchase_requisition_transport_document/) | 8.0.0.1.0 | Add Transport Documents to Purchase Requisitions
[purchase_rfq_bid_workflow](purchase_rfq_bid_workflow/) | 8.0.0.3.0 | Improve the purchase workflow to manage RFQ, Bids, and Orders
[purchase_transport_document](purchase_transport_document/) | 8.0.0.1.0 | Add a new Transport Document object in the Purchase Order
[vendor_consignment_stock](vendor_consignment_stock/) | 8.0.0.2.0 | Manage stock in our warehouse that is owned by a vendor

Unported addons
---------------
addon | version | summary
--- | --- | ---
[mrp_smart_purchase](mrp_smart_purchase/) | 0.2 (unported) | Smart MRP Purchase based on supplier price
[purchase_delivery_term](purchase_delivery_term/) | 0.2 (unported) | Delivery term for purchase orders
[purchase_group_hooks](purchase_group_hooks/) | 0.1 (unported) | Add hooks to the merge PO feature.
[purchase_group_orders](purchase_group_orders/) | 0.4 (unported) | Purchase Group Orders by Shop and Carrier
[purchase_landed_costs](purchase_landed_costs/) | 1.0.1 (unported) | Purchase Landed Costs
[purchase_multi_picking](purchase_multi_picking/) | 0.2 (unported) | Multi Pickings from Purchase Orders
[purchase_order_force_number](purchase_order_force_number/) | 0.1 (unported) | Force purchase orders numeration

[//]: # (end addons)
2 changes: 1 addition & 1 deletion framework_agreement/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
##############################################################################
{'name': 'Framework Agreement',
'summary': 'Long Term Agreement (or Framework Agreement) for purchases',
'version': '2.0',
'version': '8.0.2.0.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
'maintainer': 'Camptocamp',
'category': 'Purchase Management',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion procurement_batch_generator/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

{
'name': 'Procurement Batch Generator',
'version': '0.1',
'version': '8.0.0.1.0',
'category': 'Warehouse Management',
'license': 'AGPL-3',
'summary': 'Wizard to create procurements from product variants',
Expand Down
15 changes: 14 additions & 1 deletion product_by_supplier/views/product_supplierinfo_view.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.common.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<field name="seller_ids" position="attributes">
<attribute name="context">{'from_product_form':True}</attribute>
</field>
</field>
</record>

<record id="view_product_supplierinfo_search" model="ir.ui.view">
<field name="name">product.supplierinfo.search</field>
<field name="model">product.supplierinfo</field>
Expand Down Expand Up @@ -47,7 +58,9 @@
<field name="priority">99</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='sequence']" position="before">
<field name="product_tmpl_id" string="Product"/>
<field name="product_tmpl_id" string="Product"
invisible="context.get('from_product_form')"
required="not context.get('from_product_form')"/>
</xpath>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion product_supplierinfo_discount/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

{
"name": "Discounts in product supplier info",
"version": "1.0",
"version": "8.0.1.0.0",
"author": "Serv. Tecnol. Avanzados - Pedro M. Baeza, "
"Antiun Ingeniería S.L., "
"Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion product_supplierinfo_discount/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def onchange_product_id(
('name', 'child_of', partner.commercial_partner_id.id)])
if not sinfos:
return res
seller_uom = sinfos.product_uom.id or False
seller_uom = sinfos[:1].product_uom.id or False
if seller_uom and from_uom and from_uom != seller_uom:
qty_in_product_uom = product_uom_obj._compute_qty(
from_uom, qty, to_uom_id=seller_uom)
Expand Down
2 changes: 1 addition & 1 deletion purchase_all_shipments/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{'name': 'Purchase All Shipments',
'version': '1.0',
'version': '8.0.1.0.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Purchases',
'license': 'AGPL-3',
Expand Down
2 changes: 1 addition & 1 deletion purchase_delivery_address/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{'name': 'Purchase Delivery Address [DEPRECATED]',
'summary': 'Deprecated: install purchase_transport_multi_address and '
'stock_transport_multi_address instead',
'version': '1.1',
'version': '8.0.1.1.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Purchase Management',
'license': 'AGPL-3',
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
],
"demo": [],
"active": False,
"installable": True
"installable": False
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion purchase_fiscal_position_update/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

{
'name': 'Purchase Fiscal Position Update',
'version': '1.0',
'version': '8.0.1.0.0',
'category': 'Purchase Management',
'license': 'AGPL-3',
'summary': 'Changing the fiscal position of a purchase order will '
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
""",
'website': 'http://www.camptocamp.com/',
'data': [],
'installable': True,
'installable': False,
'auto_install': False,
'license': 'AGPL-3',
'application': False,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
'test/landed_costs_multicurrency_pricetype.yml',
],
'demo': [],
'installable': True,
'installable': False,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
],
"demo": [],
"active": False,
"installable": True
"installable": False
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
],
"demo": [],
"active": False,
"installable": True
"installable": False
}
5 changes: 5 additions & 0 deletions purchase_order_revision/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-

from . import model


def fill_unrevisioned_name(cr, registry):
cr.execute("UPDATE purchase_order set unrevisioned_name=name "
"WHERE unrevisioned_name IS NULL")
6 changes: 3 additions & 3 deletions purchase_order_revision/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

{
'name': "Purchase order revisions",
'version': '1.0',
'version': '8.0.1.0.0',
'category': 'Purchase Management',
'author': "Agile Business Group,"
"Camptocamp,"
Expand All @@ -36,6 +36,6 @@
"test": [
'test/purchase_order.yml',
],
"active": False,
"installable": True
"installable": True,
"post_init_hook": 'fill_unrevisioned_name',
}
9 changes: 5 additions & 4 deletions purchase_order_revision/model/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from openerp.tools.translate import _


class purchase_order(models.Model):
class PurchaseOrder(models.Model):
_inherit = "purchase.order"

current_revision_id = fields.Many2one('purchase.order',
Expand All @@ -38,7 +38,7 @@ class purchase_order(models.Model):
revision_number = fields.Integer('Revision',
copy=False)
unrevisioned_name = fields.Char('Order Reference',
copy=True,
copy=False,
readonly=True)
active = fields.Boolean('Active',
default=True,
Expand All @@ -65,8 +65,9 @@ def new_revision(self):
'active': False,
'state': 'cancel',
'current_revision_id': self.id,
'unrevisioned_name': self.unrevisioned_name,
}
old_revision = super(purchase_order, self).copy(default=defaults)
old_revision = super(PurchaseOrder, self).copy(default=defaults)
self.action_cancel_draft()
msg = _('New revision created: %s') % self.name
self.message_post(body=msg)
Expand All @@ -80,4 +81,4 @@ def create(self, values):
seq = self.env['ir.sequence']
values['name'] = seq.next_by_code('purchase.order') or '/'
values['unrevisioned_name'] = values['name']
return super(purchase_order, self).create(values)
return super(PurchaseOrder, self).create(values)
29 changes: 29 additions & 0 deletions purchase_order_revision/test/purchase_order.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,32 @@
assert po.revision_number == 1, "Revision number should be 1, %s found" % po.revision_number
new_name = '%s-01' % old_name
assert po.name == new_name, "New name should be %s, %s found" % (new_name, po.name)
-
I cancel an existing demo PO and create a new revision
-
!python {model: purchase.order}: |
po = self.browse(cr, uid, ref('purchase.purchase_order_1'))
old_name = po.name
self.action_cancel(cr, uid, [ref('purchase.purchase_order_1')])
action = self.new_revision(cr, uid, [ref('purchase.purchase_order_1')])
po.refresh()
assert po.old_revision_ids, "Old revisions not set"
assert po.revision_number == 1, "Revision number should be 1, %s found" % po.revision_number
new_name = '%s-01' % old_name
assert po.name == new_name, "New name should be %s, %s found" % (new_name, po.name)
-
I test that the standard duplicate button does not compromise new revisions
-
!python {model: purchase.order}: |
purchase_order_1_id = ref('purchase.purchase_order_1')
self.action_cancel(cr, uid, [purchase_order_1_id])
new_id = self.copy(cr, uid, purchase_order_1_id)
po = self.browse(cr, uid, new_id)
old_name = po.name
self.action_cancel(cr, uid, [new_id])
self.new_revision(cr, uid, [new_id])
po.refresh()
assert po.old_revision_ids, "Old revisions not set"
assert po.revision_number == 1, "Revision number should be 1, %s found" % po.revision_number
new_name = '%s-01' % old_name
assert po.name == new_name, "New name should be %s, %s found" % (new_name, po.name)
2 changes: 1 addition & 1 deletion purchase_order_type/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
#
{'name': 'Purchase Order Type',
'version': '1.0',
'version': '8.0.1.0.0',
'author': 'Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'Purchase Management',
Expand Down
2 changes: 1 addition & 1 deletion purchase_origin_address/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{'name': 'Purchase Origin Address [DEPRECATED]',
'summary': 'Deprecated: use purchase_transport_multi_address '
'from OCA/stock-logistics-transport',
'version': '1.0',
'version': '8.0.1.0.0',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Purchase Management',
'license': 'AGPL-3',
Expand Down
2 changes: 2 additions & 0 deletions purchase_partial_invoicing/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ To install this module, you need to:

* Click on install button

This module depends on base_suspend_security module which can be found on apps.odoo.com or on the OCA/server-tools github repository.

Usage
=====

Expand Down
5 changes: 3 additions & 2 deletions purchase_partial_invoicing/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@

{
'name': "Purchase partial invoicing",
'version': '0.1',
'version': '8.0.0.1.1',
'category': 'Purchase Management',
'author': "Agile Business Group,"
"ACSONE SA/NV,"
"Odoo Community Association (OCA)",
'website': 'http://www.agilebg.com',
'license': 'AGPL-3',
"depends": ['purchase'],
"depends": ['purchase',
'base_suspend_security'],
"data": [
'wizard/po_line_invoice_view.xml',
'wizard/po_line_cancel_quantity_view.xml',
Expand Down
3 changes: 2 additions & 1 deletion purchase_partial_invoicing/purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class AccountInvoice(models.Model):
def invoice_validate(self):
res = super(AccountInvoice, self).invoice_validate()
purchase_order_obj = self.env['purchase.order']
po_ids = purchase_order_obj.search([('invoice_ids', 'in', self.ids)])
po_ids = purchase_order_obj.suspend_security()\
.search([('invoice_ids', 'in', self.ids)])
for purchase_order in po_ids:
for po_line in purchase_order.order_line:
if po_line.invoiced_qty != po_line.product_qty:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class testPurchasePartialInvoicing(common.TransactionCase):

def setUp(self):
super(testPurchasePartialInvoicing, self).setUp()
# tests are called before register_hook
self.env['ir.rule']._register_hook()
self.context = self.env['res.users'].context_get()
self.po_obj = self.env['purchase.order']
self.po_line_obj = self.env['purchase.order.line']
Expand Down
2 changes: 1 addition & 1 deletion purchase_partner_invoice_method/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

{
'name': 'Purchase Partner Invoice Method',
'version': '1.0',
'version': '8.0.1.0.0',
'category': 'Purchase Management',
'license': 'AGPL-3',
'summary': "Adds supplier invoicing control on partner form",
Expand Down
2 changes: 1 addition & 1 deletion purchase_requisition_auto_rfq/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

{"name": "Purchase Requisition Auto RFQ",
"summary": "Automatically create RFQ from a purchase requisition",
"version": "0.2",
"version": "8.0.0.2.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"category": "Purchase Management",
"license": "AGPL-3",
Expand Down
2 changes: 1 addition & 1 deletion purchase_requisition_auto_rfq_bid_selection/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

{"name": "Purchase Requisition Auto RFQ / Bid Selection bridge",
"summary": "Bridge module for PR Auto RFQ / Bid Selection",
"version": "0.1",
"version": "8.0.0.1.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"category": "Purchase Management",
"license": "AGPL-3",
Expand Down
2 changes: 1 addition & 1 deletion purchase_requisition_bid_selection/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

{"name": "Purchase Requisition Bid Selection",
"version": "2.1",
"version": "8.0.2.1.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Purchase Management",
Expand Down
2 changes: 1 addition & 1 deletion purchase_requisition_delivery_address/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{'name': "Purchase Requisition - Delivery Address [DEPRECATED]",
'summary': "Deprecated: "
"install purchase_requisition_transport_multi_address instead",
'version': "0.2",
'version': "8.0.0.2.0",
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': "Purchase Management",
'license': "AGPL-3",
Expand Down
2 changes: 1 addition & 1 deletion purchase_requisition_multicurrency/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
#
{"name": "Purchase Requisition Multicurrency",
"version": "0.1",
"version": "8.0.0.1.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Purchase Management",
Expand Down

0 comments on commit 8e6a096

Please sign in to comment.