Skip to content

Commit

Permalink
Merge a6a2103 into feffb06
Browse files Browse the repository at this point in the history
  • Loading branch information
tafaRU committed Sep 15, 2015
2 parents feffb06 + a6a2103 commit 1071d35
Show file tree
Hide file tree
Showing 15 changed files with 177 additions and 150 deletions.
103 changes: 0 additions & 103 deletions __unported__/stock_invoice_picking_incoterm/stock.py

This file was deleted.

25 changes: 0 additions & 25 deletions __unported__/stock_invoice_picking_incoterm/stock_view.xml

This file was deleted.

50 changes: 50 additions & 0 deletions stock_invoice_picking_incoterm/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

Stock Invoice Picking Incoterm
==============================

This module adds the field incoterm to invoice and picking. In this way the
user can specify the incoterm directly on these documents, with no need to
refer to the incoterm of the order (which could even be missing).
The module extends 'stock_invoice_picking' so that the invoices created
from pickings will have the same incoterm set in the picking.

Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch}

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/account-invoicing/issues/new?body=module:%20stock_invoice_picking_incoterm%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.


Credits
=======

Contributors
------------

* Alex Comba <alex.comba@agilebg.com>

Maintainer
----------

.. image:: http://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: http://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Agile Business Group sagl
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Agile Business Group sagl
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
# @author Alex Comba <alex.comba@agilebg.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
Expand All @@ -21,27 +20,20 @@
##############################################################################
{
'name': "Stock Invoice Picking Incoterm",
'version': '0.1',
'version': '8.0.1.0.0',
'category': 'Warehouse Management',
'description': """
This module adds the field incoterm to invoice and picking. In this way the
user can specify the incoterm directly on these documents, with no need to
refer to the incoterm of the order (which could even be missing).
The module extends 'stock_invoice_picking' so that the invoices created
from pickings will have the same incoterm set in the picking.
""",
'author': "Agile Business Group,Odoo Community Association (OCA)",
'author': "Agile Business Group, Odoo Community Association (OCA)",
'website': 'http://www.agilebg.com',
'license': 'AGPL-3',
'depends': [
'stock_invoice_picking',
'stock_picking_invoicing',
],
'data': [
'account_invoice_view.xml',
'stock_view.xml',
],
'test': [
'test/invoice_picking_incoterm.yml',
'test/stock_invoice_picking_incoterm.yml',
],
'installable': False
'installable': True
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Agile Business Group sagl
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
Expand All @@ -22,7 +22,7 @@
from openerp.osv import fields, orm


class account_invoice(orm.Model):
class AccountInvoice(orm.Model):
_inherit = "account.invoice"

_columns = {
Expand Down
53 changes: 53 additions & 0 deletions stock_invoice_picking_incoterm/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * stock_invoice_picking_incoterm
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-08 07:22+0000\n"
"PO-Revision-Date: 2015-01-04 16:42+0100\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
"Language: de\n"

#. module: stock_invoice_picking_incoterm
#: field:account.invoice,incoterm:0 field:stock.picking,incoterm:0
#: field:stock.picking.in,incoterm:0 field:stock.picking.out,incoterm:0
msgid "Incoterm"
msgstr "INCO-Terms"

#. module: stock_invoice_picking_incoterm
#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking_in
msgid "Incoming Shipments"
msgstr "Eingehende Lieferungen"

#. module: stock_invoice_picking_incoterm
#: model:ir.model,name:stock_invoice_picking_incoterm.model_account_invoice
msgid "Invoice"
msgstr "Rechnung"

#. module: stock_invoice_picking_incoterm
#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking
msgid "Picking List"
msgstr "Kommissionierschein"

#. module: stock_invoice_picking_incoterm
#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking_out
msgid "Delivery Orders"
msgstr "Lieferaufträge"

#. module: stock_invoice_picking_incoterm
#: help:account.invoice,incoterm:0 help:stock.picking,incoterm:0
#: help:stock.picking.in,incoterm:0 help:stock.picking.out,incoterm:0
msgid ""
"International Commercial Terms are a series of predefined commercial terms "
"used in international transactions."
msgstr ""
"Internationale Kommerzielle Bedingungen (INCO-Terms) sind ein Reihe "
"vordefinierter Bedingungen aus internationalem Geschäftsverkehr "
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions stock_invoice_picking_incoterm/stock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.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 fields, orm


class StockPicking(orm.Model):
_inherit = "stock.picking"

_columns = {
'incoterm': fields.many2one(
'stock.incoterms',
'Incoterm',
help="International Commercial Terms are a series of predefined "
"commercial terms used in international transactions."
),
}

def _get_invoice_vals(
self, cr, uid, key,
inv_type, journal_id, move, context=None):
invoice_vals = super(StockPicking, self)._get_invoice_vals(
cr, uid, key, inv_type, journal_id, move, context=context)
if move.picking_id.incoterm:
invoice_vals['incoterm'] = move.picking_id.incoterm.id
return invoice_vals
17 changes: 17 additions & 0 deletions stock_invoice_picking_incoterm/stock_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<record id="view_picking_form_inherit" model="ir.ui.view">
<field name="name">stock.picking.invoice.form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<field name="date_done" position="after">
<field name="incoterm" widget="selection"/>
</field>
</field>
</record>

</data>
</openerp>
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
!record {model: stock.picking, id: stock_picking_out0}:
partner_id: base.res_partner_address_22
invoice_state: 2binvoiced
picking_type_id: stock.picking_type_out
move_lines:
- company_id: base.main_company
location_id: stock.stock_location_stock
product_id: product.product_product_3
product_qty: 3.0
product_uom: product.product_uom_unit
product_uom_qty: 3.0
location_dest_id: stock.stock_location_customers
move_type: direct
type: out
-
I modify the outgoing picking order and set the incoterm.
-
Expand All @@ -22,10 +21,10 @@
-
I process the delivery
-
!python {model: stock.partial.picking}: |
!python {model: stock.transfer_details}: |
partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking',
'active_ids':[ref('stock_picking_out0')]})
self.do_partial(cr, uid, [partial_id])
self.do_detailed_transfer(cr, uid, [partial_id])

-
As the invoice state of the picking order is to be invoiced. I create invoice for my outgoing picking order.
Expand Down

0 comments on commit 1071d35

Please sign in to comment.