[FIX] l10n*: remove duplicate strings

Some field strings are duplicated and raising a warning in the CI.
Solution is to remove duplicated fields and put them in a common module,
or to change the string in the field declaration and put the right one
in the view.
This commit is contained in:
wan
2021-07-19 10:14:24 +00:00
committed by william-andre
parent c1d24ce9cc
commit 07f5c94e05
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class FetchmailServer(models.Model):
_inherit = 'fetchmail.server'
l10n_it_is_pec = fields.Boolean('PEC server', help="If PEC Server, only mail from '...@pec.fatturapa.it' will be processed.")
l10n_it_last_uid = fields.Integer(string='Last message UID', default=1)
l10n_it_last_uid = fields.Integer(string='Last message UID IT', default=1)
def _search_edi_invoice(self, att_name, send_state=False):
""" Search sent l10n_it_edi fatturaPA invoices """
+1 -1
View File
@@ -23,7 +23,7 @@ When invoices are related to their sale order and the sale order with the
delivery, the system will automatically calculate the linked DDTs for every
invoice line to export in the FatturaPA XML.
""",
'depends': ['l10n_it_edi', 'delivery'],
'depends': ['l10n_it_edi', 'delivery', 'stock_account'],
'data': [
'report/l10n_it_ddt_report.xml',
'views/stock_picking_views.xml',
@@ -20,7 +20,6 @@ class StockPicking(models.Model):
default="sender", string='Transport Method')
l10n_it_transport_method_details = fields.Char('Transport Note')
l10n_it_parcels = fields.Integer(string="Parcels", default=1)
l10n_it_country_code = fields.Char(related="company_id.account_fiscal_country_id.code")
l10n_it_ddt_number = fields.Char('DDT Number', readonly=True)
def _action_done(self):
@@ -6,16 +6,16 @@
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='do_print_picking']" position="after">
<field name="l10n_it_country_code" invisible="1"/>
<field name="country_code" invisible="1"/>
<button name="%(l10n_it_stock_ddt.action_report_ddt)d" type="action" string="Print"
attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '!=', 'outgoing'), ('l10n_it_country_code', '!=', 'IT'), ('state', '!=', 'done'), ('is_locked', '=', False)]}"
attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '!=', 'outgoing'), ('country_code', '!=', 'IT'), ('state', '!=', 'done'), ('is_locked', '=', False)]}"
groups="base.group_user"/>
</xpath>
<xpath expr="//button[@name='%(stock.action_report_delivery)d']" position="attributes">
<attribute name="attrs">{'invisible': ['|', ('state', '!=', 'done'), '|', ('is_locked', '=', False), '&amp;', ('picking_type_code', '=', 'outgoing'), ('l10n_it_country_code', '=', 'IT')]}</attribute>
<attribute name="attrs">{'invisible': ['|', ('state', '!=', 'done'), '|', ('is_locked', '=', False), '&amp;', ('picking_type_code', '=', 'outgoing'), ('country_code', '=', 'IT')]}</attribute>
</xpath>
<group name='carrier_data' position="after">
<group string="DDT Information" attrs="{'invisible': ['|', ('l10n_it_country_code', '!=', 'IT'), ('picking_type_code', '!=', 'outgoing')]}">
<group string="DDT Information" attrs="{'invisible': ['|', ('country_code', '!=', 'IT'), ('picking_type_code', '!=', 'outgoing')]}">
<field name="l10n_it_ddt_number"/>
<field name="l10n_it_transport_reason"/>
<field name="l10n_it_transport_method"/>
+3 -2
View File
@@ -3,12 +3,14 @@
from ast import literal_eval
from odoo import models
from odoo import models, fields
class StockPicking(models.Model):
_inherit = 'stock.picking'
country_code = fields.Char(related="company_id.account_fiscal_country_id.code")
def action_view_stock_valuation_layers(self):
self.ensure_one()
scraps = self.env['stock.scrap'].search([('picking_id', '=', self.id)])
@@ -18,4 +20,3 @@ class StockPicking(models.Model):
context.update(self.env.context)
context['no_at_date'] = True
return dict(action, domain=domain, context=context)