forked from OCA/purchase-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43e2129
commit 1b6d1cc
Showing
9 changed files
with
152 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop) | ||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
--> | ||
<openerp><data> | ||
|
||
<record id="order" model="purchase.order"> | ||
<field name="name">Purchase Order</field> | ||
<field name="partner_id" ref="base.res_partner_1"/> | ||
<field name="location_id" ref="stock.stock_location_stock"/> | ||
<field name="pricelist_id" ref="purchase.list0"/> | ||
</record> | ||
|
||
<record id="order_line1" model="purchase.order.line"> | ||
<field name="name">Line 1</field> | ||
<field name="order_id" ref="order"/> | ||
<field name="product_qty">1.0</field> | ||
<field name="product_id" ref="product.product_product_7"/> | ||
<field name="product_uom" ref="product.product_uom_unit"/> | ||
<field name="taxes_id" eval="[(6, 0, [ref('account_invoice_triple_discount.tax')])]"/> | ||
<field name="price_unit">600</field> | ||
<field name="date_planned">2018-01-19</field> | ||
</record> | ||
|
||
<record id="order_line2" model="purchase.order.line"> | ||
<field name="name">Line 2</field> | ||
<field name="order_id" ref="order"/> | ||
<field name="product_qty">10.0</field> | ||
<field name="product_id" ref="product.product_product_28"/> | ||
<field name="product_uom" ref="product.product_uom_unit"/> | ||
<field name="taxes_id" eval="[(6, 0, [ref('account_invoice_triple_discount.tax')])]"/> | ||
<field name="price_unit">60</field> | ||
<field name="date_planned">2018-01-19</field> | ||
</record> | ||
|
||
</data></openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,25 +7,24 @@ | |
# Quentin THEURET <[email protected]>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0\n" | ||
"Project-Id-Version: Odoo Server 8.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-11-25 08:26+0000\n" | ||
"PO-Revision-Date: 2017-11-25 08:26+0000\n" | ||
"Last-Translator: Quentin THEURET <[email protected]>, 2017\n" | ||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" | ||
"POT-Creation-Date: 2018-03-02 20:55+0000\n" | ||
"PO-Revision-Date: 2018-03-02 20:55+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" | ||
"Language: fr\n" | ||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: purchase_triple_discount | ||
#: model:ir.model.fields,field_description:purchase_triple_discount.field_purchase_order_line_discount2 | ||
#: field:purchase.order.line,discount2:0 | ||
msgid "Disc. 2 (%)" | ||
msgstr "Rem. 2 (%)" | ||
|
||
#. module: purchase_triple_discount | ||
#: model:ir.model.fields,field_description:purchase_triple_discount.field_purchase_order_line_discount3 | ||
#: field:purchase.order.line,discount3:0 | ||
msgid "Disc. 3 (%)" | ||
msgstr "Rem. 3 (%)" | ||
|
||
|
@@ -44,7 +43,18 @@ msgstr "La remise 3 doit être inférieure à 100%." | |
msgid "Invoice" | ||
msgstr "Facture" | ||
|
||
#. module: purchase_triple_discount | ||
#: model:ir.model,name:purchase_triple_discount.model_purchase_order | ||
msgid "Purchase Order" | ||
msgstr "Bon de commande" | ||
|
||
#. module: purchase_triple_discount | ||
#: model:ir.model,name:purchase_triple_discount.model_purchase_order_line | ||
msgid "Purchase Order Line" | ||
msgstr "Ligne de commande d'achat" | ||
|
||
#. module: purchase_triple_discount | ||
#: model:ir.model,name:purchase_triple_discount.model_stock_move | ||
msgid "Stock Move" | ||
msgstr "Mouvement de stock" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
from . import account_invoice | ||
from . import purchase_order | ||
from . import stock_move |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# coding: utf-8 | ||
# Copyright (C) 2018 - Today: GRAP (http://www.grap.coop) | ||
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openerp import models, api | ||
|
||
|
||
class StockMove(models.Model): | ||
_inherit = "stock.move" | ||
|
||
@api.model | ||
def _get_invoice_line_vals(self, move, partner, inv_type): | ||
res = super(StockMove, self)._get_invoice_line_vals( | ||
move, partner, inv_type) | ||
order_line = False | ||
if move.purchase_line_id: | ||
order_line = move.purchase_line_id | ||
elif move.origin_returned_move_id.purchase_line_id: | ||
order_line = move.origin_returned_move_id.purchase_line_id | ||
if order_line: | ||
res.update({ | ||
'discount2': order_line.discount2, | ||
'discount3': order_line.discount3, | ||
}) | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<openerp><data> | ||
|
||
<record id="purchase_order_triple_discount_form_view" model="ir.ui.view"> | ||
<field name="name">purchase.order.triple.discount.form</field> | ||
<field name="model">purchase.order</field> | ||
<field name="inherit_id" ref="purchase_discount.purchase_order_form" /> | ||
<field name="inherit_id" ref="purchase_discount.purchase_discount_order_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='order_line']//tree//field[@name='discount']" | ||
position="after"> | ||
<field name="discount2"/> | ||
<field name="discount3"/> | ||
</xpath> | ||
<xpath expr="//field[@name='order_line']//form//field[@name='discount']" | ||
position="after"> | ||
<field name="discount2"/> | ||
<field name="discount3"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</odoo> | ||
</data></openerp> |