Skip to content
Extraits de code Groupes Projets
Valider 47b0f771 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[add] Ajout modification demandées par client

parent b3a58747
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -7,12 +7,21 @@ ...@@ -7,12 +7,21 @@
Fumaison Occ - Vente Fumaison Occ - Vente
==================== ====================
- Articles
- Ce module hérite du module *product* et ajoute un champ EAN7 sur les articles champs au modèle *product.product* - Ce module hérite du module *product* et ajoute un champ EAN7 sur les articles champs au modèle *product.product*
- Commande
- Ajout de champs venant de *fumoc_partner* sur *sale_order* - Ajout de champs venant de *fumoc_partner* sur *sale_order*
- Ajout de la note de facturation et de la DLC des lots dans les factures pdf - Ajout du type de facturation sur la vue liste
- Modifications date (sans heure) sur PDF Bon de Commande
- Picking
- Ajout de la DLC dans la vue détaillée des opérations sur le bon de livraison - Ajout de la DLC dans la vue détaillée des opérations sur le bon de livraison
- Modifications mineures du bon de livraison (suppression numéro de téléphone client, remplace Origine par Commande, Force date prévue, Ajout du code-barre article) - Modifications mineures du bon de livraison (suppression numéro de téléphone client, remplace Origine par Commande, Force date prévue, Ajout du code-barre article)
- Calcul la DLC des lots en fonction du numéro de lot - Facturation
- Ajout de la note de facturation et de la DLC des lots dans les factures pdf
- Ajout montants HT et TTC sur chaque ligne des PDF factures + renomme Origine en Commande
- Ajout liste des BL sur PDF
- Lots & Quants
- Calcule la DLC des lots en fonction du numéro de lot
- Ajout de la DLC, DDM et date d'alerte dans *stock_quant* - Ajout de la DLC, DDM et date d'alerte dans *stock_quant*
Description Description
......
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models from . import models
from . import report
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
'product_expiry', 'product_expiry',
'sale_stock', 'sale_stock',
'fumoc_partner', 'fumoc_partner',
'stock_picking_invoice_link',
], ],
'data': [ 'data': [
# datas # datas
......
...@@ -6,6 +6,7 @@ from . import product ...@@ -6,6 +6,7 @@ from . import product
from . import res_company from . import res_company
from . import res_config_settings from . import res_config_settings
from . import sale_order from . import sale_order
from . import stock_move
from . import stock_picking from . import stock_picking
from . import stock_production_lot from . import stock_production_lot
from . import stock_quant from . import stock_quant
# Copyright 2021 Le Filament (<http://www.le-filament.com>) # Copyright 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models, api from odoo import fields, models
class ProductTemplate(models.Model): class ProductTemplate(models.Model):
......
...@@ -16,3 +16,6 @@ class FumocSaleOrder(models.Model): ...@@ -16,3 +16,6 @@ class FumocSaleOrder(models.Model):
packaging_id = fields.Many2one( packaging_id = fields.Many2one(
string="Emballage", string="Emballage",
related='partner_id.packaging_id') related='partner_id.packaging_id')
billing_type_id = fields.Many2one(
string="Type de facturation",
related='partner_id.billing_type_id')
# Copyright 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class StockMove(models.Model):
_inherit = 'stock.move'
def _prepare_move_line_vals(self, quantity=None, reserved_quant=None):
vals = self.super()._prepare_move_line_vals(self, quantity=None, reserved_quant=None)
if reserved_quant:
vals = dict(
vals,
expiration_date=reserved_quant.lot_id.expiration_date,
)
return vals
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import product_pricelist_report
# Copyright 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
class report_product_pricelist(models.AbstractModel):
_inherit = 'report.product.report_pricelist'
def _get_product_data(self, is_product_tmpl, product, pricelist, quantities):
data = super()._get_product_data(is_product_tmpl, product, pricelist, quantities)
data['barcode'] = product.barcode
return data
...@@ -5,6 +5,31 @@ ...@@ -5,6 +5,31 @@
<template id="fumoc_sale_stock_report_invoice_document" inherit_id="sale_stock.sale_stock_report_invoice_document"> <template id="fumoc_sale_stock_report_invoice_document" inherit_id="sale_stock.sale_stock_report_invoice_document">
<xpath expr="//div[@name='origin']" position="replace">
<div class="col-auto col-3 mw-100 mb-2" t-if="o.invoice_origin" name="origin">
<strong>Commande :</strong>
<p class="m-0" t-field="o.invoice_origin"/>
</div>
<div class="col-auto col-3 mw-100 mb-2" t-if="o.picking_ids" name="origin">
<strong>Livraison(s) :</strong>
<p t-esc="'%s' % ', '.join(o.picking_ids.mapped('name'))"/>
</div>
</xpath>
<xpath expr="//th[@name='th_subtotal']" position="replace">
<th name="th_subtotal" class="text-right">
<span>Montant HT</span>
<span>Montant TTC</span>
</th>
</xpath>
<xpath expr="//table//tbody//t[@name='account_invoice_line_accountable']//td[hasclass('o_price_total')]" position="replace">
<td class="text-right o_price_total">
<span class="text-nowrap" t-field="line.price_subtotal"/>
<span class="text-nowrap" t-field="line.price_total"/>
</td>
</xpath>
<xpath expr="//table[@name='invoice_snln_table']" position="attributes"> <xpath expr="//table[@name='invoice_snln_table']" position="attributes">
<attribute name="style">width: 65%;</attribute> <attribute name="style">width: 65%;</attribute>
</xpath> </xpath>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2021 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="fumoc_sale_report_pricelist_page" inherit_id="product.report_pricelist_page">
<xpath expr="//table/thead/tr/th[1]" position="after">
<th>Codes Barre</th>
</xpath>
<xpath expr="//table/tbody/t/tr/td[1]" position="after">
<td class="text-right">
<t t-esc="product['list_price']"/>
</td>
</xpath>
</template>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2021 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<template id="fumoc_sale_report_saleorder_document" inherit_id="sale_stock.report_saleorder_document_inherit_sale_stock">
<xpath expr="//div[@id='informations']" position="replace">
<div class="row mt32 mb32" id="informations">
<div t-if="doc.client_order_ref" class="col-auto col-3 mw-100 mb-2">
<strong>Your Reference:</strong>
<p class="m-0" t-field="doc.client_order_ref"/>
</div>
<div t-if="doc.date_order and doc.state not in ['draft','sent']" class="col-auto col-3 mw-100 mb-2">
<strong>Order Date:</strong>
<p class="m-0" t-field="doc.date_order" t-options="{&quot;widget&quot;: &quot;date&quot;}"/>
</div>
<div t-if="doc.date_order and doc.state in ['draft','sent']" class="col-auto col-3 mw-100 mb-2">
<strong>Quotation Date:</strong>
<p class="m-0" t-field="doc.date_order" t-options="{&quot;widget&quot;: &quot;date&quot;}"/>
</div>
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']" class="col-auto col-3 mw-100 mb-2" name="expiration_date">
<strong>Expiration:</strong>
<p class="m-0" t-field="doc.validity_date" t-options="{&quot;widget&quot;: &quot;date&quot;}"/>
</div>
<div class="col-3" t-if="doc.incoterm" groups="sale_stock.group_display_incoterm">
<strong>Incoterm:</strong>
<p t-field="doc.incoterm.code"/>
</div>
<div t-if="doc.user_id.name" class="col-auto col-3 mw-100 mb-2">
<strong>Salesperson:</strong>
<p class="m-0" t-field="doc.user_id"/>
</div>
</div>
</xpath>
</template>
</odoo>
...@@ -14,6 +14,31 @@ ...@@ -14,6 +14,31 @@
<field name="departure_day_ids" widget="many2many_tags"/> <field name="departure_day_ids" widget="many2many_tags"/>
<field name="res_transporter_id"/> <field name="res_transporter_id"/>
<field name="packaging_id"/> <field name="packaging_id"/>
<field name="billing_type_id"/>
</xpath>
</field>
</record>
<record id="fumoc_sale_order_tree_inherit" model="ir.ui.view">
<field name="name">fumoc_sale.sale.order.tree</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref=" sale.view_order_tree"/>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="after">
<field name="billing_type_id" optional="show"/>
</xpath>
</field>
</record>
<record id="fumoc_sale_quotation_tree_inherit" model="ir.ui.view">
<field name="name">fumoc_sale.sale.quotation.tree</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref=" sale.view_quotation_tree"/>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="after">
<field name="billing_type_id" optional="show"/>
</xpath> </xpath>
</field> </field>
</record> </record>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter