diff --git a/__init__.py b/__init__.py index 031404d2e38c2308ccbc5e574ca5e43b2073ff3f..fa6cda2a0db26db759cba4875050c7b4d4451b9c 100644 --- a/__init__.py +++ b/__init__.py @@ -1,26 +1,5 @@ # -*- encoding: utf-8 -*- -############################################################################## -# -# Aquilog - Open Source Solutions -# Copyright (C) 2005 - 2016 Aquilog <http://www.aquilog.fr> -# -# 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 models -import models - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/__manifest__.py b/__manifest__.py index 0503d33827cfa9d921e764bbd83dc7992dbc18c8..26ef37ba82a6d5859236cd7dea82d05aafa0415e 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,17 +1,22 @@ { 'name': "Pylote - Imprimé", - 'version': "10.0.003", - 'author': "Scopea", - 'website': 'http://scopea.fr', - 'category': "Misc", - 'depends': ['account','sale','purchase', 'product'], - 'init_xml': [], - 'demo_xml': [], - 'description': """ -Custom printed report -""", + 'summary': "Print views modifications", + 'version': "0.0", + 'author': "Le Filament", + 'license': 'AGPL-3', + 'category': "Pylote", + 'depends': [ + 'account', + 'sale', + 'purchase', + 'product'], + 'contributors': [ + 'Benjamin Rivier <benjamin@le-filament.com>', + 'Rémi Cazenave <remi@le-filament.com>', + 'Juliana Poudou <juliana@le-filament.com>', + ], + 'website': 'https://le-filament.com', 'data': [ - # 'security/ir.model.access.csv', 'views/report_purchase_order.xml', 'views/report_invoice.xml', 'views/view_purchase_order.xml', diff --git a/models/__init__.py b/models/__init__.py index 370f577b2a22c9d3c3984e2e1d5339f0878fe4e0..fc3d15256355d2b1f2db8ff4fdb45d27011f8725 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -1 +1,3 @@ +# -*- encoding: utf-8 -*- + from . import purchase diff --git a/models/purchase.py b/models/purchase.py index 12c334dcc8cfb17de2692e5e878c37adec92c3b1..46dc5b1018f071061ba80d9663f6fac80e2119cb 100644 --- a/models/purchase.py +++ b/models/purchase.py @@ -1,38 +1,25 @@ # -*- encoding: utf-8 -*- -############################################################################## -# -# Aquilog - Open Source Solutions -# Copyright (C) 2005 - 2015 Aquilog <http://www.aquilog.fr> -# -# 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 import models, fields -from openerp import api, models, fields, _ class PylotePurchaseOrder(models.Model): _inherit = 'purchase.order' - s_contact = fields.Many2one('res.partner', string='Contact interne', domain=[('parent_id.id','=',1)]) + s_contact = fields.Many2one( + comodel_name='res.partner', + string='Contact interne', + domain=[('parent_id.id', '=', 1)]) s_summary = fields.Char(string='Objet') + class PylotePurchaseOrderLine(models.Model): _inherit = 'purchase.order.line' def get_ref(self): - fournisseurs = self.product_id.seller_ids.filtered(lambda s: s.name.id == self.order_id.partner_id.id or s.name.id == self.order_id.partner_id.parent_id.id) + fournisseurs = self.product_id.seller_ids.filtered( + lambda s: s.name.id == self.order_id.partner_id.id + or s.name.id == self.order_id.partner_id.parent_id.id) if len(fournisseurs) >= 1: return fournisseurs[0].product_code return "" diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv deleted file mode 100644 index 0343f29f43af261e1aafafe92f8e6d7e90037a2e..0000000000000000000000000000000000000000 --- a/security/ir.model.access.csv +++ /dev/null @@ -1 +0,0 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" diff --git a/views/report_invoice.xml b/views/report_invoice.xml index b74de9415be11e805b1fbd6d322dabccec284763..29c1a0b4d9ab1d16340c09ff2c0f21f0628f709b 100644 --- a/views/report_invoice.xml +++ b/views/report_invoice.xml @@ -2,8 +2,8 @@ <openerp> <data> - <template id="report_invoice_pylote" inherit_id="sale.report_invoice_layouted"> - <xpath expr="//div[@class='page']" position="replace"> + <template id="report_invoice_pylote" inherit_id="account.report_invoice_document"> + <!-- <xpath expr="//div[@class='page']" position="replace"> <div class="page"> <div class="row"> <div name="invoice_address" class="col-xs-6"> @@ -55,8 +55,6 @@ <p t-field="o.reference"/> </div> </div> - - <!-- Is there a discount on at least one line? --> <t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/> <table class="table table-condensed"> @@ -160,7 +158,7 @@ <strong>BIC</strong>: CCBPFRPPTLS </p> </div> - </xpath> + </xpath> --> </template> </data> diff --git a/views/report_purchase_order.xml b/views/report_purchase_order.xml index 2c0c2177d92780ad22e04c03f8ee068c9851fbf8..89018e5f609948cebf8dda66d4c5b47865ae52dc 100644 --- a/views/report_purchase_order.xml +++ b/views/report_purchase_order.xml @@ -3,20 +3,11 @@ <data> <template id="report_purchase_pylote" inherit_id="purchase.report_purchaseorder_document"> - <xpath expr="//div[@class='page']" position="replace"> + <!-- <xpath expr="//div[@class='page']" position="replace"> <div class="page"> <div class="oe_structure"/> <div class="row"> <div class="col-xs-6"> - <!-- <strong>Adresse de livraison:</strong> - <div t-if="o.dest_address_id"> - <div t-field="o.dest_address_id" t-options="{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}"/> - </div> --> - - <!-- <div t-if="not o.dest_address_id and o.picking_type_id and o.picking_type_id.warehouse_id"> - <span t-field="o.picking_type_id.warehouse_id.name"/> - <div t-field="o.picking_type_id.warehouse_id.partner_id" t-options="{"widget": "contact", "fields": ["address", "phone", "fax"], "no_marker": True, "phone_icons": True}"/> - </div> --> </div> <div class="col-xs-5 col-xs-offset-1"> <div t-field="o.partner_id" t-options="{"widget": "contact", "fields": ["address", "name", "phone", "fax", "email"], "no_marker": True, "phone_icons": True}"/> @@ -55,7 +46,6 @@ <tr> <th><strong>Nom</strong></th> <th><strong>Description</strong></th> - <!-- <th><strong>Reférence</strong></th> --> <th><strong>Taxes</strong></th> <th class="text-center"><strong>Date demandée.</strong></th> <th class="text-right"><strong>Qté</strong></th> @@ -71,9 +61,6 @@ <td> <span t-field="line.name"/> </td> - <!-- <td> - <span t-esc="line.get_ref()"/> - </td> --> <td> <span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/> </td> @@ -147,7 +134,7 @@ </div> <div class="oe_structure"/> </div> - </xpath> + </xpath> --> </template> </data>