Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Review: Needs Fixing Hi, I left some diff comments. I'm also annoyed by the incompatibily introduced by this module (override of amount_all and amount_line), but on the other hand there is maybe no other way to do that. Thanks Pedro Diff comments: === added directory 'purchase_discount' === added file 'purchase_discount/__init__.py' --- purchase_discount/__init__.py 1970-01-01 00:00:00 + +++ purchase_discount/__init__.py 2014-05-13 08:16:14 + @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +## +# +#OpenERP, Open Source Management Solution +#Copyright (C) 2004-2009 Tiny SPRL (http://tiny.be). +# +#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 purchase_discount +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'purchase_discount/__openerp__.py' --- purchase_discount/__openerp__.py 1970-01-01 00:00:00 + +++ purchase_discount/__openerp__.py 2014-05-13 08:16:14 + @@ -0,0 +1,48 @@ +# -*- encoding: utf-8 -*- +## +# +#OpenERP, Open Source Management Solution +#Copyright (C) 2004-2009 Tiny SPRL (http://tiny.be). +# +#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 lines with discounts, +author: Tiny, Acysos S.L., +description: It allows to define a discount per line in the purchase +orders. This discount can be also negative, interpreting it as an increment. + +**Contributors**: + * Pedro Manuel Baeza pedro.ba...@serviciosbaeza.com +, +version: 1.0, +contributors: [ +'Pedro M. Baeza', +], +category: Generic Modules/Sales Purchases, +depends: [ +stock, +purchase, +], +demo: [], +data: [ +purchase_discount_view.xml, +account_invoice_view.xml, +report/purchase_discount_report.xml, +], +license: 'AGPL-3', +installable: True +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'purchase_discount/account_invoice_view.xml' --- purchase_discount/account_invoice_view.xml1970-01-01 00:00:00 + +++ purchase_discount/account_invoice_view.xml2014-05-13 08:16:14 + @@ -0,0 +1,17 @@ +openerp +data + +record id=invoice_supplier_form_discount model=ir.ui.view +field name=nameaccount.invoice.supplier.form.discount/field +field name=modelaccount.invoice/field +field name=typeform/field +field name=inherit_id ref=account.invoice_supplier_form/ +field name=arch type=xml +field name=price_unit position=after +field name=discount/ +/field +/field +/record + +/data +/openerp === added directory 'purchase_discount/i18n' === added file 'purchase_discount/i18n/es.po' --- purchase_discount/i18n/es.po 1970-01-01 00:00:00 + +++ purchase_discount/i18n/es.po 2014-05-13 08:16:14 + @@ -0,0 +1,43 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +#* purchase_discount +# +msgid +msgstr +Project-Id-Version: OpenERP Server 5.0.11\n +Report-Msgid-Bugs-To: supp...@openerp.com\n +POT-Creation-Date: 2013-11-07 01:07+\n +PO-Revision-Date: 2013-11-08 17:57+\n
Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Hi, Guewen, thanks for the review. I have fixed your remarks. I don't like also to overwrite function fields methods, but I assure you that there's no other way for now. I'm going to propose a hook method for purchase line base price on core to see if we can improve this module for next version. Regards. -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is subscribed to branch lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Review: Approve code review Great, thanks! -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is subscribed to branch lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
[Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
The proposal to merge lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is subscribed to branch lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Ok, thanks. What about the amount_untaxed, amount_tax, amount_total fields repeated 2 times? -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is requested to review the proposed merge of lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
You're right. I don't know how can I overpassed that! I have corrected. Thanks. Regards. -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is requested to review the proposed merge of lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Review: Approve code review no test Thanks Pedro, I had long wanted to propose this module on the branch. -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is subscribed to branch lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Review: Needs Fixing Thanks Pedro, line 349: I think discount should not be -100 too line 399: amount_untaxed and following fields are present 2 times some PEP8: purchase_discount/__openerp__.py:21:1: O603 Manifest license key is missing purchase_discount/__openerp__.py:29:5: O600 Warning unknown Manifest key ('contributors') purchase_discount/__openerp__.py:43:5: O600 Warning unknown Manifest key ('active') purchase_discount/purchase_discount.py:21:1: O603 Manifest license key is missing purchase_discount/purchase_discount.py:24:1: E302 expected 2 blank lines, found 1 purchase_discount/purchase_discount.py:29:5: O600 Warning unknown Manifest key ('contributors') purchase_discount/purchase_discount.py:35:75: W291 trailing whitespace purchase_discount/purchase_discount.py:43:5: O600 Warning unknown Manifest key ('active') purchase_discount/purchase_discount.py:43:75: W291 trailing whitespace purchase_discount/purchase_discount.py:44:33: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:52:56: W291 trailing whitespace purchase_discount/purchase_discount.py:86:29: E127 continuation line over-indented for visual indent purchase_discount/purchase_discount.py:103:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:104:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:105:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:109:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:110:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:114:17: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:115:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:118:55: W291 trailing whitespace purchase_discount/purchase_discount.py:119:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:119:28: E251 unexpected spaces around keyword / parameter equals purchase_discount/purchase_discount.py:119:57: W291 trailing whitespace purchase_discount/purchase_discount.py:120:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:121:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:123:60: W291 trailing whitespace purchase_discount/purchase_discount.py:125:51: W291 trailing whitespace purchase_discount/purchase_discount.py:126:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:126:28: E251 unexpected spaces around keyword / parameter equals purchase_discount/purchase_discount.py:127:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:130:53: W291 trailing whitespace purchase_discount/purchase_discount.py:131:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:131:28: E251 unexpected spaces around keyword / parameter equals purchase_discount/purchase_discount.py:132:13: E128 continuation line under-indented for visual indent purchase_discount/purchase_discount.py:134:28: E231 missing whitespace after ',' -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is requested to review the proposed merge of lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
Re: [Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Hi, Lorenzo, thanks for your review. I have corrected flake8 output. But about negative restriction in the percentage amount, I don't think it's a good idea, because you can apply a surcharge of whatever percentage you want: for example, -100% to double original price, -200% to triple it, and so on. Regards. -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is requested to review the proposed merge of lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl. -- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp
[Openerp-community-reviewer] [Merge] lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl
Pedro Manuel Baeza has proposed merging lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl. Requested reviews: Purchase Core Editors (purchase-core-editors) For more details, see: https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 [ADD] purchase_discount: Module that I ported some time ago to v7 and included in vauxoo-addons. I think this module deserves to be in OCA repositories to have a standard way for this common need. -- https://code.launchpad.net/~pedro.baeza/purchase-wkfl/7.0-purchase_discount/+merge/217030 Your team Purchase Core Editors is requested to review the proposed merge of lp:~pedro.baeza/purchase-wkfl/7.0-purchase_discount into lp:purchase-wkfl. === added directory 'purchase_discount' === added file 'purchase_discount/__init__.py' --- purchase_discount/__init__.py 1970-01-01 00:00:00 + +++ purchase_discount/__init__.py 2014-04-24 11:42:17 + @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +## +# +#OpenERP, Open Source Management Solution +#Copyright (C) 2004-2009 Tiny SPRL (http://tiny.be). +# +#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 purchase_discount +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'purchase_discount/__openerp__.py' --- purchase_discount/__openerp__.py 1970-01-01 00:00:00 + +++ purchase_discount/__openerp__.py 2014-04-24 11:42:17 + @@ -0,0 +1,45 @@ +# -*- encoding: utf-8 -*- +## +# +#OpenERP, Open Source Management Solution +#Copyright (C) 2004-2009 Tiny SPRL (http://tiny.be). +# +#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 lines with discounts, +author: Tiny, Acysos S.L., +description: +It allows to define a discount per line in the purchase orders. This +discount can be also negative, interpreting it as an increment. +, +version: 1.0, +contributors: [ +'Pedro M. Baeza', +], +category: Generic Modules/Sales Purchases, +depends: [ +stock, +purchase, +], +demo: [], +data: [ +purchase_discount_view.xml, +report/purchase_discount_report.xml, +], +active: False, +installable: True +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added directory 'purchase_discount/i18n' === added file 'purchase_discount/i18n/es.po' --- purchase_discount/i18n/es.po 1970-01-01 00:00:00 + +++ purchase_discount/i18n/es.po 2014-04-24 11:42:17 + @@ -0,0 +1,43 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * purchase_discount +# +msgid +msgstr +Project-Id-Version: OpenERP Server 5.0.11\n +Report-Msgid-Bugs-To: supp...@openerp.com\n +POT-Creation-Date: 2013-11-07 01:07+\n +PO-Revision-Date: 2013-11-08 17:57+\n +Last-Translator: hbto [Vauxoo] http://www.vauxoo.com +humbertoaro...@gmail.com\n +Language-Team: \n +MIME-Version: 1.0\n +Content-Type: text/plain; charset=UTF-8\n +Content-Transfer-Encoding: 8bit\n +X-Launchpad-Export-Date: 2014-01-29 06:04+\n +X-Generator: Launchpad (build 16916)\n + +#. module: purchase_discount +#: model:ir.model,name:purchase_discount.model_purchase_order +msgid Purchase Order +msgstr Orden de Compra + +#. module: purchase_discount +#: model:ir.model,name:purchase_discount.model_stock_picking