Merge lp:~agilebg/account-invoicing/adding_stock_invoice_picking_incoterm_7 into lp:~account-core-editors/account-invoicing/7.0

Proposed by Alex Comba - Agile BG
Status: Merged
Merged at revision: 44
Proposed branch: lp:~agilebg/account-invoicing/adding_stock_invoice_picking_incoterm_7
Merge into: lp:~account-core-editors/account-invoicing/7.0
Diff against target: 453 lines (+400/-0)
9 files modified
stock_invoice_picking_incoterm/__init__.py (+22/-0)
stock_invoice_picking_incoterm/__openerp__.py (+47/-0)
stock_invoice_picking_incoterm/account_invoice.py (+35/-0)
stock_invoice_picking_incoterm/account_invoice_view.xml (+17/-0)
stock_invoice_picking_incoterm/i18n/it.po (+53/-0)
stock_invoice_picking_incoterm/i18n/stock_invoice_picking_incoterm.pot (+53/-0)
stock_invoice_picking_incoterm/stock.py (+103/-0)
stock_invoice_picking_incoterm/stock_view.xml (+25/-0)
stock_invoice_picking_incoterm/test/invoice_picking_incoterm.yml (+45/-0)
To merge this branch: bzr merge lp:~agilebg/account-invoicing/adding_stock_invoice_picking_incoterm_7
Reviewer Review Type Date Requested Status
Lorenzo Battistini (community) code review Approve
Pedro Manuel Baeza code review Approve
Review via email: mp+213987@code.launchpad.net

Commit message

[ADD] module stock_invoice_picking_incoterm

Description of the change

I added the module named 'stock_invoice_picking_incoterm'.

It 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.

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Alex, thank you very much for the contribution. Some remarks:

- l.137: Please close string before \ to avoid that spaces on translations (you will have to export again translations):

help="International Commercial Terms are a series of predefined " \
    "commercial terms used in international transactions."

- l.135,382,392: Is it necessary to put such a complicated xpath? This makes more difficult to migrate code to future versions. If there is only one 'date_due' field, you can put directly <field name="date_due".../>. If there is more than one, at least you can put relative xpath to make it more portable: <xpath expr="//page[@string='Other Info']//field[@name='date_due']"

- l.302,311,333,339: indentation of the second line of methods must be indented higher than the indentation of the nested block according PEP8 (http://legacy.python.org/dev/peps/pep-0008/#indentation). This is my suggestion:

def _prepare_invoice_group(
        self, cr, uid, picking, partner,
        invoice, context=None):
    invoice_vals = ...

- Don't you think that it's convenient to copy incoterm (if any) from sale order to picking?

Very good detail including a test.

Regards.

review: Needs Fixing (code review)
41. By Alex Comba - Agile BG

[FIX] Closed string before \ to avoid the space on traslation

42. By Alex Comba - Agile BG

[FIX] Replaced xpath by field

43. By Alex Comba - Agile BG

[ADD] new po and pot files

44. By Alex Comba - Agile BG

[FIX] indentations according to PEP8

45. By Alex Comba - Agile BG

[FIX] Esported again translation files

46. By Alex Comba - Agile BG

[REM] key 'active' from the module manifest file

Revision history for this message
Alex Comba - Agile BG (tafaru) wrote :

Hi, Pedro, thanks a lot for your review.

I made the changes as you suggested, please have a look at them.

About:
> Don't you think that it's convenient to copy incoterm (if any) from sale order to picking?

This module depends on 'stock_invoice_picking' and has been designed on purpose when 'sale' e 'sale_stock are not used. Be the case, for what you suggested, we could make something additional like 'stock_invoice_picking_incoterm_sale'.

Cheers.

Revision history for this message
Alex Comba - Agile BG (tafaru) wrote :

> when 'sale' e 'sale_stock

Pedro, 'e' stands for 'and', sorry ;-)

47. By Alex Comba - Agile BG

[FIX] Replaced xpath by field for date_due in invoice_form

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Alex,

Thank you for the changes you have made, and the explanation about the sale to invoice procedure.

One more thing before the approval: please check again multi-line texts. They are still bad constructed and split wiht a lot of spaces on translations. If you see my example, you can see that I have put " terminating each line. This is the thing that prevents to copy spaces in the string. I have put one space though to keep separation between words.

Regards.

review: Needs Fixing (code review)
48. By Alex Comba - Agile BG

[FIX] multi-line texts to prevent they split wiht a lot of spaces on translations

Revision history for this message
Alex Comba - Agile BG (tafaru) wrote :

Hi Pedro,

now it should be ok, please have a look at it, thank you.

Cheers.

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks again.

Regards.

review: Approve (code review)
Revision history for this message
Lorenzo Battistini (elbati) :
review: Approve (code review)
49. By Alex Comba - Agile BG

[ADD] img/icong.png

Revision history for this message
Alex Comba - Agile BG (tafaru) wrote :

Pedro and Lorenzo,

FYI, after your approve, I still added the file icon.png (ver. #49).

Cheers.

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks for the info, Alex,

Also FYI, if you feel that any other change needs a revision, you can click on "Resubmit proposal" to reset reviews.

Regards.

Revision history for this message
Alex Comba - Agile BG (tafaru) wrote :

Thanks for the tip about "Resubmit proposal", Pedro.

Cheers.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'stock_invoice_picking_incoterm'
2=== added file 'stock_invoice_picking_incoterm/__init__.py'
3--- stock_invoice_picking_incoterm/__init__.py 1970-01-01 00:00:00 +0000
4+++ stock_invoice_picking_incoterm/__init__.py 2014-04-09 15:52:05 +0000
5@@ -0,0 +1,22 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# Copyright (C) 2014 Agile Business Group sagl
10+# (<http://www.agilebg.com>)
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU Affero General Public License as published
14+# by the Free Software Foundation, either version 3 of the License, or
15+# (at your option) any later version.
16+#
17+# This program is distributed in the hope that it will be useful,
18+# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+# GNU Affero General Public License for more details.
21+#
22+# You should have received a copy of the GNU Affero General Public License
23+# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+#
25+##############################################################################
26+from . import account_invoice
27+from . import stock
28
29=== added file 'stock_invoice_picking_incoterm/__openerp__.py'
30--- stock_invoice_picking_incoterm/__openerp__.py 1970-01-01 00:00:00 +0000
31+++ stock_invoice_picking_incoterm/__openerp__.py 2014-04-09 15:52:05 +0000
32@@ -0,0 +1,47 @@
33+# -*- coding: utf-8 -*-
34+##############################################################################
35+#
36+# Copyright (C) 2014 Agile Business Group sagl
37+# (<http://www.agilebg.com>)
38+# @author Alex Comba <alex.comba@agilebg.com>
39+#
40+# This program is free software: you can redistribute it and/or modify
41+# it under the terms of the GNU Affero General Public License as published
42+# by the Free Software Foundation, either version 3 of the License, or
43+# (at your option) any later version.
44+#
45+# This program is distributed in the hope that it will be useful,
46+# but WITHOUT ANY WARRANTY; without even the implied warranty of
47+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48+# GNU Affero General Public License for more details.
49+#
50+# You should have received a copy of the GNU Affero General Public License
51+# along with this program. If not, see <http://www.gnu.org/licenses/>.
52+#
53+##############################################################################
54+{
55+ 'name': "Stock Invoice Picking Incoterm",
56+ 'version': '0.1',
57+ 'category': 'Warehouse Management',
58+ 'description': """
59+This module adds the field incoterm to invoice and picking. In this way the
60+user can specify the incoterm directly on these documents, with no need to
61+refer to the incoterm of the order (which could even be missing).
62+The module extends 'stock_invoice_picking' so that the invoices created
63+from pickings will have the same incoterm set in the picking.
64+""",
65+ 'author': 'Agile Business Group',
66+ 'website': 'http://www.agilebg.com',
67+ 'license': 'AGPL-3',
68+ 'depends': [
69+ 'stock_invoice_picking',
70+ ],
71+ 'data': [
72+ 'account_invoice_view.xml',
73+ 'stock_view.xml',
74+ ],
75+ 'test': [
76+ 'test/invoice_picking_incoterm.yml',
77+ ],
78+ 'installable': True
79+}
80
81=== added file 'stock_invoice_picking_incoterm/account_invoice.py'
82--- stock_invoice_picking_incoterm/account_invoice.py 1970-01-01 00:00:00 +0000
83+++ stock_invoice_picking_incoterm/account_invoice.py 2014-04-09 15:52:05 +0000
84@@ -0,0 +1,35 @@
85+# -*- coding: utf-8 -*-
86+##############################################################################
87+#
88+# Copyright (C) 2014 Agile Business Group sagl
89+# (<http://www.agilebg.com>)
90+#
91+# This program is free software: you can redistribute it and/or modify
92+# it under the terms of the GNU Affero General Public License as published
93+# by the Free Software Foundation, either version 3 of the License, or
94+# (at your option) any later version.
95+#
96+# This program is distributed in the hope that it will be useful,
97+# but WITHOUT ANY WARRANTY; without even the implied warranty of
98+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
99+# GNU Affero General Public License for more details.
100+#
101+# You should have received a copy of the GNU Affero General Public License
102+# along with this program. If not, see <http://www.gnu.org/licenses/>.
103+#
104+##############################################################################
105+
106+from openerp.osv import fields, orm
107+
108+
109+class account_invoice(orm.Model):
110+ _inherit = "account.invoice"
111+
112+ _columns = {
113+ 'incoterm': fields.many2one(
114+ 'stock.incoterms',
115+ 'Incoterm',
116+ help="International Commercial Terms are a series of predefined "
117+ "commercial terms used in international transactions."
118+ ),
119+ }
120
121=== added file 'stock_invoice_picking_incoterm/account_invoice_view.xml'
122--- stock_invoice_picking_incoterm/account_invoice_view.xml 1970-01-01 00:00:00 +0000
123+++ stock_invoice_picking_incoterm/account_invoice_view.xml 2014-04-09 15:52:05 +0000
124@@ -0,0 +1,17 @@
125+<?xml version="1.0" encoding="utf-8"?>
126+<openerp>
127+ <data>
128+
129+ <record id="view_invoice_form" model="ir.ui.view">
130+ <field name="name">account.invoice.form</field>
131+ <field name="model">account.invoice</field>
132+ <field name="inherit_id" ref="account.invoice_form"/>
133+ <field name="arch" type="xml">
134+ <field name="date_due" position="after">
135+ <field name="incoterm" widget="selection"/>
136+ </field>
137+ </field>
138+ </record>
139+
140+ </data>
141+</openerp>
142\ No newline at end of file
143
144=== added directory 'stock_invoice_picking_incoterm/i18n'
145=== added file 'stock_invoice_picking_incoterm/i18n/it.po'
146--- stock_invoice_picking_incoterm/i18n/it.po 1970-01-01 00:00:00 +0000
147+++ stock_invoice_picking_incoterm/i18n/it.po 2014-04-09 15:52:05 +0000
148@@ -0,0 +1,53 @@
149+# Translation of OpenERP Server.
150+# This file contains the translation of the following modules:
151+# * stock_invoice_picking_incoterm
152+#
153+msgid ""
154+msgstr ""
155+"Project-Id-Version: OpenERP Server 7.0\n"
156+"Report-Msgid-Bugs-To: \n"
157+"POT-Creation-Date: 2014-04-08 07:23+0000\n"
158+"PO-Revision-Date: 2014-04-08 09:30+0100\n"
159+"Last-Translator: Alex Comba <alex.comba@agilebg.com>\n"
160+"Language-Team: \n"
161+"MIME-Version: 1.0\n"
162+"Content-Type: text/plain; charset=UTF-8\n"
163+"Content-Transfer-Encoding: 8bit\n"
164+"Plural-Forms: \n"
165+"X-Generator: Poedit 1.5.4\n"
166+
167+#. module: stock_invoice_picking_incoterm
168+#: field:account.invoice,incoterm:0 field:stock.picking,incoterm:0
169+#: field:stock.picking.in,incoterm:0 field:stock.picking.out,incoterm:0
170+msgid "Incoterm"
171+msgstr "Incoterm"
172+
173+#. module: stock_invoice_picking_incoterm
174+#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking_in
175+msgid "Incoming Shipments"
176+msgstr "Spedizioni in entrata"
177+
178+#. module: stock_invoice_picking_incoterm
179+#: model:ir.model,name:stock_invoice_picking_incoterm.model_account_invoice
180+msgid "Invoice"
181+msgstr "Fattura"
182+
183+#. module: stock_invoice_picking_incoterm
184+#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking
185+msgid "Picking List"
186+msgstr "Picking List"
187+
188+#. module: stock_invoice_picking_incoterm
189+#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking_out
190+msgid "Delivery Orders"
191+msgstr "Ordini di Consegna"
192+
193+#. module: stock_invoice_picking_incoterm
194+#: help:account.invoice,incoterm:0 help:stock.picking,incoterm:0
195+#: help:stock.picking.in,incoterm:0 help:stock.picking.out,incoterm:0
196+msgid ""
197+"International Commercial Terms are a series of predefined commercial terms "
198+"used in international transactions."
199+msgstr ""
200+"I termini commerciali internazionali sono una serie di termini commerciali "
201+"predefiniti usati nelle transazioni internazionali."
202
203=== added file 'stock_invoice_picking_incoterm/i18n/stock_invoice_picking_incoterm.pot'
204--- stock_invoice_picking_incoterm/i18n/stock_invoice_picking_incoterm.pot 1970-01-01 00:00:00 +0000
205+++ stock_invoice_picking_incoterm/i18n/stock_invoice_picking_incoterm.pot 2014-04-09 15:52:05 +0000
206@@ -0,0 +1,53 @@
207+# Translation of OpenERP Server.
208+# This file contains the translation of the following modules:
209+# * stock_invoice_picking_incoterm
210+#
211+msgid ""
212+msgstr ""
213+"Project-Id-Version: OpenERP Server 7.0\n"
214+"Report-Msgid-Bugs-To: \n"
215+"POT-Creation-Date: 2014-04-08 07:22+0000\n"
216+"PO-Revision-Date: 2014-04-08 07:22+0000\n"
217+"Last-Translator: <>\n"
218+"Language-Team: \n"
219+"MIME-Version: 1.0\n"
220+"Content-Type: text/plain; charset=UTF-8\n"
221+"Content-Transfer-Encoding: \n"
222+"Plural-Forms: \n"
223+
224+#. module: stock_invoice_picking_incoterm
225+#: field:account.invoice,incoterm:0
226+#: field:stock.picking,incoterm:0
227+#: field:stock.picking.in,incoterm:0
228+#: field:stock.picking.out,incoterm:0
229+msgid "Incoterm"
230+msgstr ""
231+
232+#. module: stock_invoice_picking_incoterm
233+#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking_in
234+msgid "Incoming Shipments"
235+msgstr ""
236+
237+#. module: stock_invoice_picking_incoterm
238+#: model:ir.model,name:stock_invoice_picking_incoterm.model_account_invoice
239+msgid "Invoice"
240+msgstr ""
241+
242+#. module: stock_invoice_picking_incoterm
243+#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking
244+msgid "Picking List"
245+msgstr ""
246+
247+#. module: stock_invoice_picking_incoterm
248+#: model:ir.model,name:stock_invoice_picking_incoterm.model_stock_picking_out
249+msgid "Delivery Orders"
250+msgstr ""
251+
252+#. module: stock_invoice_picking_incoterm
253+#: help:account.invoice,incoterm:0
254+#: help:stock.picking,incoterm:0
255+#: help:stock.picking.in,incoterm:0
256+#: help:stock.picking.out,incoterm:0
257+msgid "International Commercial Terms are a series of predefined commercial terms used in international transactions."
258+msgstr ""
259+
260
261=== added directory 'stock_invoice_picking_incoterm/static'
262=== added directory 'stock_invoice_picking_incoterm/static/src'
263=== added directory 'stock_invoice_picking_incoterm/static/src/img'
264=== added file 'stock_invoice_picking_incoterm/static/src/img/icon.png'
265Binary files stock_invoice_picking_incoterm/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and stock_invoice_picking_incoterm/static/src/img/icon.png 2014-04-09 15:52:05 +0000 differ
266=== added file 'stock_invoice_picking_incoterm/stock.py'
267--- stock_invoice_picking_incoterm/stock.py 1970-01-01 00:00:00 +0000
268+++ stock_invoice_picking_incoterm/stock.py 2014-04-09 15:52:05 +0000
269@@ -0,0 +1,103 @@
270+# -*- coding: utf-8 -*-
271+##############################################################################
272+#
273+# Copyright (C) 2014 Agile Business Group sagl
274+# (<http://www.agilebg.com>)
275+#
276+# This program is free software: you can redistribute it and/or modify
277+# it under the terms of the GNU Affero General Public License as published
278+# by the Free Software Foundation, either version 3 of the License, or
279+# (at your option) any later version.
280+#
281+# This program is distributed in the hope that it will be useful,
282+# but WITHOUT ANY WARRANTY; without even the implied warranty of
283+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
284+# GNU Affero General Public License for more details.
285+#
286+# You should have received a copy of the GNU Affero General Public License
287+# along with this program. If not, see <http://www.gnu.org/licenses/>.
288+#
289+##############################################################################
290+
291+from openerp.osv import fields, orm
292+
293+
294+class stock_picking(orm.Model):
295+ _inherit = "stock.picking"
296+
297+ _columns = {
298+ 'incoterm': fields.many2one(
299+ 'stock.incoterms',
300+ 'Incoterm',
301+ help="International Commercial Terms are a series of predefined "
302+ "commercial terms used in international transactions."
303+ ),
304+ }
305+
306+ def _prepare_invoice_group(
307+ self, cr, uid, picking,
308+ partner, invoice, context=None):
309+ invoice_vals = super(stock_picking, self)._prepare_invoice_group(
310+ cr, uid, picking, partner, invoice, context)
311+ if picking.incoterm:
312+ invoice_vals['incoterm'] = picking.incoterm.id
313+ return invoice_vals
314+
315+ def _prepare_invoice(
316+ self, cr, uid, picking,
317+ partner, inv_type, journal_id, context=None):
318+ invoice_vals = super(stock_picking, self)._prepare_invoice(
319+ cr, uid, picking, partner, inv_type, journal_id, context=context)
320+ if picking.incoterm:
321+ invoice_vals['incoterm'] = picking.incoterm.id
322+ return invoice_vals
323+
324+
325+class stock_picking_in(orm.Model):
326+ _inherit = "stock.picking.in"
327+
328+ _columns = {
329+ 'incoterm': fields.many2one(
330+ 'stock.incoterms',
331+ 'Incoterm',
332+ help="International Commercial Terms are a series of predefined "
333+ "commercial terms used in international transactions."
334+ ),
335+ }
336+
337+ def _prepare_invoice_group(
338+ self, cr, uid, picking,
339+ partner, invoice, context=None):
340+ return self.pool.get('stock.picking')._prepare_invoice_group(
341+ cr, uid, picking, partner, invoice, context=context)
342+
343+ def _prepare_invoice(
344+ self, cr, uid, picking,
345+ partner, inv_type, journal_id, context=None):
346+ return self.pool.get('stock.picking')._prepare_invoice(
347+ cr, uid, picking, partner, inv_type, journal_id, context=context)
348+
349+
350+class stock_picking_out(orm.Model):
351+ _inherit = "stock.picking.out"
352+
353+ _columns = {
354+ 'incoterm': fields.many2one(
355+ 'stock.incoterms',
356+ 'Incoterm',
357+ help="International Commercial Terms are a series of predefined "
358+ "commercial terms used in international transactions."
359+ ),
360+ }
361+
362+ def _prepare_invoice_group(
363+ self, cr, uid, picking,
364+ partner, invoice, context=None):
365+ return self.pool.get('stock.picking')._prepare_invoice_group(
366+ cr, uid, picking, partner, invoice, context=context)
367+
368+ def _prepare_invoice(
369+ self, cr, uid, picking,
370+ partner, inv_type, journal_id, context=None):
371+ return self.pool.get('stock.picking')._prepare_invoice(
372+ cr, uid, picking, partner, inv_type, journal_id, context=context)
373
374=== added file 'stock_invoice_picking_incoterm/stock_view.xml'
375--- stock_invoice_picking_incoterm/stock_view.xml 1970-01-01 00:00:00 +0000
376+++ stock_invoice_picking_incoterm/stock_view.xml 2014-04-09 15:52:05 +0000
377@@ -0,0 +1,25 @@
378+<?xml version="1.0" encoding="utf-8"?>
379+<openerp>
380+<data>
381+ <record id="view_picking_out_form" model="ir.ui.view">
382+ <field name="name">stock.picking.invoice.out.form</field>
383+ <field name="model">stock.picking.out</field>
384+ <field name="inherit_id" ref="stock.view_picking_out_form"/>
385+ <field name="arch" type="xml">
386+ <field name="date_done" position="after">
387+ <field name="incoterm" widget="selection"/>
388+ </field>
389+ </field>
390+ </record>
391+ <record id="view_picking_in_form" model="ir.ui.view">
392+ <field name="name">stock.picking.invoice.in.form</field>
393+ <field name="model">stock.picking.in</field>
394+ <field name="inherit_id" ref="stock.view_picking_in_form"/>
395+ <field name="arch" type="xml">
396+ <field name="date_done" position="after">
397+ <field name="incoterm" widget="selection"/>
398+ </field>
399+ </field>
400+ </record>
401+</data>
402+</openerp>
403
404=== added directory 'stock_invoice_picking_incoterm/test'
405=== added file 'stock_invoice_picking_incoterm/test/invoice_picking_incoterm.yml'
406--- stock_invoice_picking_incoterm/test/invoice_picking_incoterm.yml 1970-01-01 00:00:00 +0000
407+++ stock_invoice_picking_incoterm/test/invoice_picking_incoterm.yml 2014-04-09 15:52:05 +0000
408@@ -0,0 +1,45 @@
409+-
410+ In order to test the stock_invoice_picking_incoterm module.
411+ First I create an outgoing picking order
412+-
413+ !record {model: stock.picking, id: stock_picking_out0}:
414+ partner_id: base.res_partner_address_22
415+ invoice_state: 2binvoiced
416+ move_lines:
417+ - company_id: base.main_company
418+ location_id: stock.stock_location_stock
419+ product_id: product.product_product_3
420+ product_qty: 3.0
421+ product_uom: product.product_uom_unit
422+ location_dest_id: stock.stock_location_customers
423+ move_type: direct
424+ type: out
425+-
426+ I modify the outgoing picking order and set the incoterm.
427+-
428+ !record {model: stock.picking, id: stock_picking_out0}:
429+ incoterm: stock.incoterm_EXW
430+-
431+ I process the delivery
432+-
433+ !python {model: stock.partial.picking}: |
434+ partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking',
435+ 'active_ids':[ref('stock_picking_out0')]})
436+ self.do_partial(cr, uid, [partial_id])
437+
438+-
439+ As the invoice state of the picking order is to be invoiced. I create invoice for my outgoing picking order.
440+-
441+ !python {model: stock.invoice.onshipping}: |
442+ wiz_id = self.create(cr, uid, {'invoice_date': '2010-08-04', 'journal_id': ref('account.sales_journal')},
443+ {'active_ids': [ref("stock_picking_out0")], "active_model": "stock.picking"})
444+ self.create_invoice(cr, uid, [wiz_id], {"lang": "en_US",
445+ "search_default_available": 1, "tz": False, "active_model": "stock.picking",
446+ "contact_display": "partner", "active_ids": [ref("stock_picking_out0")], "active_id": ref("stock_picking_out0")})
447+-
448+ I check that the invoice incoterm has equal to stock incoterm.
449+-
450+ !python {model: stock.picking}: |
451+ picking = self.browse(cr, uid, ref('stock_picking_out0'))
452+ assert picking.invoice_id.incoterm == picking.incoterm, 'The incoterm values are different'
453+

Subscribers

People subscribed via source and target branches