[tryton-debian-vcs] tryton-modules-account-stock-anglo-saxon branch debian updated. debian/4.2.0-1-2-g8ed7e0a
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Jun 7 13:32:18 UTC 2017
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-stock-anglo-saxon.git;a=commitdiff;h=debian/4.2.0-1-2-g8ed7e0a
commit 8ed7e0a54150854554c56e48d4be30d89b8d1c63
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Jun 7 15:25:59 2017 +0200
Merging upstream version 4.4.0.
diff --git a/CHANGELOG b/CHANGELOG
index 3384445..b75483f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.4.0 - 2017-05-01
+* Bug fixes (see mercurial logs for details)
+* Use stock_moves from account_invoice_stock
+
Version 4.2.0 - 2016-11-28
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 29a4a55..46e36ff 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2010-2016 Cédric Krier.
-Copyright (C) 2010-2016 B2CK SPRL.
+Copyright (C) 2010-2017 Cédric Krier.
+Copyright (C) 2010-2017 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/INSTALL b/INSTALL
index 1198521..46ee6bb 100644
--- a/INSTALL
+++ b/INSTALL
@@ -8,6 +8,7 @@ Prerequisites
* trytond (http://www.tryton.org/)
* trytond_account (http://www.tryton.org/)
* trytond_account_invoice (http://www.tryton.org/)
+ * trytond_account_invoice_stock (http://www.tryton.org/)
* trytond_account_product (http://www.tryton.org/)
* trytond_stock_continental (http://www.tryton.org/)
diff --git a/PKG-INFO b/PKG-INFO
index 71e6ad3..54d129b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_account_stock_anglo_saxon
-Version: 4.2.0
+Version: 4.4.0
Summary: Tryton module for anglo-saxon real-time stock valuation
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.2/
+Download-URL: http://downloads.tryton.org/4.4/
Description: trytond_account_stock_anglo_saxon
=================================
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Chinese (Simplified)
diff --git a/__init__.py b/__init__.py
index fe0cc4e..4263660 100644
--- a/__init__.py
+++ b/__init__.py
@@ -11,7 +11,9 @@ from .account import *
def register():
Pool.register(
Category,
+ CategoryAccount,
Template,
+ TemplateAccount,
Product,
Move,
InvoiceLine,
diff --git a/account.xml b/account.xml
deleted file mode 100644
index 0a7e965..0000000
--- a/account.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<tryton>
- <data>
-
- <!-- Read access to compute anglo saxon account.move lines -->
- <record model="ir.model.access" id="access_purchase_line_account">
- <field name="model" search="[('model', '=', 'purchase.line')]"/>
- <field name="group" ref="account.group_account"/>
- <field name="perm_read" eval="True"/>
- <field name="perm_write" eval="False"/>
- <field name="perm_create" eval="False"/>
- <field name="perm_delete" eval="False"/>
- </record>
- <record model="ir.model.access" id="access_sale_line_account">
- <field name="model" search="[('model', '=', 'sale.line')]"/>
- <field name="group" ref="account.group_account"/>
- <field name="perm_read" eval="True"/>
- <field name="perm_write" eval="False"/>
- <field name="perm_create" eval="False"/>
- <field name="perm_delete" eval="False"/>
- </record>
-
- </data>
-</tryton>
diff --git a/invoice.py b/invoice.py
index 270e494..8ae9e30 100644
--- a/invoice.py
+++ b/invoice.py
@@ -51,15 +51,6 @@ class InvoiceLine:
result.append(move_line)
return result
- @property
- def _anglo_saxon_stock_moves(self):
- pool = Pool()
- PurchaseLine = pool.get('purchase.line')
- SaleLine = pool.get('sale.line')
- if isinstance(self.origin, (PurchaseLine, SaleLine)):
- return list(self.origin.moves)
- return []
-
def get_move_lines(self):
pool = Pool()
Move = pool.get('stock.move')
@@ -82,8 +73,7 @@ class InvoiceLine:
return result
# an empty list means we'll use the current cost price
- moves = [move for move in self._anglo_saxon_stock_moves
- if move.state == 'done']
+ moves = [move for move in self.stock_moves if move.state == 'done']
if self.invoice.type == 'in':
type_ = 'in_supplier'
elif self.invoice.type == 'out':
diff --git a/locale/bg.po b/locale/bg.po
index 7ecdb5a..6f98468 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/ca.po b/locale/ca.po
index d593b3c..cd750a6 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte cost béns venuts usada"
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Compte cost béns venuts"
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Compte cost de béns venuts"
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte cost béns venuts usada"
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Compte cost béns venuts"
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr "Quantitat anglosaxona d'entrada"
diff --git a/locale/cs.po b/locale/cs.po
index 92f0e1a..797d045 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/de.po b/locale/de.po
index c35f6b5..db5e519 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Verwendetes Konto Kosten verkaufte Waren"
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Konto Kosten der verkauften Waren"
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Konto Kosten der verkauften Waren"
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Verwendetes Konto Kosten verkaufte Waren"
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Konto Kosten der verkauften Waren"
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr "Eingang (Angelsächsische Bewertung)"
diff --git a/locale/es.po b/locale/es.po
index 599f7b6..bc62804 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta coste de bienes vendidos usada"
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta coste de bienes vendidos"
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Cuenta coste de bienes vendidos"
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Cuenta coste de bienes vendidos usada"
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta coste de bienes vendidos"
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr "Cantidad anglosajona de entrada"
diff --git a/locale/es_419.po b/locale/es_419.po
index dbdf3e1..6297aad 100644
--- a/locale/es_419.po
+++ b/locale/es_419.po
@@ -8,27 +8,35 @@ msgstr ""
msgctxt "field:product.category,account_cogs:"
msgid "Account Cost of Goods Sold"
-msgstr "Cuenta de costo de mercaderías vendidas"
+msgstr "Cuenta de costo de mercancías vendidas"
msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
-msgstr "Cuenta de costo de mercaderías vendidas utilizada"
+msgstr "Cuenta de costo de mercancías vendidas utilizada"
+
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta de costo de mercancías vendidas"
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
-msgstr "Cuenta de costo de mercaderías vendidas"
+msgstr "Cuenta de costo de mercancías vendidas"
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
-msgstr "Cuenta de costo de mercaderías vendidas utilizada"
+msgstr "Cuenta de costo de mercancías vendidas utilizada"
msgctxt "field:product.template,account_cogs:"
msgid "Account Cost of Goods Sold"
-msgstr "Cuenta de costo de mercaderías vendidas"
+msgstr "Cuenta de costo de mercancías vendidas"
msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
-msgstr "Cuenta de costo de mercaderías vendidas utilizada"
+msgstr "Cuenta de costo de mercancías vendidas utilizada"
+
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Cuenta de costo de mercancías vendidas"
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
diff --git a/locale/fr.po b/locale/fr.po
index e4935de..7358767 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte « coût des marchandises vendues » utilisé"
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Compte « coût des marchandises vendues »"
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Compte « coût des marchandises vendues »"
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Compte « coût des marchandises vendues » utilisé"
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Compte « coût des marchandises vendues »"
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr "Quantité anglo-saxonne entrée"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index 92f0e1a..797d045 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 694bf2d..5028ced 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -14,6 +14,11 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Conto costo del venduto usato"
+#, fuzzy
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Conto costo del venduto"
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Conto costo del venduto"
@@ -30,6 +35,11 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Conto costo del venduto Usato"
+#, fuzzy
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Conto costo del venduto"
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr "Input quantità - angolsassone"
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index 92f0e1a..797d045 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/lo.po b/locale/lo.po
index 023f12d..33ba4f5 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/lt.po b/locale/lt.po
index 92f0e1a..797d045 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/nl.po b/locale/nl.po
index 194174f..16a4724 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/pl.po b/locale/pl.po
index 92f0e1a..797d045 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index e67c9b1..f04236c 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -14,12 +14,14 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Conta de Custo de Mercadorias Vendidas Utilizada"
-#, fuzzy
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Conta de Custo de Mercadorias Vendidas"
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Conta de Custo de Mercadorias Vendidas"
-#, fuzzy
msgctxt "field:product.product,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Conta de Custo de Mercadorias Vendidas Utilizada"
@@ -32,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Conta de Custo de Mercadorias Vendidas Utilizada"
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Conta de Custo de Mercadorias Vendidas"
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr "Quantidade Anglo-Saxã de Entrada"
@@ -40,7 +46,6 @@ msgctxt "field:stock.move,out_anglo_saxon_quantity:"
msgid "Output Anglo-Saxon Quantity"
msgstr "Quantidade Anglo-Saxã de Saída"
-#, fuzzy
msgctxt "help:product.product,account_cogs:"
msgid "This account will be used instead of the one defined on the category."
msgstr "Esta conta será utilizada no lugar daquela definida na categoria."
diff --git a/locale/ru.po b/locale/ru.po
index 07cd431..e617447 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/locale/sl.po b/locale/sl.po
index 1f35e65..2f03b99 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Uporabljen konto stroškov prodanega blaga"
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Konto stroškov prodanega blaga"
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr "Konto stroškov prodanega blaga"
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr "Uporabljen konto stroškov prodanega blaga"
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr "Konto stroškov prodanega blaga"
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr "Vhodna anglosaška količina"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index 92f0e1a..797d045 100644
--- a/locale/zh_CN.po
+++ b/locale/zh_CN.po
@@ -14,6 +14,10 @@ msgctxt "field:product.category,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.category.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:product.product,account_cogs:"
msgid "Account Cost of Goods Sold"
msgstr ""
@@ -30,6 +34,10 @@ msgctxt "field:product.template,account_cogs_used:"
msgid "Account Cost of Goods Sold Used"
msgstr ""
+msgctxt "field:product.template.account,account_cogs:"
+msgid "Account Cost of Goods Sold"
+msgstr ""
+
msgctxt "field:stock.move,in_anglo_saxon_quantity:"
msgid "Input Anglo-Saxon Quantity"
msgstr ""
diff --git a/product.py b/product.py
index aaa952b..c47c03d 100644
--- a/product.py
+++ b/product.py
@@ -1,18 +1,20 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
+from trytond import backend
from trytond.model import fields
from trytond.pyson import Eval
-from trytond.pool import PoolMeta
+from trytond.pool import PoolMeta, Pool
from trytond.modules.account_product import MissingFunction
-__all__ = ['Category', 'Template', 'Product']
+__all__ = ['Category', 'CategoryAccount', 'Template', 'TemplateAccount',
+ 'Product']
class Category:
__metaclass__ = PoolMeta
__name__ = 'product.category'
- account_cogs = fields.Property(fields.Many2One('account.account',
+ account_cogs = fields.MultiValue(fields.Many2One('account.account',
'Account Cost of Goods Sold', domain=[
('kind', '!=', 'view'),
('company', '=', Eval('context', {}).get('company', -1)),
@@ -27,11 +29,51 @@ class Category:
'Account Cost of Goods Sold Used'), 'missing_account',
'get_account')
+ @classmethod
+ def multivalue_model(cls, field):
+ pool = Pool()
+ if field == 'account_cogs':
+ return pool.get('product.category.account')
+ return super(Category, cls).multivalue_model(field)
+
+
+class CategoryAccount:
+ __metaclass__ = PoolMeta
+ __name__ = 'product.category.account'
+ account_cogs = fields.Many2One(
+ 'account.account', "Account Cost of Goods Sold",
+ domain=[
+ ('kind', '!=', 'view'),
+ ('company', '=', Eval('company', -1)),
+ ],
+ depends=['company'])
+
+ @classmethod
+ def __register__(cls, module_name):
+ TableHandler = backend.get('TableHandler')
+ exist = TableHandler.table_exist(cls._table)
+ if exist:
+ table = TableHandler(cls, module_name)
+ exist &= table.column_exist('account_cogs')
+
+ super(CategoryAccount, cls).__register__(module_name)
+
+ if not exist:
+ # Re-migration
+ cls._migrate_property([], [], [])
+
+ @classmethod
+ def _migrate_property(cls, field_names, value_names, fields):
+ field_names.append('account_cogs')
+ value_names.append('account_cogs')
+ super(CategoryAccount, cls)._migrate_property(
+ field_names, value_names, fields)
+
class Template:
__metaclass__ = PoolMeta
__name__ = 'product.template'
- account_cogs = fields.Property(fields.Many2One('account.account',
+ account_cogs = fields.MultiValue(fields.Many2One('account.account',
'Account Cost of Goods Sold', domain=[
('kind', '!=', 'view'),
('company', '=', Eval('context', {}).get('company', -1)),
@@ -48,6 +90,46 @@ class Template:
'Account Cost of Goods Sold Used'), 'missing_account',
'get_account')
+ @classmethod
+ def multivalue_model(cls, field):
+ pool = Pool()
+ if field == 'account_cogs':
+ return pool.get('product.template.account')
+ return super(Template, cls).multivalue_model(field)
+
+
+class TemplateAccount:
+ __metaclass__ = PoolMeta
+ __name__ = 'product.template.account'
+ account_cogs = fields.Many2One(
+ 'account.account', "Account Cost of Goods Sold",
+ domain=[
+ ('kind', '!=', 'view'),
+ ('company', '=', Eval('company', -1)),
+ ],
+ depends=['company'])
+
+ @classmethod
+ def __register__(cls, module_name):
+ TableHandler = backend.get('TableHandler')
+ exist = TableHandler.table_exist(cls._table)
+ if exist:
+ table = TableHandler(cls, module_name)
+ exist &= table.column_exist('account_cogs')
+
+ super(TemplateAccount, cls).__register__(module_name)
+
+ if not exist:
+ # Re-migration
+ cls._migrate_property([], [], [])
+
+ @classmethod
+ def _migrate_property(cls, field_names, value_names, fields):
+ field_names.append('account_cogs')
+ value_names.append('account_cogs')
+ super(TemplateAccount, cls)._migrate_property(
+ field_names, value_names, fields)
+
class Product:
__metaclass__ = PoolMeta
diff --git a/setup.py b/setup.py
index f865878..bb8e295 100644
--- a/setup.py
+++ b/setup.py
@@ -87,7 +87,7 @@ setup(name=name,
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
- 'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
diff --git a/tests/scenario_account_stock_anglo_saxon.rst b/tests/scenario_account_stock_anglo_saxon.rst
index 60d6682..93c22c3 100644
--- a/tests/scenario_account_stock_anglo_saxon.rst
+++ b/tests/scenario_account_stock_anglo_saxon.rst
@@ -41,7 +41,6 @@ Create the required users::
>>> accountant = User()
>>> accountant.name = 'Accountant'
>>> accountant.login = 'accountant'
- >>> accountant.password = 'accountant'
>>> account_group, = Group.find([('name', '=', 'Account')])
>>> accountant.groups.append(account_group)
>>> accountant.save()
@@ -49,7 +48,6 @@ Create the required users::
>>> product_user = User()
>>> product_user.name = 'Product User'
>>> product_user.login = 'product_user'
- >>> product_user.password = 'product_user'
>>> product_group, = Group.find([('name', '=', 'Product Administration')])
>>> product_user.groups.append(product_group)
>>> product_user.save()
@@ -57,7 +55,6 @@ Create the required users::
>>> purchase_user = User()
>>> purchase_user.name = 'Purchase User'
>>> purchase_user.login = 'purchase_user'
- >>> purchase_user.password = 'purchase_user'
>>> purchase_group, = Group.find([('name', '=', 'Purchase')])
>>> purchase_user.groups.append(purchase_group)
>>> purchase_user.save()
@@ -65,7 +62,6 @@ Create the required users::
>>> stock_user = User()
>>> stock_user.name = 'Sale User'
>>> stock_user.login = 'stock_user'
- >>> stock_user.password = 'stock_user'
>>> stock_group, = Group.find([('name', '=', 'Stock')])
>>> stock_user.groups.append(stock_group)
>>> stock_user.save()
diff --git a/tryton.cfg b/tryton.cfg
index 5d08afd..62d56a4 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,17 +1,15 @@
[tryton]
-version=4.2.0
+version=4.4.0
depends:
account
account_invoice
+ account_invoice_stock
account_product
account_stock_continental
ir
- purchase
res
- sale
xml:
product.xml
- account.xml
minimal_chart_bg.xml
minimal_chart_ca.xml
minimal_chart_de.xml
diff --git a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
index afa727b..58bea51 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
+++ b/trytond_account_stock_anglo_saxon.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-account-stock-anglo-saxon
-Version: 4.2.0
+Version: 4.4.0
Summary: Tryton module for anglo-saxon real-time stock valuation
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.2/
+Download-URL: http://downloads.tryton.org/4.4/
Description: trytond_account_stock_anglo_saxon
=================================
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Chinese (Simplified)
diff --git a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
index 2b3562c..9d2fe5e 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
+++ b/trytond_account_stock_anglo_saxon.egg-info/SOURCES.txt
@@ -4,7 +4,6 @@ INSTALL
LICENSE
MANIFEST.in
README
-account.xml
minimal_chart.xml
minimal_chart_bg.xml
minimal_chart_ca.xml
@@ -21,7 +20,6 @@ setup.py
tryton.cfg
./__init__.py
./account.py
-./account.xml
./invoice.py
./minimal_chart_bg.xml
./minimal_chart_ca.xml
diff --git a/trytond_account_stock_anglo_saxon.egg-info/requires.txt b/trytond_account_stock_anglo_saxon.egg-info/requires.txt
index 5eccb10..36f9c81 100644
--- a/trytond_account_stock_anglo_saxon.egg-info/requires.txt
+++ b/trytond_account_stock_anglo_saxon.egg-info/requires.txt
@@ -1,7 +1,6 @@
-trytond_account >= 4.2, < 4.3
-trytond_account_invoice >= 4.2, < 4.3
-trytond_account_product >= 4.2, < 4.3
-trytond_account_stock_continental >= 4.2, < 4.3
-trytond_purchase >= 4.2, < 4.3
-trytond_sale >= 4.2, < 4.3
-trytond >= 4.2, < 4.3
+trytond_account >= 4.4, < 4.5
+trytond_account_invoice >= 4.4, < 4.5
+trytond_account_invoice_stock >= 4.4, < 4.5
+trytond_account_product >= 4.4, < 4.5
+trytond_account_stock_continental >= 4.4, < 4.5
+trytond >= 4.4, < 4.5
--
tryton-modules-account-stock-anglo-saxon
More information about the tryton-debian-vcs
mailing list