Remove modules that will be merged in ***_usability modules or that are not useful in v10
Rename some modules
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Invoice Groupby Commercial Partner module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Account Invoice Groupby Commercial Partner',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Accounting & Finance',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Group by commercial partner instead of partner in invoices',
|
|
||||||
'description': """
|
|
||||||
Account Invoice Group-by Commercial Partner
|
|
||||||
===========================================
|
|
||||||
|
|
||||||
By default Odoo v8 makes a groupby on partner_id on invoice ; this module changes this to groupby commercial_partner_id.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['account'],
|
|
||||||
'data': ['account_invoice_view.xml'],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_account_invoice_filter" model="ir.ui.view">
|
|
||||||
<field name="name">account.invoice.groupby.commercial.partner</field>
|
|
||||||
<field name="model">account.invoice</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<filter name="group_by_partner_id" position="attributes">
|
|
||||||
<attribute name="context">{'group_by':'commercial_partner_id'}</attribute>
|
|
||||||
</filter>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_account_invoice_report_search" model="ir.ui.view">
|
|
||||||
<field name="name">account.invoice.groupby.commercial.partner.invoice.report</field>
|
|
||||||
<field name="model">account.invoice.report</field>
|
|
||||||
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<filter name="partner_id" position="attributes">
|
|
||||||
<attribute name="context">{'group_by':'commercial_partner_id','residual_visible':True}</attribute>
|
|
||||||
</filter>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Invoice Picking Label module for OpenERP
|
|
||||||
# Copyright (C) 2013-2014 Akretion
|
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from . import account_invoice
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Invoice Picking Label module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion
|
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Account Invoice Picking Label',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Accounting & Finance',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Adds field picking_ids_label on account.invoice',
|
|
||||||
'description': """
|
|
||||||
Account Invoice Picking Label
|
|
||||||
=============================
|
|
||||||
|
|
||||||
Adds a function field named *picking_ids_label* on invoices. This field contains the list of pickings related to the invoice as a string. This field is designed to be displayed in the invoice report.""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com/',
|
|
||||||
'depends': ['stock_account'],
|
|
||||||
'data': [],
|
|
||||||
'installable': True,
|
|
||||||
'active': False,
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Invoice Picking Label module for OpenERP
|
|
||||||
# Copyright (C) 2013-2014 Akretion
|
|
||||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp.osv import orm, fields
|
|
||||||
|
|
||||||
|
|
||||||
class account_invoice(orm.Model):
|
|
||||||
_inherit = "account.invoice"
|
|
||||||
|
|
||||||
def _compute_picking_ids_label(
|
|
||||||
self, cr, uid, ids, name, arg, context=None):
|
|
||||||
res = {}
|
|
||||||
for invoice in self.read(
|
|
||||||
cr, uid, ids, ['picking_ids'], context=context):
|
|
||||||
label = ''
|
|
||||||
if invoice['picking_ids']:
|
|
||||||
pickings = self.pool['stock.picking'].read(
|
|
||||||
cr, uid, invoice['picking_ids'], ['name'],
|
|
||||||
context=context)
|
|
||||||
first = True
|
|
||||||
for picking in pickings:
|
|
||||||
if first:
|
|
||||||
label += picking['name']
|
|
||||||
first = False
|
|
||||||
else:
|
|
||||||
label += ', %s' % picking['name']
|
|
||||||
res[invoice['id']] = label
|
|
||||||
return res
|
|
||||||
|
|
||||||
_columns = {
|
|
||||||
'picking_ids_label': fields.function(
|
|
||||||
_compute_picking_ids_label, type='char', string='Pickings'),
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Invoice Sale Link module for OpenERP
|
|
||||||
# Copyright (C) 2013 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from . import account_invoice
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Invoice Sale Link module for OpenERP
|
|
||||||
# Copyright (C) 2013 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Account Invoice Sale Link',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Accounting & Finance',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Add the reverse link from invoices to sale orders',
|
|
||||||
'description': """
|
|
||||||
Account Invoice Sale Link
|
|
||||||
=========================
|
|
||||||
|
|
||||||
On the customer invoice report, you usually need to display the customer order number. For that, you need to have the link from invoices to sale orders, and this link is not available in the official addons.
|
|
||||||
|
|
||||||
This module adds a field *sale_ids* on the object account.invoice, which is the reverse many2many field of the field *invoice_ids* of the object sale.order. It is displayed in a dedicated tab on the invoice form view.
|
|
||||||
|
|
||||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['sale'],
|
|
||||||
'data': ['account_invoice_view.xml'],
|
|
||||||
'installable': True,
|
|
||||||
'active': False,
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Invoice Sale Link module for OpenERP
|
|
||||||
# Copyright (C) 2013 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp.osv import orm, fields
|
|
||||||
|
|
||||||
|
|
||||||
class account_invoice(orm.Model):
|
|
||||||
_inherit = 'account.invoice'
|
|
||||||
|
|
||||||
_columns = {
|
|
||||||
# This is the reverse link of the field 'invoice_ids' of sale.order
|
|
||||||
# defined in addons/sale/sale.py
|
|
||||||
'sale_ids': fields.many2many(
|
|
||||||
'sale.order', 'sale_order_invoice_rel', 'invoice_id',
|
|
||||||
'order_id', 'Sale Orders', readonly=True,
|
|
||||||
help="This is the list of sale orders related to this invoice."),
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="invoice_form" model="ir.ui.view">
|
|
||||||
<field name="name">account_invoice_sale_link.invoice.form</field>
|
|
||||||
<field name="model">account.invoice</field>
|
|
||||||
<field name="inherit_id" ref="account.invoice_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<notebook position="inside">
|
|
||||||
<page name="sale_ids" string="Sale Orders">
|
|
||||||
<field name="sale_ids"/>
|
|
||||||
</page>
|
|
||||||
</notebook>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Payment Force Maturity Date module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
from . import payment_line
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Payment Force Maturity Date module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Account Payment Force Maturity Date',
|
|
||||||
'version': '1.0',
|
|
||||||
'category': 'Accounting & Finance',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Add a Force Maturity Date field on payment lines',
|
|
||||||
'description': """
|
|
||||||
Account Payment Force Maturity Date
|
|
||||||
===================================
|
|
||||||
|
|
||||||
This module adds a field *Force Maturity Date* on payment lines. If this field is set, the maturity date of the payment line will take the value of this field instead of taking the value of the maturity date of the related account move line.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'depends': ['account_payment'],
|
|
||||||
'data': ['payment_view.xml'],
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * account_payment_force_maturity_date
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2015-05-06 15:02+0000\n"
|
|
||||||
"PO-Revision-Date: 2015-05-06 15:02+0000\n"
|
|
||||||
"Last-Translator: <>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: account_payment_force_maturity_date
|
|
||||||
#: field:payment.line,force_maturity_date:0
|
|
||||||
msgid "Force Due Date"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: account_payment_force_maturity_date
|
|
||||||
#: model:ir.model,name:account_payment_force_maturity_date.model_payment_line
|
|
||||||
msgid "Payment Line"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * account_payment_force_maturity_date
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2015-05-06 15:03+0000\n"
|
|
||||||
"PO-Revision-Date: 2015-05-06 15:03+0000\n"
|
|
||||||
"Last-Translator: <>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: account_payment_force_maturity_date
|
|
||||||
#: field:payment.line,force_maturity_date:0
|
|
||||||
msgid "Force Due Date"
|
|
||||||
msgstr "Force la date d'échéance"
|
|
||||||
|
|
||||||
#. module: account_payment_force_maturity_date
|
|
||||||
#: model:ir.model,name:account_payment_force_maturity_date.model_payment_line
|
|
||||||
msgid "Payment Line"
|
|
||||||
msgstr "Ligne de paiement"
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Payment Force Maturity Date module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
from openerp import models, fields, api
|
|
||||||
|
|
||||||
|
|
||||||
class PaymentLine(models.Model):
|
|
||||||
_inherit = 'payment.line'
|
|
||||||
|
|
||||||
@api.one
|
|
||||||
@api.depends(
|
|
||||||
'move_line_id', 'move_line_id.date_maturity', 'force_maturity_date')
|
|
||||||
def _compute_ml_maturity_date(self):
|
|
||||||
ml_maturity_date = False
|
|
||||||
if self.force_maturity_date:
|
|
||||||
ml_maturity_date = self.force_maturity_date
|
|
||||||
elif self.move_line_id:
|
|
||||||
ml_maturity_date = self.move_line_id.date_maturity
|
|
||||||
self.ml_maturity_date = ml_maturity_date
|
|
||||||
|
|
||||||
ml_maturity_date = fields.Date(compute='_compute_ml_maturity_date')
|
|
||||||
force_maturity_date = fields.Date(string='Force Due Date')
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_payment_order_form" model="ir.ui.view">
|
|
||||||
<field name="name">hide.communication2.on.payment.line.form</field>
|
|
||||||
<field name="model">payment.order</field>
|
|
||||||
<field name="inherit_id" ref="account_payment.view_payment_order_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//field[@name='line_ids']/form//field[@name='ml_inv_ref']" position="after">
|
|
||||||
<field name="force_maturity_date"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Payment Hide Communication2 module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Payment Hide Communication2 module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Account Payment Hide Communication2',
|
|
||||||
'version': '1.0',
|
|
||||||
'category': 'Accounting & Finance',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Hide the field Communication2 on Payment Lines',
|
|
||||||
'description': """
|
|
||||||
Account Payment Hide Communication2
|
|
||||||
===================================
|
|
||||||
|
|
||||||
This module hides the field 'Communication2' on the form view of Payment Lines. I consider that is field is useless and tend to confuse users.
|
|
||||||
|
|
||||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'depends': ['account_payment'],
|
|
||||||
'data': [
|
|
||||||
'payment_view.xml',
|
|
||||||
],
|
|
||||||
'active': False,
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_payment_order_form" model="ir.ui.view">
|
|
||||||
<field name="name">hide.communication2.on.payment.line.form</field>
|
|
||||||
<field name="model">payment.order</field>
|
|
||||||
<field name="inherit_id" ref="account_payment.view_payment_order_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//field[@name='line_ids']/form//field[@name='communication2']" position="attributes">
|
|
||||||
<attribute name="invisible">1</attribute>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import account_voucher
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Voucher Default Amount module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Account Voucher Default Amount',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Accounting & Finance',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Set a default amount on Customer Payments',
|
|
||||||
'description': """
|
|
||||||
Account Voucher Default Amount
|
|
||||||
==============================
|
|
||||||
|
|
||||||
With this module, when you select a Customer in a Customer Payment, the Amount will be set by default to the total Open Balance.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['account_voucher'],
|
|
||||||
'data': [],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Account Voucher Default Amount module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models
|
|
||||||
|
|
||||||
|
|
||||||
class AccountVoucher(models.Model):
|
|
||||||
_inherit = 'account.voucher'
|
|
||||||
|
|
||||||
def onchange_partner_id(
|
|
||||||
self, cr, uid, ids, partner_id, journal_id, amount,
|
|
||||||
currency_id, ttype, date, context=None):
|
|
||||||
res = super(AccountVoucher, self).onchange_partner_id(
|
|
||||||
cr, uid, ids, partner_id, journal_id, amount,
|
|
||||||
currency_id, ttype, date, context=context)
|
|
||||||
if (
|
|
||||||
partner_id and not amount and ttype == 'receipt'
|
|
||||||
and res.get('value') and res['value'].get('line_cr_ids')):
|
|
||||||
total_open_bal = 0.0
|
|
||||||
for line in res['value']['line_cr_ids']:
|
|
||||||
total_open_bal += line['amount_unreconciled']
|
|
||||||
if res['value'].get('line_dr_ids'):
|
|
||||||
for line in res['value']['line_dr_ids']:
|
|
||||||
total_open_bal -= line['amount_unreconciled']
|
|
||||||
res['value']['amount'] = total_open_bal
|
|
||||||
return res
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import partner
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Base Fix Display Address module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Base Fix Display Address',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Hidden',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': "Avoid the empty line in address when street2 is not set",
|
|
||||||
'description': """
|
|
||||||
Base Fix Display Address
|
|
||||||
========================
|
|
||||||
|
|
||||||
This module fixes the "empty line in address when street2 is not set" issue when using the method display_address in reports.
|
|
||||||
|
|
||||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['base'],
|
|
||||||
'data': [],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Base Fix Display Address module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models
|
|
||||||
|
|
||||||
|
|
||||||
class ResPartner(models.Model):
|
|
||||||
_inherit = 'res.partner'
|
|
||||||
|
|
||||||
def _display_address(
|
|
||||||
self, cr, uid, address, without_company=False, context=None):
|
|
||||||
'''Remove empty lines'''
|
|
||||||
res = super(ResPartner, self)._display_address(
|
|
||||||
cr, uid, address, without_company=without_company, context=context)
|
|
||||||
while "\n\n" in res:
|
|
||||||
res = res.replace('\n\n', '\n')
|
|
||||||
return res
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
# © 2016 Akretion
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
||||||
|
|
||||||
{
|
|
||||||
'name': 'Module Usability',
|
|
||||||
'version': '8.0.0.0.0',
|
|
||||||
'category': 'Base',
|
|
||||||
'summary': "Module views improved",
|
|
||||||
'description': """
|
|
||||||
Remove 'Application' filter, add group by 'State'
|
|
||||||
|
|
||||||
Why this module ?
|
|
||||||
|
|
||||||
- We don't install Applications modules directly but install lower level modules first
|
|
||||||
- We must take care of modules state: it's a really precious information
|
|
||||||
|
|
||||||
Contributors: David BEAL
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': [
|
|
||||||
'base',
|
|
||||||
],
|
|
||||||
'data': [
|
|
||||||
'view.xml',
|
|
||||||
],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2016-03-16 17:17+0100\n"
|
|
||||||
"PO-Revision-Date: 2016-03-16 17:17+0100\n"
|
|
||||||
"Last-Translator: <>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
"X-Generator: Poedit 1.8.4\n"
|
|
||||||
|
|
||||||
#. module: module_usability
|
|
||||||
#: view:ir.module.module:module_usability.view_module_filter
|
|
||||||
msgid "State"
|
|
||||||
msgstr "Etat"
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * module_usability
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2016-03-16 16:17+0000\n"
|
|
||||||
"PO-Revision-Date: 2016-03-16 16:17+0000\n"
|
|
||||||
"Last-Translator: <>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: module_usability
|
|
||||||
#: view:ir.module.module:module_usability.view_module_filter
|
|
||||||
msgid "State"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 670 B |
@@ -1,32 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_module_filter" model="ir.ui.view">
|
|
||||||
<field name="model">ir.module.module</field>
|
|
||||||
<field name="inherit_id" ref="base.view_module_filter"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//filter[@string='Category']" position="after">
|
|
||||||
<filter string="State" domain="[]" context="{'group_by':'state'}"/>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="base.open_module_tree" model="ir.actions.act_window">
|
|
||||||
<field name="res_model">ir.module.module</field>
|
|
||||||
<field name="context">{}</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- After installation of the module, open the adhoc menu -->
|
|
||||||
<record id="action_client_module_usabi_menu" model="ir.actions.client">
|
|
||||||
<field name="name">Open Module Usability Menu</field>
|
|
||||||
<field name="tag">reload</field>
|
|
||||||
<field name="params" eval="{'menu_id': ref('base.menu_module_tree')}"/>
|
|
||||||
</record>
|
|
||||||
<record id="base.open_menu" model="ir.actions.todo">
|
|
||||||
<field name="action_id" ref="action_client_module_usabi_menu"/>
|
|
||||||
<field name="state">open</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Purchase Line Product Required module for Odoo
|
|
||||||
# Copyright (C) 2016 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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 Order Line Product Required',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Purchase Management',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Product becomes a required field on purchase order lines',
|
|
||||||
'description': """
|
|
||||||
Purchase Order Line Product Required
|
|
||||||
====================================
|
|
||||||
|
|
||||||
Product becomes a required field on purchase order lines.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion
|
|
||||||
<alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['purchase'],
|
|
||||||
'data': ['purchase_view.xml'],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="purchase_order_form" model="ir.ui.view">
|
|
||||||
<field name="name">purchase.order.product.required.form</field>
|
|
||||||
<field name="model">purchase.order</field>
|
|
||||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
|
|
||||||
<attribute name="required">1</attribute>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="purchase_order_line_form" model="ir.ui.view">
|
|
||||||
<field name="name">purchase.order.line.product.required.form</field>
|
|
||||||
<field name="model">purchase.order.line</field>
|
|
||||||
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_id" position="attributes">
|
|
||||||
<attribute name="required">1</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import stock
|
|
||||||
from . import wizard
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Purchase Suggest module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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 Suggest',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Purchase',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Suggest POs from special suggest orderpoints',
|
|
||||||
'description': """
|
|
||||||
Purchase Suggest
|
|
||||||
================
|
|
||||||
|
|
||||||
This module is an ALTERNATIVE to the module *procurement_suggest* ; it is similar but it only handles the purchase orders and doesn't generate any procurement : the suggestions create a new purchase order directly.
|
|
||||||
|
|
||||||
The advantage is that you are not impacted by the faulty procurements (for example : a procurement generates a PO ; the PO is confirmed ; the related picking is cancelled and deleted -> the procurements will always stay in running without related stock moves !)
|
|
||||||
|
|
||||||
You may want to increase the osv_memory_age_limit (default value = 1h) in Odoo server config file, in order to let some time to the purchase user to finish his work on the purchase suggestions.
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['purchase'],
|
|
||||||
'conflicts': ['procurement_suggest'],
|
|
||||||
'data': [
|
|
||||||
'stock_view.xml',
|
|
||||||
'wizard/purchase_suggest_view.xml',
|
|
||||||
],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,268 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * purchase_suggest
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2015-09-16 21:21+0000\n"
|
|
||||||
"PO-Revision-Date: 2015-09-16 21:21+0000\n"
|
|
||||||
"Last-Translator: <>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
#: view:purchase.suggest.po.create:purchase_suggest.purchase_suggest_po_create_form
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr "Annuler"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.po.create:purchase_suggest.purchase_suggest_po_create_form
|
|
||||||
msgid "Click on the red button below to create the purchase orders.\n"
|
|
||||||
" If a draft purchase order already exists for one of the suppliers\n"
|
|
||||||
" for the same stock location, it will be updated with the new\n"
|
|
||||||
" products and quantities to order."
|
|
||||||
msgstr "Cliquez sur le bouton rouge ci-dessous pour créer les commandes fournisseurs.\n"
|
|
||||||
" Si une commande brouillon existe déjà pour l'un des fournisseurs\n"
|
|
||||||
" pour le même emplacement de stock, il sera mis à jour avec les nouveaux\n"
|
|
||||||
" articles et les nouvelles quantités à commander."
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,company_id:0
|
|
||||||
msgid "Company"
|
|
||||||
msgstr "Société"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.actions.act_window,name:purchase_suggest.purchase_suggest_po_create_action
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
#: view:purchase.suggest.po.create:purchase_suggest.purchase_suggest_po_create_form
|
|
||||||
msgid "Create Purchase Orders"
|
|
||||||
msgstr "Créer les commandes d'achat"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,create_uid:0
|
|
||||||
#: field:purchase.suggest.generate,create_uid:0
|
|
||||||
#: field:purchase.suggest.po.create,create_uid:0
|
|
||||||
msgid "Created by"
|
|
||||||
msgstr "Créé par"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,create_date:0
|
|
||||||
#: field:purchase.suggest.generate,create_date:0
|
|
||||||
#: field:purchase.suggest.po.create,create_date:0
|
|
||||||
msgid "Created on"
|
|
||||||
msgstr "Date de création"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,draft_po_qty:0
|
|
||||||
msgid "Draft PO Quantity"
|
|
||||||
msgstr "PO quantité (brouillon)"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "Generate"
|
|
||||||
msgstr "Générer"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "Generate Purchase Suggestions"
|
|
||||||
msgstr "Générer les suggestions"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_search
|
|
||||||
msgid "Group By"
|
|
||||||
msgstr "Grouper Par"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,id:0
|
|
||||||
#: field:purchase.suggest.generate,id:0
|
|
||||||
#: field:purchase.suggest.po.create,id:0
|
|
||||||
msgid "ID"
|
|
||||||
msgstr "ID"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,incoming_qty:0
|
|
||||||
msgid "Incoming Quantity"
|
|
||||||
msgstr "A recevoir"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,last_po_line_id:0
|
|
||||||
msgid "Last Purchase Order Line"
|
|
||||||
msgstr "Dernière ligne d'achat"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,write_uid:0
|
|
||||||
#: field:purchase.suggest.generate,write_uid:0
|
|
||||||
#: field:purchase.suggest.po.create,write_uid:0
|
|
||||||
msgid "Last Updated by"
|
|
||||||
msgstr "Mis à jour par"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,write_date:0
|
|
||||||
#: field:purchase.suggest.generate,write_date:0
|
|
||||||
#: field:purchase.suggest.po.create,write_date:0
|
|
||||||
msgid "Last Updated on"
|
|
||||||
msgstr "Dernière mise à jour"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:248
|
|
||||||
#, python-format
|
|
||||||
msgid "Make sure you have at least an incoming picking type defined"
|
|
||||||
msgstr "Make sure you have at least an incoming picking type defined"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,min_qty:0
|
|
||||||
msgid "Min Quantity"
|
|
||||||
msgstr "Quantité minimum"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_stock_warehouse_orderpoint
|
|
||||||
msgid "Minimum Inventory Rule"
|
|
||||||
msgstr "Règle de stock minimum"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "More"
|
|
||||||
msgstr "Plus"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:337
|
|
||||||
#, python-format
|
|
||||||
msgid "No purchase orders created or updated"
|
|
||||||
msgstr "Aucune commande fournisseur créée ou mise-à-jour"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:327
|
|
||||||
#, python-format
|
|
||||||
msgid "No supplier configured for product '%s'."
|
|
||||||
msgstr "Aucune fournisseur configuré pour l'article '%s'."
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "Once you have entered a Quantity to Order for all the lines you would like to re-order, select all the lines and click on"
|
|
||||||
msgstr "Une fois la quantité à commander saisie pour toutes les lignes que vous souhaitez re-commander, sélectionnez toutes les lignes et cliquez"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,outgoing_qty:0
|
|
||||||
msgid "Outgoing Quantity"
|
|
||||||
msgstr "Quantité sortante"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,product_id:0
|
|
||||||
msgid "Product"
|
|
||||||
msgstr "Article"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest.generate,categ_ids:0
|
|
||||||
msgid "Product Categories"
|
|
||||||
msgstr "Catégorie d'article"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.actions.act_window,name:purchase_suggest.purchase_suggest_action
|
|
||||||
#: model:ir.actions.act_window,name:purchase_suggest.purchase_suggest_generate_action
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_purchase_suggest
|
|
||||||
#: model:ir.ui.menu,name:purchase_suggest.purchase_suggest_generate_menu
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_search
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_tree
|
|
||||||
msgid "Purchase Suggestions"
|
|
||||||
msgstr "Suggestion réappro"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:298
|
|
||||||
#, python-format
|
|
||||||
msgid "Purchase order updated from purchase suggestions."
|
|
||||||
msgstr "Purchase order updated from purchase suggestions."
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_purchase_suggest_po_create
|
|
||||||
msgid "PurchaseSuggestPoCreate"
|
|
||||||
msgstr "PurchaseSuggestPoCreate"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,qty_available:0
|
|
||||||
msgid "Quantity On Hand"
|
|
||||||
msgstr "Stock réel"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,qty_to_order:0
|
|
||||||
msgid "Quantity to Order"
|
|
||||||
msgstr "Quantité à commander"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,orderpoint_id:0
|
|
||||||
msgid "Re-ordering Rule"
|
|
||||||
msgstr "Règle de réassort"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:stock.warehouse.orderpoint:purchase_suggest.warehouse_orderpoint_search
|
|
||||||
msgid "Real"
|
|
||||||
msgstr "Réel"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_search
|
|
||||||
msgid "Seller"
|
|
||||||
msgstr "Fournisseur"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_purchase_suggest_generate
|
|
||||||
msgid "Start to generate the purchase suggestions"
|
|
||||||
msgstr "Commencer à générer les suggestions d'achat"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,location_id:0
|
|
||||||
#: field:purchase.suggest.generate,location_id:0
|
|
||||||
msgid "Stock Location"
|
|
||||||
msgstr "Emplacement"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:stock.warehouse.orderpoint:purchase_suggest.warehouse_orderpoint_search
|
|
||||||
#: field:stock.warehouse.orderpoint,suggest:0
|
|
||||||
msgid "Suggest"
|
|
||||||
msgstr "Suggérer"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,seller_id:0
|
|
||||||
msgid "Supplier"
|
|
||||||
msgstr "Fournisseur"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest.generate,seller_ids:0
|
|
||||||
msgid "Suppliers"
|
|
||||||
msgstr "Fournisseurs"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "The purchase suggestion lines display as much information as possible to help you take the decision on the quantity that you would like to re-order. When you have decided the quantity you want to re-order, enter that value in the last column."
|
|
||||||
msgstr "Les lignes de suggestion affichent de nombreuses informations afin de vous aider à déterminer la quantité à commander. Une fois votre décision prise, saisissez la quantité dans la dernière colonne."
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:103
|
|
||||||
#, python-format
|
|
||||||
msgid "There are 2 orderpoints (%s and %s) for the same product on stock location %s or its children."
|
|
||||||
msgstr "Il y a 2 règles de réassort (%s et %s) pour le même article pour l'emplacement de stock %s ou l'un de ses enfants."
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:172
|
|
||||||
#, python-format
|
|
||||||
msgid "There are no purchase suggestions to generate."
|
|
||||||
msgstr "Aucune suggestion d'achat à faire."
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "This wizard will generate purchase suggestions based on the following rules:"
|
|
||||||
msgstr "Cet assistant va créer des suggestions d'achat en fonction des règles suivantes:"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "if the quantity on hand + incoming quantity - outgoing quantity + quantity in draft purchase orders is strictly inferior to the minimum stock level, it will create a purchase suggestion line"
|
|
||||||
msgstr "si le stock réel + la quantité à recevoir - la quantité sortante + la quantité commandée (brouillon) est strictement inférieure au stock minimum, une ligne de suggestion sera créé."
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "it will search all the re-ordering rules linked to the selected stock location, limited to the product categories and the suppliers if some were selected"
|
|
||||||
msgstr "Pour chercher toutes les règles de réassort liées à l'emplacement sélectionné, à la catégorie d'article et aux fournisseurs (si ils sont sélectionnés)"
|
|
||||||
@@ -1,266 +0,0 @@
|
|||||||
# Translation of Odoo Server.
|
|
||||||
# This file contains the translation of the following modules:
|
|
||||||
# * purchase_suggest
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: Odoo Server 8.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2015-09-16 21:20+0000\n"
|
|
||||||
"PO-Revision-Date: 2015-09-16 21:20+0000\n"
|
|
||||||
"Last-Translator: <>\n"
|
|
||||||
"Language-Team: \n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: \n"
|
|
||||||
"Plural-Forms: \n"
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
#: view:purchase.suggest.po.create:purchase_suggest.purchase_suggest_po_create_form
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.po.create:purchase_suggest.purchase_suggest_po_create_form
|
|
||||||
msgid "Click on the red button below to create the purchase orders.\n"
|
|
||||||
" If a draft purchase order already exists for one of the suppliers\n"
|
|
||||||
" for the same stock location, it will be updated with the new\n"
|
|
||||||
" products and quantities to order."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,company_id:0
|
|
||||||
msgid "Company"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.actions.act_window,name:purchase_suggest.purchase_suggest_po_create_action
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
#: view:purchase.suggest.po.create:purchase_suggest.purchase_suggest_po_create_form
|
|
||||||
msgid "Create Purchase Orders"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,create_uid:0
|
|
||||||
#: field:purchase.suggest.generate,create_uid:0
|
|
||||||
#: field:purchase.suggest.po.create,create_uid:0
|
|
||||||
msgid "Created by"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,create_date:0
|
|
||||||
#: field:purchase.suggest.generate,create_date:0
|
|
||||||
#: field:purchase.suggest.po.create,create_date:0
|
|
||||||
msgid "Created on"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,draft_po_qty:0
|
|
||||||
msgid "Draft PO Quantity"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "Generate"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "Generate Purchase Suggestions"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_search
|
|
||||||
msgid "Group By"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,id:0
|
|
||||||
#: field:purchase.suggest.generate,id:0
|
|
||||||
#: field:purchase.suggest.po.create,id:0
|
|
||||||
msgid "ID"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,incoming_qty:0
|
|
||||||
msgid "Incoming Quantity"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,last_po_line_id:0
|
|
||||||
msgid "Last Purchase Order Line"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,write_uid:0
|
|
||||||
#: field:purchase.suggest.generate,write_uid:0
|
|
||||||
#: field:purchase.suggest.po.create,write_uid:0
|
|
||||||
msgid "Last Updated by"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,write_date:0
|
|
||||||
#: field:purchase.suggest.generate,write_date:0
|
|
||||||
#: field:purchase.suggest.po.create,write_date:0
|
|
||||||
msgid "Last Updated on"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:248
|
|
||||||
#, python-format
|
|
||||||
msgid "Make sure you have at least an incoming picking type defined"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,min_qty:0
|
|
||||||
msgid "Min Quantity"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_stock_warehouse_orderpoint
|
|
||||||
msgid "Minimum Inventory Rule"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "More"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:337
|
|
||||||
#, python-format
|
|
||||||
msgid "No purchase orders created or updated"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:327
|
|
||||||
#, python-format
|
|
||||||
msgid "No supplier configured for product '%s'."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "Once you have entered a Quantity to Order for all the lines you would like to re-order, select all the lines and click on"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,outgoing_qty:0
|
|
||||||
msgid "Outgoing Quantity"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,product_id:0
|
|
||||||
msgid "Product"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest.generate,categ_ids:0
|
|
||||||
msgid "Product Categories"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.actions.act_window,name:purchase_suggest.purchase_suggest_action
|
|
||||||
#: model:ir.actions.act_window,name:purchase_suggest.purchase_suggest_generate_action
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_purchase_suggest
|
|
||||||
#: model:ir.ui.menu,name:purchase_suggest.purchase_suggest_generate_menu
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_search
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_tree
|
|
||||||
msgid "Purchase Suggestions"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:298
|
|
||||||
#, python-format
|
|
||||||
msgid "Purchase order updated from purchase suggestions."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_purchase_suggest_po_create
|
|
||||||
msgid "PurchaseSuggestPoCreate"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,qty_available:0
|
|
||||||
msgid "Quantity On Hand"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,qty_to_order:0
|
|
||||||
msgid "Quantity to Order"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,orderpoint_id:0
|
|
||||||
msgid "Re-ordering Rule"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:stock.warehouse.orderpoint:purchase_suggest.warehouse_orderpoint_search
|
|
||||||
msgid "Real"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest:purchase_suggest.purchase_suggest_search
|
|
||||||
msgid "Seller"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: model:ir.model,name:purchase_suggest.model_purchase_suggest_generate
|
|
||||||
msgid "Start to generate the purchase suggestions"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,location_id:0
|
|
||||||
#: field:purchase.suggest.generate,location_id:0
|
|
||||||
msgid "Stock Location"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:stock.warehouse.orderpoint:purchase_suggest.warehouse_orderpoint_search
|
|
||||||
#: field:stock.warehouse.orderpoint,suggest:0
|
|
||||||
msgid "Suggest"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest,seller_id:0
|
|
||||||
msgid "Supplier"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: field:purchase.suggest.generate,seller_ids:0
|
|
||||||
msgid "Suppliers"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "The purchase suggestion lines display as much information as possible to help you take the decision on the quantity that you would like to re-order. When you have decided the quantity you want to re-order, enter that value in the last column."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:103
|
|
||||||
#, python-format
|
|
||||||
msgid "There are 2 orderpoints (%s and %s) for the same product on stock location %s or its children."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: code:addons/purchase_suggest/wizard/purchase_suggest.py:172
|
|
||||||
#, python-format
|
|
||||||
msgid "There are no purchase suggestions to generate."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "This wizard will generate purchase suggestions based on the following rules:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "if the quantity on hand + incoming quantity - outgoing quantity + quantity in draft purchase orders is strictly inferior to the minimum stock level, it will create a purchase suggestion line"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#. module: purchase_suggest
|
|
||||||
#: view:purchase.suggest.generate:purchase_suggest.purchase_suggest_generate_form
|
|
||||||
msgid "it will search all the re-ordering rules linked to the selected stock location, limited to the product categories and the suppliers if some were selected"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py
|
|
||||||
index 7b067ed..98857e6 100644
|
|
||||||
--- a/addons/stock/procurement.py
|
|
||||||
+++ b/addons/stock/procurement.py
|
|
||||||
@@ -342,6 +342,7 @@ class procurement_order(osv.osv):
|
|
||||||
|
|
||||||
procurement_obj = self.pool.get('procurement.order')
|
|
||||||
dom = company_id and [('company_id', '=', company_id)] or []
|
|
||||||
+ dom.append(('suggest', '=', False))
|
|
||||||
orderpoint_ids = orderpoint_obj.search(cr, uid, dom)
|
|
||||||
prev_ids = []
|
|
||||||
while orderpoint_ids:
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Purchase Suggest module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, fields
|
|
||||||
|
|
||||||
|
|
||||||
class StockWarehouseOrderpoint(models.Model):
|
|
||||||
_inherit = 'stock.warehouse.orderpoint'
|
|
||||||
|
|
||||||
suggest = fields.Boolean(string='Suggest', default=True)
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_warehouse_orderpoint_form" model="ir.ui.view">
|
|
||||||
<field name="name">procurement_suggest.orderpoint.form</field>
|
|
||||||
<field name="model">stock.warehouse.orderpoint</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_min_qty" position="before">
|
|
||||||
<field name="suggest"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
|
|
||||||
<field name="name">procurement_suggest.orderpoint.tree</field>
|
|
||||||
<field name="model">stock.warehouse.orderpoint</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_min_qty" position="before">
|
|
||||||
<field name="suggest"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="warehouse_orderpoint_search" model="ir.ui.view">
|
|
||||||
<field name="name">procurement_suggest.orderpoint.search</field>
|
|
||||||
<field name="model">stock.warehouse.orderpoint</field>
|
|
||||||
<field name="inherit_id" ref="stock.warehouse_orderpoint_search"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_id" position="after">
|
|
||||||
<filter name="real" string="Real" domain="[('suggest', '=', False)]"/>
|
|
||||||
<filter name="suggest" string="Suggest" domain="[('suggest', '=', True)]"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import purchase_suggest
|
|
||||||
@@ -1,392 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Purchase Suggest module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, fields, api, _
|
|
||||||
import openerp.addons.decimal_precision as dp
|
|
||||||
from openerp.tools import float_compare, float_is_zero
|
|
||||||
from openerp.exceptions import Warning
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class PurchaseSuggestGenerate(models.TransientModel):
|
|
||||||
_name = 'purchase.suggest.generate'
|
|
||||||
_description = 'Start to generate the purchase suggestions'
|
|
||||||
|
|
||||||
categ_ids = fields.Many2many(
|
|
||||||
'product.category', string='Product Categories')
|
|
||||||
seller_ids = fields.Many2many(
|
|
||||||
'res.partner', string='Suppliers',
|
|
||||||
domain=[('supplier', '=', True)])
|
|
||||||
location_id = fields.Many2one(
|
|
||||||
'stock.location', string='Stock Location', required=True,
|
|
||||||
default=lambda self: self.env.ref('stock.stock_location_stock'))
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _prepare_suggest_line(self, product_id, qty_dict):
|
|
||||||
porderline_id = False
|
|
||||||
porderlines = self.env['purchase.order.line'].search([
|
|
||||||
('state', 'not in', ('draft', 'cancel')),
|
|
||||||
('product_id', '=', product_id)],
|
|
||||||
order='id desc', limit=1)
|
|
||||||
# I cannot filter on 'date_order' because it is not a stored field
|
|
||||||
porderline_id = porderlines and porderlines[0].id or False
|
|
||||||
future_qty = qty_dict['virtual_available'] + qty_dict['draft_po_qty']
|
|
||||||
if float_compare(
|
|
||||||
qty_dict['max_qty'], qty_dict['min_qty'],
|
|
||||||
precision_rounding=qty_dict['product'].uom_id.rounding) == 1:
|
|
||||||
# order to go up to qty_max
|
|
||||||
qty_to_order = qty_dict['max_qty'] - future_qty
|
|
||||||
else:
|
|
||||||
# order to go up to qty_min
|
|
||||||
qty_to_order = qty_dict['min_qty'] - future_qty
|
|
||||||
|
|
||||||
sline = {
|
|
||||||
'company_id':
|
|
||||||
qty_dict['orderpoint'] and qty_dict['orderpoint'].company_id.id,
|
|
||||||
'product_id': product_id,
|
|
||||||
'seller_id': qty_dict['product'].seller_id.id or False,
|
|
||||||
'qty_available': qty_dict['qty_available'],
|
|
||||||
'incoming_qty': qty_dict['incoming_qty'],
|
|
||||||
'outgoing_qty': qty_dict['outgoing_qty'],
|
|
||||||
'draft_po_qty': qty_dict['draft_po_qty'],
|
|
||||||
'orderpoint_id':
|
|
||||||
qty_dict['orderpoint'] and qty_dict['orderpoint'].id,
|
|
||||||
'location_id': self.location_id.id,
|
|
||||||
'min_qty': qty_dict['min_qty'],
|
|
||||||
'max_qty': qty_dict['max_qty'],
|
|
||||||
'last_po_line_id': porderline_id,
|
|
||||||
'qty_to_order': qty_to_order,
|
|
||||||
}
|
|
||||||
return sline
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _prepare_product_domain(self):
|
|
||||||
product_domain = []
|
|
||||||
if self.categ_ids:
|
|
||||||
product_domain.append(
|
|
||||||
('categ_id', 'child_of', self.categ_ids.ids))
|
|
||||||
if self.seller_ids:
|
|
||||||
product_domain.append(
|
|
||||||
('seller_id', 'in', self.seller_ids.ids))
|
|
||||||
return product_domain
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def generate_products_dict(self):
|
|
||||||
ppo = self.env['product.product']
|
|
||||||
swoo = self.env['stock.warehouse.orderpoint']
|
|
||||||
products = {}
|
|
||||||
op_domain = [
|
|
||||||
('suggest', '=', True),
|
|
||||||
('company_id', '=', self.env.user.company_id.id),
|
|
||||||
('location_id', 'child_of', self.location_id.id),
|
|
||||||
]
|
|
||||||
if self.categ_ids or self.seller_ids:
|
|
||||||
|
|
||||||
products_subset = ppo.search(self._prepare_product_domain())
|
|
||||||
op_domain.append(('product_id', 'in', products_subset.ids))
|
|
||||||
ops = swoo.search(op_domain)
|
|
||||||
for op in ops:
|
|
||||||
if op.product_id.id not in products:
|
|
||||||
products[op.product_id.id] = {
|
|
||||||
'min_qty': op.product_min_qty,
|
|
||||||
'max_qty': op.product_max_qty,
|
|
||||||
'draft_po_qty': 0.0, # This value is set later on
|
|
||||||
'orderpoint': op,
|
|
||||||
'product': op.product_id
|
|
||||||
}
|
|
||||||
else:
|
|
||||||
raise Warning(
|
|
||||||
_("There are 2 orderpoints (%s and %s) for the same "
|
|
||||||
"product on stock location %s or its "
|
|
||||||
"children.") % (
|
|
||||||
products[op.product_id.id]['orderpoint'].name,
|
|
||||||
op.name,
|
|
||||||
self.location_id.complete_name))
|
|
||||||
return products
|
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def run(self):
|
|
||||||
self.ensure_one()
|
|
||||||
pso = self.env['purchase.suggest']
|
|
||||||
polo = self.env['purchase.order.line']
|
|
||||||
puo = self.env['product.uom']
|
|
||||||
p_suggest_lines = []
|
|
||||||
products = self.generate_products_dict()
|
|
||||||
# key = product_id
|
|
||||||
# value = {'virtual_qty': 1.0, 'draft_po_qty': 4.0, 'min_qty': 6.0}
|
|
||||||
# WARNING: draft_po_qty is in the UoM of the product
|
|
||||||
logger.info('Starting to compute the purchase suggestions')
|
|
||||||
logger.info('Min qty computed on %d products', len(products))
|
|
||||||
polines = polo.search([
|
|
||||||
('state', '=', 'draft'), ('product_id', 'in', products.keys())])
|
|
||||||
for line in polines:
|
|
||||||
qty_product_po_uom = puo._compute_qty_obj(
|
|
||||||
line.product_uom, line.product_qty, line.product_id.uom_id)
|
|
||||||
products[line.product_id.id]['draft_po_qty'] += qty_product_po_uom
|
|
||||||
logger.info('Draft PO qty computed on %d products', len(products))
|
|
||||||
virtual_qties = self.pool['product.product']._product_available(
|
|
||||||
self._cr, self._uid, products.keys(),
|
|
||||||
context={'location': self.location_id.id})
|
|
||||||
logger.info('Stock levels qty computed on %d products', len(products))
|
|
||||||
for product_id, qty_dict in products.iteritems():
|
|
||||||
qty_dict['virtual_available'] =\
|
|
||||||
virtual_qties[product_id]['virtual_available']
|
|
||||||
qty_dict['incoming_qty'] =\
|
|
||||||
virtual_qties[product_id]['incoming_qty']
|
|
||||||
qty_dict['outgoing_qty'] =\
|
|
||||||
virtual_qties[product_id]['outgoing_qty']
|
|
||||||
qty_dict['qty_available'] =\
|
|
||||||
virtual_qties[product_id]['qty_available']
|
|
||||||
logger.debug(
|
|
||||||
'Product ID: %d Virtual qty = %s Draft PO qty = %s '
|
|
||||||
'Min. qty = %s',
|
|
||||||
product_id, qty_dict['virtual_available'],
|
|
||||||
qty_dict['draft_po_qty'], qty_dict['min_qty'])
|
|
||||||
compare = float_compare(
|
|
||||||
qty_dict['virtual_available'] + qty_dict['draft_po_qty'],
|
|
||||||
qty_dict['min_qty'],
|
|
||||||
precision_rounding=qty_dict['product'].uom_id.rounding)
|
|
||||||
if compare < 0:
|
|
||||||
vals = self._prepare_suggest_line(product_id, qty_dict)
|
|
||||||
if vals:
|
|
||||||
p_suggest_lines.append(vals)
|
|
||||||
logger.debug(
|
|
||||||
'Created a procurement suggestion for product ID %d',
|
|
||||||
product_id)
|
|
||||||
p_suggest_lines_sorted = sorted(
|
|
||||||
p_suggest_lines, key=lambda to_sort: to_sort['seller_id'])
|
|
||||||
if p_suggest_lines_sorted:
|
|
||||||
p_suggest_ids = []
|
|
||||||
for p_suggest_line in p_suggest_lines_sorted:
|
|
||||||
p_suggest = pso.create(p_suggest_line)
|
|
||||||
p_suggest_ids.append(p_suggest.id)
|
|
||||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
|
||||||
'purchase_suggest', 'purchase_suggest_action')
|
|
||||||
action.update({
|
|
||||||
'target': 'current',
|
|
||||||
'domain': [('id', 'in', p_suggest_ids)],
|
|
||||||
})
|
|
||||||
return action
|
|
||||||
else:
|
|
||||||
raise Warning(_(
|
|
||||||
"There are no purchase suggestions to generate."))
|
|
||||||
|
|
||||||
|
|
||||||
class PurchaseSuggest(models.TransientModel):
|
|
||||||
_name = 'purchase.suggest'
|
|
||||||
_description = 'Purchase Suggestions'
|
|
||||||
_rec_name = 'product_id'
|
|
||||||
|
|
||||||
company_id = fields.Many2one(
|
|
||||||
'res.company', string='Company', required=True)
|
|
||||||
product_id = fields.Many2one(
|
|
||||||
'product.product', string='Product', required=True, readonly=True)
|
|
||||||
uom_id = fields.Many2one(
|
|
||||||
'product.uom', string='UoM', related='product_id.uom_id',
|
|
||||||
readonly=True)
|
|
||||||
uom_po_id = fields.Many2one(
|
|
||||||
'product.uom', string='Purchase UoM', related='product_id.uom_po_id',
|
|
||||||
readonly=True)
|
|
||||||
seller_id = fields.Many2one(
|
|
||||||
'res.partner', string='Supplier', readonly=True,
|
|
||||||
domain=[('supplier', '=', True)])
|
|
||||||
qty_available = fields.Float(
|
|
||||||
string='Quantity On Hand', readonly=True,
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
help="in the unit of measure of the product")
|
|
||||||
incoming_qty = fields.Float(
|
|
||||||
string='Incoming Quantity', readonly=True,
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
help="in the unit of measure of the product")
|
|
||||||
outgoing_qty = fields.Float(
|
|
||||||
string='Outgoing Quantity', readonly=True,
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
help="in the unit of measure of the product")
|
|
||||||
draft_po_qty = fields.Float(
|
|
||||||
string='Draft PO Quantity', readonly=True,
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
help="Draft purchase order quantity in the unit of measure "
|
|
||||||
"of the product (NOT in the purchase unit of measure !)")
|
|
||||||
last_po_line_id = fields.Many2one(
|
|
||||||
'purchase.order.line', string='Last Purchase Order Line',
|
|
||||||
readonly=True)
|
|
||||||
last_po_date = fields.Datetime(
|
|
||||||
related='last_po_line_id.order_id.date_order',
|
|
||||||
string='Date of the Last Order', readonly=True)
|
|
||||||
last_po_qty = fields.Float(
|
|
||||||
related='last_po_line_id.product_qty', readonly=True,
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
string='Quantity of the Last Order')
|
|
||||||
last_po_uom = fields.Many2one(
|
|
||||||
related='last_po_line_id.product_uom', readonly=True,
|
|
||||||
string='UoM of the Last Order')
|
|
||||||
orderpoint_id = fields.Many2one(
|
|
||||||
'stock.warehouse.orderpoint', string='Re-ordering Rule',
|
|
||||||
readonly=True)
|
|
||||||
location_id = fields.Many2one(
|
|
||||||
'stock.location', string='Stock Location', readonly=True)
|
|
||||||
min_qty = fields.Float(
|
|
||||||
string="Min Quantity", readonly=True,
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
help="in the unit of measure for the product")
|
|
||||||
max_qty = fields.Float(
|
|
||||||
string="Max Quantity", readonly=True,
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
help="in the unit of measure for the product")
|
|
||||||
qty_to_order = fields.Float(
|
|
||||||
string='Quantity to Order',
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
help="Quantity to order in the purchase unit of measure for the "
|
|
||||||
"product")
|
|
||||||
|
|
||||||
|
|
||||||
class PurchaseSuggestPoCreate(models.TransientModel):
|
|
||||||
_name = 'purchase.suggest.po.create'
|
|
||||||
_description = 'PurchaseSuggestPoCreate'
|
|
||||||
|
|
||||||
def _prepare_purchase_order(self, partner, company, location):
|
|
||||||
poo = self.env['purchase.order']
|
|
||||||
spto = self.env['stock.picking.type']
|
|
||||||
po_vals = {'partner_id': partner.id, 'company_id': company.id}
|
|
||||||
ponull = poo.browse(False)
|
|
||||||
partner_change_dict = ponull.onchange_partner_id(partner.id)
|
|
||||||
po_vals.update(partner_change_dict['value'])
|
|
||||||
pick_type_dom = [
|
|
||||||
('code', '=', 'incoming'),
|
|
||||||
('warehouse_id.company_id', '=', company.id)]
|
|
||||||
pick_types = spto.search(
|
|
||||||
pick_type_dom + [(
|
|
||||||
'default_location_dest_id',
|
|
||||||
'child_of',
|
|
||||||
location.location_id.id)])
|
|
||||||
# I use location.parent_id.id to support 2 step-receptions
|
|
||||||
# where the stock.location .type is linked to Warehouse > Receipt
|
|
||||||
# but location is Warehouse > Stock
|
|
||||||
if not pick_types:
|
|
||||||
pick_types = spto.search(pick_type_dom)
|
|
||||||
if not pick_types:
|
|
||||||
raise Warning(_(
|
|
||||||
"Make sure you have at least an incoming picking "
|
|
||||||
"type defined"))
|
|
||||||
po_vals['picking_type_id'] = pick_types[0].id
|
|
||||||
pick_type_dict = ponull.onchange_picking_type_id(pick_types[0].id)
|
|
||||||
po_vals.update(pick_type_dict['value'])
|
|
||||||
return po_vals
|
|
||||||
|
|
||||||
def _prepare_purchase_order_line(
|
|
||||||
self, partner, product, qty_to_order, uom):
|
|
||||||
polo = self.env['purchase.order.line']
|
|
||||||
polnull = polo.browse(False)
|
|
||||||
product_change_res = polnull.onchange_product_id(
|
|
||||||
partner.property_product_pricelist_purchase.id,
|
|
||||||
product.id, qty_to_order, uom.id, partner.id,
|
|
||||||
fiscal_position_id=partner.property_account_position.id)
|
|
||||||
product_change_vals = product_change_res['value']
|
|
||||||
taxes_id_vals = []
|
|
||||||
if product_change_vals.get('taxes_id'):
|
|
||||||
for tax_id in product_change_vals['taxes_id']:
|
|
||||||
taxes_id_vals.append((4, tax_id))
|
|
||||||
product_change_vals['taxes_id'] = taxes_id_vals
|
|
||||||
vals = dict(product_change_vals, product_id=product.id)
|
|
||||||
return vals
|
|
||||||
|
|
||||||
def _create_update_purchase_order(
|
|
||||||
self, partner, company, po_lines, location):
|
|
||||||
polo = self.env['purchase.order.line']
|
|
||||||
poo = self.env['purchase.order']
|
|
||||||
puo = self.env['product.uom']
|
|
||||||
existing_pos = poo.search([
|
|
||||||
('partner_id', '=', partner.id),
|
|
||||||
('company_id', '=', company.id),
|
|
||||||
('state', '=', 'draft'),
|
|
||||||
('location_id', '=', location.id),
|
|
||||||
])
|
|
||||||
if existing_pos:
|
|
||||||
# update the first existing PO
|
|
||||||
existing_po = existing_pos[0]
|
|
||||||
for product, qty_to_order, uom in po_lines:
|
|
||||||
existing_polines = polo.search([
|
|
||||||
('product_id', '=', product.id),
|
|
||||||
('order_id', '=', existing_po.id),
|
|
||||||
])
|
|
||||||
if existing_polines:
|
|
||||||
existing_poline = existing_polines[0]
|
|
||||||
existing_poline.product_qty += puo._compute_qty_obj(
|
|
||||||
uom, qty_to_order, existing_poline.product_uom)
|
|
||||||
else:
|
|
||||||
pol_vals = self._prepare_purchase_order_line(
|
|
||||||
partner, product, qty_to_order, uom)
|
|
||||||
pol_vals['order_id'] = existing_po.id
|
|
||||||
polo.create(pol_vals)
|
|
||||||
existing_po.message_post(
|
|
||||||
_('Purchase order updated from purchase suggestions.'))
|
|
||||||
return existing_po
|
|
||||||
else:
|
|
||||||
# create new PO
|
|
||||||
po_vals = self._prepare_purchase_order(partner, company, location)
|
|
||||||
order_lines = []
|
|
||||||
for product, qty_to_order, uom in po_lines:
|
|
||||||
pol_vals = self._prepare_purchase_order_line(
|
|
||||||
partner, product, qty_to_order, uom)
|
|
||||||
order_lines.append((0, 0, pol_vals))
|
|
||||||
po_vals['order_line'] = order_lines
|
|
||||||
new_po = poo.create(po_vals)
|
|
||||||
return new_po
|
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def create_po(self):
|
|
||||||
self.ensure_one()
|
|
||||||
# group by supplier
|
|
||||||
po_to_create = {}
|
|
||||||
# key = (seller, company)
|
|
||||||
# value = [(product1, qty1, uom1), (product2, qty2, uom2)]
|
|
||||||
psuggest_ids = self.env.context.get('active_ids')
|
|
||||||
location = False
|
|
||||||
precision = self.env['decimal.precision'].precision_get(
|
|
||||||
'Product Unit of Measure')
|
|
||||||
for line in self.env['purchase.suggest'].browse(psuggest_ids):
|
|
||||||
if not location:
|
|
||||||
location = line.location_id
|
|
||||||
if float_is_zero(line.qty_to_order, precision_digits=precision):
|
|
||||||
continue
|
|
||||||
if not line.product_id.seller_id:
|
|
||||||
raise Warning(_(
|
|
||||||
"No supplier configured for product '%s'.")
|
|
||||||
% line.product_id.name)
|
|
||||||
po_to_create.setdefault(
|
|
||||||
(line.seller_id, line.company_id), []).append(
|
|
||||||
(line.product_id, line.qty_to_order, line.uom_po_id))
|
|
||||||
if not po_to_create:
|
|
||||||
raise Warning(_('No purchase orders created or updated'))
|
|
||||||
po_ids = []
|
|
||||||
for (seller, company), po_lines in po_to_create.iteritems():
|
|
||||||
assert location, 'No stock location'
|
|
||||||
po = self._create_update_purchase_order(
|
|
||||||
seller, company, po_lines, location)
|
|
||||||
po_ids.append(po.id)
|
|
||||||
|
|
||||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
|
||||||
'purchase', 'purchase_rfq')
|
|
||||||
action['domain'] = [('id', 'in', po_ids)]
|
|
||||||
return action
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="purchase_suggest_generate_form" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest_generate.form</field>
|
|
||||||
<field name="model">purchase.suggest.generate</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="Generate Purchase Suggestions">
|
|
||||||
<p>This wizard will generate purchase suggestions based on the following rules:</p>
|
|
||||||
<ol>
|
|
||||||
<li>it will search all the re-ordering rules linked to the selected stock location, limited to the product categories and the suppliers if some were selected</li>
|
|
||||||
<li>if the quantity on hand + incoming quantity - outgoing quantity + quantity in draft purchase orders is strictly inferior to the minimum stock level, it will create a purchase suggestion line</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<p>The purchase suggestion lines display as much information as possible to help you take the decision on the quantity that you would like to re-order. When you have decided the quantity you want to re-order, enter that value in the last column.</p>
|
|
||||||
|
|
||||||
<p>Once you have entered a Quantity to Order for all the lines you would like to re-order, select all the lines and click on <i>More</i> > <i>Create Purchase Orders</i>.</p>
|
|
||||||
<group name="name">
|
|
||||||
<field name="categ_ids" widget="many2many_tags"/>
|
|
||||||
<field name="seller_ids" widget="many2many_tags"/>
|
|
||||||
<field name="location_id"/>
|
|
||||||
</group>
|
|
||||||
<footer>
|
|
||||||
<button type="object" name="run" string="Generate" class="oe_highlight"/>
|
|
||||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
|
||||||
</footer>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="purchase_suggest_generate_action" model="ir.actions.act_window">
|
|
||||||
<field name="name">Purchase Suggestions</field>
|
|
||||||
<field name="res_model">purchase.suggest.generate</field>
|
|
||||||
<field name="view_mode">form</field>
|
|
||||||
<field name="target">new</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="purchase_suggest_generate_menu"
|
|
||||||
action="purchase_suggest_generate_action"
|
|
||||||
parent="purchase.menu_procurement_management"
|
|
||||||
sequence="14"/>
|
|
||||||
|
|
||||||
<record id="purchase_suggest_tree" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest.tree</field>
|
|
||||||
<field name="model">purchase.suggest</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="Purchase Suggestions" editable="bottom">
|
|
||||||
<field name="seller_id"/>
|
|
||||||
<field name="product_id"/>
|
|
||||||
<field name="qty_available"/>
|
|
||||||
<field name="incoming_qty"/>
|
|
||||||
<field name="outgoing_qty"/>
|
|
||||||
<field name="draft_po_qty"/>
|
|
||||||
<field name="min_qty" string="Min Qty"/>
|
|
||||||
<field name="max_qty" string="Max Qty"/>
|
|
||||||
<field name="uom_id" groups="product.group_uom"/>
|
|
||||||
<field name="last_po_date" widget="date"/>
|
|
||||||
<field name="last_po_qty"/>
|
|
||||||
<field name="last_po_uom" groups="product.group_uom"/>
|
|
||||||
<field name="qty_to_order"/>
|
|
||||||
<field name="uom_po_id" groups="product.group_uom"/>
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="purchase_suggest_search" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest.search</field>
|
|
||||||
<field name="model">purchase.suggest</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<search string="Purchase Suggestions">
|
|
||||||
<field name="seller_id"/>
|
|
||||||
<field name="product_id"/>
|
|
||||||
<group string="Group By" name="groupby">
|
|
||||||
<filter name="seller_groupby" string="Seller" context="{'group_by': 'seller_id'}"/>
|
|
||||||
</group>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="purchase_suggest_action" model="ir.actions.act_window">
|
|
||||||
<field name="name">Purchase Suggestions</field>
|
|
||||||
<field name="res_model">purchase.suggest</field>
|
|
||||||
<field name="view_mode">tree</field>
|
|
||||||
<field name="target">new</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="purchase_suggest_po_create_form" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest_po_create.form</field>
|
|
||||||
<field name="model">purchase.suggest.po.create</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="Create Purchase Orders">
|
|
||||||
<p class="oe_grey">
|
|
||||||
Click on the red button below to create the purchase orders.
|
|
||||||
If a draft purchase order already exists for one of the suppliers
|
|
||||||
for the same stock location, it will be updated with the new
|
|
||||||
products and quantities to order.
|
|
||||||
</p>
|
|
||||||
<footer>
|
|
||||||
<button type="object" name="create_po"
|
|
||||||
string="Create Purchase Orders" class="oe_highlight"/>
|
|
||||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
|
||||||
</footer>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<act_window id="purchase_suggest_po_create_action"
|
|
||||||
multi="True"
|
|
||||||
key2="client_action_multi"
|
|
||||||
name="Create Purchase Orders"
|
|
||||||
res_model="purchase.suggest.po.create"
|
|
||||||
src_model="purchase.suggest"
|
|
||||||
view_mode="form"
|
|
||||||
target="new" />
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import product
|
|
||||||
from . import wizard
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Purchase Suggest Min Qty on Product module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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 Suggest Min Qty on Product',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Purchase',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Replace orderpoints by a min_qty field on product',
|
|
||||||
'description': """
|
|
||||||
Purchase Suggest Min Qty on Product
|
|
||||||
===================================
|
|
||||||
|
|
||||||
With this module, instead of using orderpoints, we add a *min_qty* field on product.product and we use this value as the minimum stock. This makes it easier for users to read and update the min_qty. But this should only be used if there is only 1 warehouse where we handle min stock rules (because, with this module, you cannot set min_qty per warehouse or per stock location).
|
|
||||||
|
|
||||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['purchase_suggest'],
|
|
||||||
'data': [
|
|
||||||
'product_view.xml',
|
|
||||||
'wizard/purchase_suggest_view.xml',
|
|
||||||
],
|
|
||||||
'installable': True,
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Purchase Suggest Min Qty on Product module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, fields, api, _
|
|
||||||
import openerp.addons.decimal_precision as dp
|
|
||||||
from openerp.tools import float_compare, float_is_zero
|
|
||||||
from openerp.exceptions import ValidationError
|
|
||||||
|
|
||||||
|
|
||||||
class ProductProduct(models.Model):
|
|
||||||
_inherit = 'product.product'
|
|
||||||
|
|
||||||
min_qty = fields.Float(
|
|
||||||
string=u'Minimum Quantity', track_visibility='onchange',
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
company_dependent=True,
|
|
||||||
help="If the forecast quantity is lower than the value of this field, "
|
|
||||||
"Odoo will suggest to re-order this product. This field is in the "
|
|
||||||
"unit of measure of the product.")
|
|
||||||
max_qty = fields.Float(
|
|
||||||
string=u'Maximum Quantity', track_visibility='onchange',
|
|
||||||
digits=dp.get_precision('Product Unit of Measure'),
|
|
||||||
company_dependent=True,
|
|
||||||
help="If the forecast quantity is lower than the value of the minimum "
|
|
||||||
" quantity, Odoo will suggest to re-order this product to go up to "
|
|
||||||
"the maximum quantity. This field is in the unit of measure of the "
|
|
||||||
"product.")
|
|
||||||
|
|
||||||
@api.constrains('min_qty', 'max_qty')
|
|
||||||
def check_min_max_qty(self):
|
|
||||||
precision = self.env['decimal.precision'].precision_get(
|
|
||||||
'Product Unit of Measure')
|
|
||||||
for product in self:
|
|
||||||
if (
|
|
||||||
not float_is_zero(
|
|
||||||
product.max_qty, precision_digits=precision) and
|
|
||||||
float_compare(
|
|
||||||
product.max_qty, product.min_qty,
|
|
||||||
precision_digits=precision) != 1):
|
|
||||||
raise ValidationError(_(
|
|
||||||
"On product '%s', the maximum quantity (%s) is lower "
|
|
||||||
"than the minimum quantity (%s).") % (
|
|
||||||
product.name_get()[0][1],
|
|
||||||
product.max_qty, product.min_qty))
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_stock_product_tree" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest_min_qty_on_product.product.product.tree</field>
|
|
||||||
<field name="model">product.product</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_stock_product_tree"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="virtual_available" position="after">
|
|
||||||
<field name="min_qty"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product_normal_form_view" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest_min_qty_on_product.product.product.form</field>
|
|
||||||
<field name="model">product.product</field>
|
|
||||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
|
||||||
<field name="priority">1000</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="virtual_available" position="after">
|
|
||||||
<separator name="min_qty" colspan="2"/>
|
|
||||||
<field name="min_qty"/>
|
|
||||||
<field name="max_qty"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Hide "Reordering Rules" button on product form view -->
|
|
||||||
<record id="product_form_view_procurement_button" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest_min_qty_on_product.product.form.remove.orderpoint.button</field>
|
|
||||||
<field name="model">product.product</field>
|
|
||||||
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<button name="%(stock.product_open_orderpoint)d" position="attributes">
|
|
||||||
<attribute name="attrs">{'invisible': True}</attribute>
|
|
||||||
</button>
|
|
||||||
<button name="action_view_routes" position="attributes">
|
|
||||||
<attribute name="attrs">{'invisible': True}</attribute>
|
|
||||||
</button>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="product_template_form_view_procurement_button" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest_min_qty_on_product.product.template.form.remove.orderpoint.button</field>
|
|
||||||
<field name="model">product.template</field>
|
|
||||||
<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<button name="action_view_orderpoints" position="attributes">
|
|
||||||
<attribute name="attrs">{'invisible': True}</attribute>
|
|
||||||
</button>
|
|
||||||
<button name="action_view_routes" position="attributes">
|
|
||||||
<attribute name="attrs">{'invisible': True}</attribute>
|
|
||||||
</button>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="stock.menu_stock_order_points" model="ir.ui.menu">
|
|
||||||
<field name="groups_id" eval="[(6, 0, [ref('base.group_system')])]"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from . import purchase_suggest
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Purchase Suggest Min Qty on Product module for Odoo
|
|
||||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, fields, api
|
|
||||||
|
|
||||||
|
|
||||||
class PurchaseSuggestionGenerate(models.TransientModel):
|
|
||||||
_inherit = 'purchase.suggest.generate'
|
|
||||||
|
|
||||||
# Without this module, when we use orderpoints, if there are no orderpoints
|
|
||||||
# for a consu product, Odoo will not suggest to re-order it.
|
|
||||||
# But, with this module, Odoo will also suggest to re-order the consu
|
|
||||||
# products, which may not be what the user wants
|
|
||||||
product_type = fields.Selection([
|
|
||||||
('product', 'Stockable Product'),
|
|
||||||
('product_and_consu', 'Consumable and Stockable Product'),
|
|
||||||
], default='product', string='Product Type')
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _prepare_suggest_line(self, product_id, qty_dict):
|
|
||||||
sline = super(PurchaseSuggestionGenerate, self)._prepare_suggest_line(
|
|
||||||
product_id, qty_dict)
|
|
||||||
sline['company_id'] = self.env.user.company_id.id
|
|
||||||
return sline
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def generate_products_dict(self):
|
|
||||||
'''inherit the native method to use min_qty/max_qty on
|
|
||||||
product.product'''
|
|
||||||
ppo = self.env['product.product']
|
|
||||||
products = {}
|
|
||||||
product_domain = self._prepare_product_domain()
|
|
||||||
if self.product_type == 'product':
|
|
||||||
product_domain.append(('type', '=', 'product'))
|
|
||||||
product_to_analyse = ppo.search(product_domain)
|
|
||||||
for product in product_to_analyse:
|
|
||||||
# We also want the missing product that have min_qty = 0
|
|
||||||
# So we remove "if product.z_stock_min > 0"
|
|
||||||
products[product.id] = {
|
|
||||||
'min_qty': product.min_qty,
|
|
||||||
'max_qty': product.max_qty,
|
|
||||||
'draft_po_qty': 0.0, # This value is set later on
|
|
||||||
'orderpoint': False,
|
|
||||||
'product': product,
|
|
||||||
}
|
|
||||||
return products
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="purchase_suggest_generate_form" model="ir.ui.view">
|
|
||||||
<field name="name">purchase_suggest_min_qty_on_product.generate.form</field>
|
|
||||||
<field name="model">purchase.suggest.generate</field>
|
|
||||||
<field name="inherit_id" ref="purchase_suggest.purchase_suggest_generate_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="location_id" position="attributes">
|
|
||||||
<attribute name="invisible">1</attribute>
|
|
||||||
</field>
|
|
||||||
<field name="categ_ids" position="before">
|
|
||||||
<field name="product_type"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Purchase Usability Extension module for OpenERP
|
# Purchase Usability module for OpenERP
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Purchase Usability Extension',
|
'name': 'Purchase Usability',
|
||||||
'version': '0.1',
|
'version': '0.1',
|
||||||
'category': 'Purchase Management',
|
'category': 'Purchase Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Sale Line Product Required module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Sale Line Product Required module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Sale Order Line Product Required',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Sale Management',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Product becomes a required field on sale order lines',
|
|
||||||
'description': """
|
|
||||||
Sale Order Line Product Required
|
|
||||||
================================
|
|
||||||
|
|
||||||
Product becomes a required field on sale order lines.
|
|
||||||
|
|
||||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['sale'],
|
|
||||||
'data': ['sale_view.xml'],
|
|
||||||
'active': False,
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_order_form" model="ir.ui.view">
|
|
||||||
<field name="name">sale.line.product.required.form</field>
|
|
||||||
<field name="model">sale.order</field>
|
|
||||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
|
||||||
<!-- High priority, to go after sale_stock, which STUPIDLY replaces the field
|
|
||||||
product_id, instead of doing position="attributes" -->
|
|
||||||
<field name="priority">100</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="attributes">
|
|
||||||
<attribute name="required">1</attribute>
|
|
||||||
</xpath>
|
|
||||||
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
|
|
||||||
<attribute name="required">1</attribute>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Sale Stock Show Delivery Address module for OpenERP/Odoo
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Sale Stock Show Delivery Address module for OpenERP/Odoo
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Sale Stock Show Delivery Address',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': '',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Show full address in sale order and delivery order forms',
|
|
||||||
'description': """
|
|
||||||
With this module, you will see the full address in the sale order form view and the delivery order form view.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['sale_stock'],
|
|
||||||
'data': ['sale_view.xml', 'stock_view.xml'],
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_order_form" model="ir.ui.view">
|
|
||||||
<field name="name">show.delivery.address.sale.order.form</field>
|
|
||||||
<field name="model">sale.order</field>
|
|
||||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="partner_shipping_id" position="attributes">
|
|
||||||
<attribute name="context">{'show_address': 1, 'default_type': 'delivery'}</attribute>
|
|
||||||
<attribute name="options">{'always_reload': True}</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
|
||||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
<record id="view_picking_form" model="ir.ui.view">
|
|
||||||
<field name="name">show.address.stock.picking.form</field>
|
|
||||||
<field name="model">stock.picking</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="partner_id" position="attributes">
|
|
||||||
<attribute name="context">{'show_address': 1}</attribute>
|
|
||||||
<attribute name="options">{'always_reload': True}</attribute>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Sale Usability Extension module for Odoo
|
# Sale Usability module for Odoo
|
||||||
# Copyright (C) 2014-2016 Akretion (http://www.akretion.com)
|
# Copyright (C) 2014-2016 Akretion (http://www.akretion.com)
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Sale Usability Extension',
|
'name': 'Sale Usability',
|
||||||
'version': '0.1',
|
'version': '0.1',
|
||||||
'category': 'Sale Management',
|
'category': 'Sale Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Stock Display Destination Move module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Stock Display Destination Move module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Stock Display Destination Move',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Inventory, Logistic, Storage',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Display the field Destination Move in the Stock Move form view',
|
|
||||||
'description': """
|
|
||||||
Stock Display Destination Move
|
|
||||||
==============================
|
|
||||||
|
|
||||||
Display the field Destination Move in the Stock Move form view for Stock Managers in read-only. Very usefull for advanced users and debug purposes.
|
|
||||||
|
|
||||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['stock'],
|
|
||||||
'data': ['stock_view.xml'],
|
|
||||||
'installable': True,
|
|
||||||
'active': False,
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_move_form" model="ir.ui.view">
|
|
||||||
<field name="name">display.move_dest_id.in.stock.move.form</field>
|
|
||||||
<field name="model">stock.move</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_move_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="company_id" position="after">
|
|
||||||
<field name="move_dest_id" groups="stock.group_stock_manager" readonly="True"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_move_picking_form" model="ir.ui.view">
|
|
||||||
<field name="name">display.move_dest_id.in.stock.move.picking.form</field>
|
|
||||||
<field name="model">stock.move</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_move_picking_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="product_packaging" position="after">
|
|
||||||
<field name="move_dest_id" groups="stock.group_stock_manager" readonly="True"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_procurement_form_stock_inherit" model="ir.ui.view">
|
|
||||||
<field name="name">display.move_dest_id.procurement.order.form</field>
|
|
||||||
<field name="model">procurement.order</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_procurement_form_stock_inherit"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="partner_dest_id" position="before">
|
|
||||||
<field name="move_dest_id" groups="stock.group_stock_manager" readonly="True"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Stock Display Destination Move module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Stock Display Sale ID module for OpenERP
|
|
||||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# 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': 'Stock Display Sale ID',
|
|
||||||
'version': '0.1',
|
|
||||||
'category': 'Inventory, Logistic, Storage',
|
|
||||||
'license': 'AGPL-3',
|
|
||||||
'summary': 'Display the link to the sale order in the Delivery Order',
|
|
||||||
'description': """
|
|
||||||
Stock Display Sale ID
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Display the link to the sale order in the Delivery Order form view.
|
|
||||||
|
|
||||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
|
||||||
""",
|
|
||||||
'author': 'Akretion',
|
|
||||||
'website': 'http://www.akretion.com',
|
|
||||||
'depends': ['sale_stock'],
|
|
||||||
'data': ['stock_view.xml'],
|
|
||||||
'installable': True,
|
|
||||||
'active': False,
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
|
||||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
|
||||||
The licence is in the file __openerp__.py
|
|
||||||
-->
|
|
||||||
|
|
||||||
<openerp>
|
|
||||||
<data>
|
|
||||||
|
|
||||||
|
|
||||||
<record id="view_picking_form" model="ir.ui.view">
|
|
||||||
<field name="name">display.sale_id.in.outgoing.picking.form</field>
|
|
||||||
<field name="model">stock.picking</field>
|
|
||||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="origin" position="after">
|
|
||||||
<field name="sale_id" readonly="1" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
|
||||||
</data>
|
|
||||||
</openerp>
|
|
||||||
Reference in New Issue
Block a user